GestoreIntegrazionePDUrlBased.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */

  20. package org.openspcoop2.pdd.core.integrazione;

  21. import org.slf4j.Logger;
  22. import org.openspcoop2.pdd.core.AbstractCore;
  23. import org.openspcoop2.pdd.logger.OpenSPCoop2Logger;
  24. import org.openspcoop2.utils.LoggerWrapperFactory;



  25. /**
  26.  * Classe utilizzata per la ricezione di informazioni di integrazione
  27.  * dai servizi applicativi verso la porta di dominio.
  28.  *
  29.  * @author Poli Andrea (apoli@link.it)
  30.  * @author $Author$
  31.  * @version $Rev$, $Date$
  32.  */
  33. public class GestoreIntegrazionePDUrlBased extends AbstractCore implements IGestoreIntegrazionePD{

  34.     /** Utility per l'integrazione */
  35.     UtilitiesIntegrazione utilities = null;
  36.    
  37.     /** Logger utilizzato per debug. */
  38.     private Logger log = null;
  39.    
  40.     public GestoreIntegrazionePDUrlBased(){
  41.         this.log = OpenSPCoop2Logger.getLoggerOpenSPCoopCore();
  42.         if(this.log==null){
  43.             this.log = LoggerWrapperFactory.getLogger(GestoreIntegrazionePDUrlBased.class);
  44.         }
  45.         try{
  46.             this.utilities = UtilitiesIntegrazione.getInstancePDRequest(this.log);
  47.         }catch(Exception e){
  48.             this.log.error("Errore durante l'inizializzazione delle UtilitiesIntegrazione: "+e.getMessage(),e);
  49.         }
  50.     }
  51.    
  52.    
  53.     // IN - Request
  54.    
  55.     @Override
  56.     public void readInRequestHeader(HeaderIntegrazione integrazione,
  57.             InRequestPDMessage inRequestPDMessage) throws HeaderIntegrazioneException{
  58.        
  59.         try{
  60.             this.utilities.readUrlProperties(inRequestPDMessage.getUrlProtocolContext().getParameters(),
  61.                     integrazione);  
  62.         }catch(Exception e){
  63.             throw new HeaderIntegrazioneException("GestoreIntegrazionePDUrlBased, "+e.getMessage(),e);
  64.         }
  65.        
  66.     }

  67.     // OUT - Request
  68.    
  69.     @Override
  70.     public void setOutRequestHeader(HeaderIntegrazione integrazione,
  71.             OutRequestPDMessage outRequestPDMessage) throws HeaderIntegrazioneException{
  72.    
  73.         // nop;
  74.        
  75.     }
  76.    
  77.     // IN - Response
  78.    
  79.     @Override
  80.     public void readInResponseHeader(HeaderIntegrazione integrazione,
  81.             InResponsePDMessage inResponsePDMessage) throws HeaderIntegrazioneException{
  82.         // NOP
  83.         // Non esiste un header di integrazione basato sulla url per la risposta
  84.     }
  85.    
  86.     // OUT - Response
  87.    
  88.     @Override
  89.     public void setOutResponseHeader(HeaderIntegrazione integrazione,
  90.             OutResponsePDMessage outResponsePDMessage) throws HeaderIntegrazioneException{
  91.         // NOP
  92.         // Non esiste un header di integrazione basato sulla url per la risposta
  93.     }
  94. }