GestoreIntegrazionePAUrlBasedWithOnlyRead.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 spedizione di informazioni di integrazione
  27.  * dalla porta di dominio verso i servizi applicativi.
  28.  *
  29.  * @author Poli Andrea (apoli@link.it)
  30.  * @author $Author$
  31.  * @version $Rev$, $Date$
  32.  */
  33. public class GestoreIntegrazionePAUrlBasedWithOnlyRead extends AbstractCore implements IGestoreIntegrazionePA{

  34.     /** Utility per l'integrazione */
  35.     UtilitiesIntegrazione utilities = null;
  36.    
  37.     /** Logger utilizzato per debug. */
  38.     private Logger log = null;
  39.    
  40.     public GestoreIntegrazionePAUrlBasedWithOnlyRead(){
  41.         this.log = OpenSPCoop2Logger.getLoggerOpenSPCoopCore();
  42.         if(this.log==null){
  43.             this.log = LoggerWrapperFactory.getLogger(GestoreIntegrazionePAUrlBasedWithOnlyRead.class);
  44.         }
  45.         try{
  46.             this.utilities = UtilitiesIntegrazione.getInstancePARequest(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.             InRequestPAMessage inRequestPAMessage) throws HeaderIntegrazioneException {
  58.         try{
  59.             this.utilities.readUrlProperties(inRequestPAMessage.getUrlProtocolContext().getParameters(),
  60.                     integrazione);  
  61.         }catch(Exception e){
  62.             throw new HeaderIntegrazioneException("GestoreIntegrazionePAUrlBased, "+e.getMessage(),e);
  63.         }
  64.     }
  65.    
  66.     // OUT - Request
  67.    
  68.     @Override
  69.     public void setOutRequestHeader(HeaderIntegrazione integrazione,
  70.             OutRequestPAMessage outRequestPAMessage) throws HeaderIntegrazioneException{
  71.        
  72.         // nop;
  73.        
  74.     }
  75.    
  76.     // IN - Response
  77.    
  78.     @Override
  79.     public void readInResponseHeader(HeaderIntegrazione integrazione,
  80.             InResponsePAMessage inResponsePAMessage) throws HeaderIntegrazioneException{
  81.         // NOP
  82.         // Non esiste un header di integrazione basato sulla url per la risposta
  83.     }

  84.     // OUT - Response

  85.     @Override
  86.     public void setOutResponseHeader(HeaderIntegrazione integrazione,
  87.             OutResponsePAMessage outResponsePAMessage) throws HeaderIntegrazioneException{
  88.        
  89.         // nop;
  90.        
  91.     }
  92. }