SPCoopProperties.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.protocol.spcoop.config;

  21. import java.util.Properties;

  22. import org.slf4j.Logger;
  23. import org.openspcoop2.pdd.config.OpenSPCoop2Properties;
  24. import org.openspcoop2.protocol.basic.BasicStaticInstanceConfig;
  25. import org.openspcoop2.protocol.sdk.ProtocolException;
  26. import org.openspcoop2.protocol.sdk.constants.CostantiProtocollo;
  27. import org.openspcoop2.protocol.spcoop.constants.SPCoopCostanti;
  28. import org.openspcoop2.utils.BooleanNullable;
  29. import org.openspcoop2.utils.LoggerWrapperFactory;
  30. import org.openspcoop2.utils.resources.Loader;

  31. /**
  32.  * Classe che gestisce il file di properties 'spcoop.properties' del protocollo SPCoop
  33.  *
  34.  * @author Poli Andrea (apoli@link.it)
  35.  * @author $Author$
  36.  * @version $Rev$, $Date$
  37.  */
  38. public class SPCoopProperties {

  39.     /** Logger utilizzato per errori eventuali. */
  40.     private Logger log = null;


  41.     /** Copia Statica */
  42.     private static SPCoopProperties spcoopProperties = null;

  43.     /* ********  F I E L D S  P R I V A T I  ******** */

  44.     /** Reader delle proprieta' impostate nel file 'spcoop.properties' */
  45.     private SPCoopInstanceProperties reader;


  46.    


  47.     /* ********  C O S T R U T T O R E  ******** */

  48.     /**
  49.      * Viene chiamato in causa per istanziare il properties reader
  50.      *
  51.      *
  52.      */
  53.     private SPCoopProperties(String confDir,Logger log) throws ProtocolException{

  54.         if(log != null)
  55.             this.log = log;
  56.         else
  57.             this.log = LoggerWrapperFactory.getLogger("SPCoopProperties");

  58.         /* ---- Lettura del cammino del file di configurazione ---- */

  59.         Properties propertiesReader = new Properties();
  60.         java.io.InputStream properties = null;
  61.         try{  
  62.             properties = SPCoopProperties.class.getResourceAsStream("/spcoop.properties");
  63.             if(properties==null){
  64.                 throw new Exception("File '/spcoop.properties' not found");
  65.             }
  66.             propertiesReader.load(properties);
  67.         }catch(Exception e) {
  68.             this.log.error("Riscontrato errore durante la lettura del file 'spcoop.properties': "+e.getMessage());
  69.             throw new ProtocolException("SPCoopProperties initialize error: "+e.getMessage(),e);
  70.         }finally{
  71.             try{
  72.                 if(properties!=null)
  73.                     properties.close();
  74.             }catch(Throwable er){
  75.                 // close
  76.             }
  77.         }
  78.         try{
  79.             this.reader = new SPCoopInstanceProperties(confDir, propertiesReader, this.log);
  80.         }catch(Exception e){
  81.             throw new ProtocolException(e.getMessage(),e);
  82.         }

  83.     }

  84.     /**
  85.      * Il Metodo si occupa di inizializzare il propertiesReader
  86.      *
  87.      *
  88.      */
  89.     public static synchronized void initialize(String confDir,Logger log) throws ProtocolException{

  90.         if(SPCoopProperties.spcoopProperties==null)
  91.             SPCoopProperties.spcoopProperties = new SPCoopProperties(confDir,log);  

  92.     }

  93.     /**
  94.      * Ritorna l'istanza di questa classe
  95.      *
  96.      * @return Istanza di OpenSPCoopProperties
  97.      * @throws Exception
  98.      *
  99.      */
  100.     public static SPCoopProperties getInstance(Logger log) throws ProtocolException{

  101.         if(SPCoopProperties.spcoopProperties==null) {
  102.             // spotbugs warning 'SING_SINGLETON_GETTER_NOT_SYNCHRONIZED': l'istanza viene creata allo startup
  103.             synchronized (SPCoopProperties.class) {
  104.                 throw new ProtocolException("SPCoopProperties not initialized (use init method in factory)");
  105.             }
  106.         }

  107.         return SPCoopProperties.spcoopProperties;
  108.     }




  109.     public void validaConfigurazione(Loader loader) throws ProtocolException  {
  110.         try{  

  111.             /* **** LIBRERIA **** */

  112.             // Identificativo
  113.             String tipo = this.getTipoSeriale_IdentificativoBusta();
  114.             if( CostantiProtocollo.IDENTIFICATIVO_SERIALE_DB.equals(tipo) == false &&
  115.                     CostantiProtocollo.IDENTIFICATIVO_SERIALE_MYSQL.equals(tipo) == false &&
  116.                     CostantiProtocollo.IDENTIFICATIVO_SERIALE_STATIC.equals(tipo) == false &&
  117.                     CostantiProtocollo.IDENTIFICATIVO_SERIALE_DYNAMIC.equals(tipo) == false ){
  118.                 String msg = "Riscontrato errore durante la lettura della proprieta': 'org.openspcoop2.protocol.spcoop.id.tipo': tipo non gestito";
  119.                 this.log.error(msg);
  120.                 throw new ProtocolException(msg);
  121.             }
  122.             if(CostantiProtocollo.IDENTIFICATIVO_SERIALE_STATIC.equals(tipo)){
  123.                 OpenSPCoop2Properties op2Properties = OpenSPCoop2Properties.getInstance();
  124.                 Integer prefix = (op2Properties!=null) ?
  125.                         (op2Properties.getClusterIdNumerico()!=null ? Integer.valueOf(op2Properties.getClusterIdNumerico()) : null)
  126.                         : null;
  127.                 if(prefix!=null) {
  128.                     if(prefix<0 || prefix>99){
  129.                         String msg = "La generazione dell'identificativo eGov richiede un identificativo del cluster compreso tra 0 e 99";
  130.                         this.log.error(msg);
  131.                         throw new ProtocolException(msg);
  132.                     }
  133.                 }
  134.             }
  135.             else if(CostantiProtocollo.IDENTIFICATIVO_SERIALE_DYNAMIC.equals(tipo)){
  136.                 OpenSPCoop2Properties op2Properties = OpenSPCoop2Properties.getInstance();
  137.                 if(op2Properties!=null && !op2Properties.isClusterDinamico()) {
  138.                     String msg = "La generazione dell'identificativo eGov richiede un identificativo del cluster dinamico";
  139.                     this.log.error(msg);
  140.                     throw new ProtocolException(msg);
  141.                 }
  142.             }
  143.             this.isHttpEmptyResponseOneWay();
  144.             this.getHttpReturnCodeEmptyResponseOneWay();
  145.             this.isHttpOneWay_PD_HTTPEmptyResponse();
  146.             this.isGenerazioneBustaErrore_strutturaMalformataHeaderProtocollo();
  147.             this.isGenerazioneBustaErrore_actorScorretto();
  148.             this.getIntervalloScadenzaBuste();
  149.             this.isRepositoryBusteFiltraBusteScaduteRispettoOraRegistrazione();
  150.             this.getIntervalloMinutiTolleranzaDateFuture();
  151.             this.getKeywordTipoMittenteSconosciuto();
  152.             this.getKeywordMittenteSconosciuto();
  153.             this.getSchemaXSDValidazioneXSDBusta();
  154.             this.getSchemiXSDImportatiValidazioneXSDBusta();
  155.             this.isGenerazioneElementiNonValidabiliRispettoXSD();
  156.             this.isIgnoraEccezioniNonGravi();
  157.             this.isGenerazioneListaEccezioniErroreProcessamento();
  158.            
  159.            
  160.             /* **** MANIFEST **** */
  161.             this.getRoleRichiestaManifest();
  162.             this.getRoleRispostaManifest();
  163.             this.getRoleAllegatoManifest();
  164.            
  165.            
  166.             /* **** SOAP FAULT **** */
  167.            
  168.             this.isGenerazioneDetailsSOAPFaultProtocolValidazione();
  169.             this.isGenerazioneDetailsSOAPFaultProtocolProcessamento();
  170.             this.isGenerazioneDetailsSOAPFaultProtocolWithStackTrace();
  171.             this.isGenerazioneDetailsSOAPFaultProtocolConInformazioniGeneriche();
  172.             this.isGenerazioneDetailsSOAPFaultIntegrationServerError();
  173.             this.isGenerazioneDetailsSOAPFaultIntegrationClientError();
  174.             this.isGenerazioneDetailsSOAPFaultIntegrationWithStackTrace();
  175.             this.isGenerazioneDetailsSOAPFaultIntegrazionConInformazioniGeneriche();
  176.             this.isAggiungiDetailErroreApplicativo_SoapFaultApplicativo();
  177.             this.isAggiungiDetailErroreApplicativo_SoapFaultPdD();
  178.            
  179.            
  180.             /* **** PACKAGE CNIPA **** */
  181.            
  182.             this.isGestionePackageSICA();
  183.            
  184.            
  185.             /* **** Prefisso 'SOAP_ENV' **** */
  186.            
  187.             this.isAddPrefixSOAPENV();

  188.            
  189.             /* **** Static instance config **** */
  190.            
  191.             this.useConfigStaticInstance();
  192.             this.useErroreApplicativoStaticInstance();
  193.             this.useEsitoStaticInstance();
  194.             this.getStaticInstanceConfig();
  195.            
  196.         }catch(java.lang.Exception e) {
  197.             String msg = "Riscontrato errore durante la validazione della proprieta' del protocollo SPCoop, "+e.getMessage();
  198.             this.log.error(msg,e);
  199.             throw new ProtocolException(msg,e);
  200.         }
  201.     }




  202.     /* **** LIBRERIA **** */

  203.     /**
  204.      * Restituisce il tipo di gestione dell'identificatore intrapresa dalla porta di dominio
  205.      *
  206.      * @return Restituisce il tipo di gestione dell'identificatore intrapresa dalla porta di dominio
  207.      */
  208.     private String tipoSeriale_IdentificativoBusta = null;
  209.     public String getTipoSeriale_IdentificativoBusta() throws ProtocolException {
  210.         if(this.tipoSeriale_IdentificativoBusta == null){
  211.             try{
  212.                 String name = null;
  213.                 name = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.id.tipo");
  214.                 if(name==null)
  215.                     throw new Exception("proprieta non definita");
  216.                 this.tipoSeriale_IdentificativoBusta  = name.trim();
  217.             }catch(java.lang.Exception e) {
  218.                 String msg = "Riscontrato errore durante la lettura della proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.id.tipo': "+e.getMessage();
  219.                 this.log.error(msg,e);
  220.                 throw new ProtocolException(msg,e);
  221.             }      
  222.         }

  223.         return this.tipoSeriale_IdentificativoBusta;
  224.     }

  225.     /**
  226.      * Il carico http di risposta per un profilo oneway (e per asincroni in modalita asincrona) non dovrebbe contenere alcun messaggio applicativo,
  227.      * come viene descritto dalla specifica SPCoop.
  228.      * Alcuni framework SOAP, invece, tendono a ritornare come messaggi di risposta a invocazioni di operation che non prevedono un output:
  229.      * - SoapEnvelope con SoapBody empty (es. <soapenv:Body />)
  230.      * - SoapEnvelope contenente msg applicativi con root element vuoto (es. <soapenv:Body><operationResponse/></soapenv:Body>)
  231.      * - ....
  232.      * La seguente opzione permette di forzare un carico http vuoto, nei casi sopra descritti,
  233.      * per la risposta generata dalla PdD in seguito alla gestione dei profili oneway (e asincroni in modalita asincrona)
  234.      *  
  235.      * @return Restituisce l'indicazione su come impostare il Carico http di risposta per un profilo oneway
  236.      *
  237.      */
  238.     private Boolean isHttpEmptyResponseOneWay = null;
  239.     public boolean isHttpEmptyResponseOneWay(){
  240.         if(this.isHttpEmptyResponseOneWay==null){
  241.             try{  
  242.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.oneway.httpEmptyResponse");

  243.                 if (value != null){
  244.                     value = value.trim();
  245.                     this.isHttpEmptyResponseOneWay = Boolean.parseBoolean(value);
  246.                 }else{
  247.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.oneway.httpEmptyResponse' non impostata, viene utilizzato il default=true");
  248.                     this.isHttpEmptyResponseOneWay = true;
  249.                 }

  250.             }catch(java.lang.Exception e) {
  251.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.oneway.httpEmptyResponse' non impostata, viene utilizzato il default=true, errore:"+e.getMessage());
  252.                 this.isHttpEmptyResponseOneWay = true;
  253.             }
  254.         }

  255.         return this.isHttpEmptyResponseOneWay;
  256.     }

  257.     /**
  258.      * Il return code di una risposta http, come descritto nella specifica http://www.ws-i.org/profiles/basicprofile-1.1.html (3.4.4),
  259.      * puo' assumere entrambi i valori 200 o 202, in caso il carico http di risposta non contiene una soap envelope.
  260.      * La seguente opzione permette di impostare il return code generato dalla PdD in seguito alla gestione dei profili oneway (e asincroni in modalita asincrona)
  261.      *  
  262.      * @return Restituisce l'indicazione su come impostare il return code http di risposta per un profilo oneway
  263.      *
  264.      */
  265.     private Integer getHttpReturnCodeEmptyResponseOneWay = null;
  266.     public Integer getHttpReturnCodeEmptyResponseOneWay(){
  267.         if(this.getHttpReturnCodeEmptyResponseOneWay==null){
  268.             try{  
  269.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.oneway.httpEmptyResponse.returnCode");

  270.                 if (value != null){
  271.                     value = value.trim();
  272.                     this.getHttpReturnCodeEmptyResponseOneWay = Integer.parseInt(value);
  273.                     if(this.getHttpReturnCodeEmptyResponseOneWay!=200 && this.getHttpReturnCodeEmptyResponseOneWay!=202){
  274.                         throw new Exception("Unici valori ammessi sono 200 o 202, trovato ["+this.getHttpReturnCodeEmptyResponseOneWay+"]");
  275.                     }
  276.                 }else{
  277.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.oneway.httpEmptyResponse.returnCode' non impostata, viene utilizzato il default=200");
  278.                     this.getHttpReturnCodeEmptyResponseOneWay = 200;
  279.                 }

  280.             }catch(java.lang.Exception e) {
  281.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.oneway.httpEmptyResponse.returnCode' non impostata, viene utilizzato il default=200, errore: "+e.getMessage());
  282.                 this.getHttpReturnCodeEmptyResponseOneWay = 200;
  283.             }
  284.         }

  285.         return this.getHttpReturnCodeEmptyResponseOneWay;
  286.     }

  287.     /**
  288.      * Restituisce l'indicazione su come impostare il Carico http di risposta per un profilo oneway puo' essere:
  289.      * - vuoto con codice http 202 (true)
  290.      * - msg soap vuoto con codice http 200 (false)
  291.      *  
  292.      * @return Restituisce l'indicazione su come impostare il Carico http di risposta per un profilo oneway
  293.      *
  294.      */
  295.     private Boolean isHttpOneWay_PD_HTTPEmptyResponse = null;
  296.     public boolean isHttpOneWay_PD_HTTPEmptyResponse(){
  297.         if(this.isHttpOneWay_PD_HTTPEmptyResponse==null){
  298.             try{  
  299.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.oneway.httpEmptyResponse.bodyEmptyWithHeader.enable");

  300.                 if (value != null){
  301.                     value = value.trim();
  302.                     this.isHttpOneWay_PD_HTTPEmptyResponse = Boolean.parseBoolean(value);
  303.                 }else{
  304.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.oneway.httpEmptyResponse.bodyEmptyWithHeader.enable' non impostata, viene utilizzato il default=true");
  305.                     this.isHttpOneWay_PD_HTTPEmptyResponse = true;
  306.                 }

  307.             }catch(java.lang.Exception e) {
  308.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.oneway.httpEmptyResponse.bodyEmptyWithHeader.enable' non impostata, viene utilizzato il default=true, errore:"+e.getMessage());
  309.                 this.isHttpOneWay_PD_HTTPEmptyResponse = true;
  310.             }
  311.         }

  312.         return this.isHttpOneWay_PD_HTTPEmptyResponse;
  313.     }
  314.    
  315.     private Boolean isResponseMessageWithTransportCodeError_blockedTransaction = null;
  316.     public boolean isResponseMessageWithTransportCodeError_blockedTransaction(){
  317.         if(this.isResponseMessageWithTransportCodeError_blockedTransaction==null){
  318.             try{  
  319.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.responseMessageWithTransportCodeError.blockedTransaction");

  320.                 if (value != null){
  321.                     value = value.trim();
  322.                     this.isResponseMessageWithTransportCodeError_blockedTransaction = Boolean.parseBoolean(value);
  323.                 }else{
  324.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.responseMessageWithTransportCodeError.blockedTransaction' non impostata, viene utilizzato il default=true");
  325.                     this.isResponseMessageWithTransportCodeError_blockedTransaction = true;
  326.                 }

  327.             }catch(java.lang.Exception e) {
  328.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.responseMessageWithTransportCodeError.blockedTransaction' non impostata, viene utilizzato il default=true, errore:"+e.getMessage());
  329.                 this.isResponseMessageWithTransportCodeError_blockedTransaction = true;
  330.             }
  331.         }

  332.         return this.isResponseMessageWithTransportCodeError_blockedTransaction;
  333.     }



  334.     /**
  335.      * Indicazione se ritornare solo SoapFault o busteErrore in caso di buste con struttura malformata.
  336.      *  
  337.      * @return Indicazione se ritornare solo SoapFault o busteErrore in caso di buste con struttura malformata.
  338.      *
  339.      */
  340.     private Boolean isGenerazioneBustaErrore_strutturaMalformataHeaderBusta = null;
  341.     public boolean isGenerazioneBustaErrore_strutturaMalformataHeaderProtocollo(){
  342.         if(this.isGenerazioneBustaErrore_strutturaMalformataHeaderBusta==null){
  343.             try{  
  344.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.strutturaHeaderNonCorretta.generazioneBustaRisposta");

  345.                 if (value != null){
  346.                     value = value.trim();
  347.                     this.isGenerazioneBustaErrore_strutturaMalformataHeaderBusta = Boolean.parseBoolean(value);
  348.                 }else{
  349.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.strutturaHeaderNonCorretta.generazioneBustaRisposta' non impostata, viene utilizzato il default=false");
  350.                     this.isGenerazioneBustaErrore_strutturaMalformataHeaderBusta = false;
  351.                 }

  352.             }catch(java.lang.Exception e) {
  353.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.strutturaHeaderNonCorretta.generazioneBustaRisposta' non impostata, viene utilizzato il default=false, errore:"+e.getMessage());
  354.                 this.isGenerazioneBustaErrore_strutturaMalformataHeaderBusta = false;
  355.             }
  356.         }

  357.         return this.isGenerazioneBustaErrore_strutturaMalformataHeaderBusta;
  358.     }

  359.     /**
  360.      * Indicazione se ritornare solo SoapFault o buste in caso di buste con actor scorretto.
  361.      *  
  362.      * @return Indicazione se ritornare solo SoapFault o buste in caso di buste con actor scorretto.
  363.      *
  364.      */
  365.     private Boolean isGenerazioneBustaErrore_actorScorretto = null;
  366.     public boolean isGenerazioneBustaErrore_actorScorretto(){
  367.         if(this.isGenerazioneBustaErrore_actorScorretto==null){
  368.             try{  
  369.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.strutturaHeaderNonCorretta.actorNonCorretto.generazioneBustaRisposta");

  370.                 if (value != null){
  371.                     value = value.trim();
  372.                     this.isGenerazioneBustaErrore_actorScorretto = Boolean.parseBoolean(value);
  373.                 }else{
  374.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.strutturaHeaderNonCorretta.actorNonCorretto.generazioneBustaRisposta' non impostata, viene utilizzato il default=true");
  375.                     this.isGenerazioneBustaErrore_actorScorretto = true;
  376.                 }

  377.             }catch(java.lang.Exception e) {
  378.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.strutturaHeaderNonCorretta.actorNonCorretto.generazioneBustaRisposta' non impostata, viene utilizzato il default=true, errore:"+e.getMessage());
  379.                 this.isGenerazioneBustaErrore_actorScorretto = true;
  380.             }
  381.         }

  382.         return this.isGenerazioneBustaErrore_actorScorretto;
  383.     }

  384.     /**
  385.      * Restituisce l'intervallo di scadenza delle buste
  386.      *
  387.      * @return Restituisce l'intervallo di scadenza delle buste
  388.      *
  389.      */
  390.     private Long intervalloScadenzaBuste = null;
  391.     public long getIntervalloScadenzaBuste() throws ProtocolException {
  392.         if(this.intervalloScadenzaBuste==null){
  393.             try{
  394.                 String name = null;
  395.                 name = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.scadenzaMessaggio");
  396.                 if(name==null)
  397.                     throw new Exception("non definita");
  398.                 name = name.trim();
  399.                 this.intervalloScadenzaBuste = java.lang.Long.parseLong(name);

  400.                 if(this.intervalloScadenzaBuste<=0){
  401.                     if(this.intervalloScadenzaBuste!=-1){
  402.                         throw new Exception("Valore non valido ["+this.intervalloScadenzaBuste+"].");          
  403.                     }
  404.                 }

  405.             }catch(java.lang.Exception e) {
  406.                 String msg = "Riscontrato errore durante la lettura della proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.scadenzaMessaggio': "+e.getMessage();
  407.                 this.log.error(msg,e);
  408.                 throw new ProtocolException(msg,e);
  409.             }  
  410.         }

  411.         return this.intervalloScadenzaBuste;
  412.     }
  413.    
  414.     private Integer dateFutureIntervalloTolleranza = null;
  415.     public int getIntervalloMinutiTolleranzaDateFuture() {  
  416.         if(this.dateFutureIntervalloTolleranza==null){
  417.             try{
  418.                 String name = null;
  419.                 name = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.date.intervalloTolleranza");
  420.                 if(name!=null){
  421.                     name = name.trim();
  422.                     this.dateFutureIntervalloTolleranza = java.lang.Integer.parseInt(name);
  423.                 }else{
  424.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.date.intervalloTolleranza' non impostata, viene utilizzato il default=-1 (accettate qualsiasi date future)");
  425.                     this.dateFutureIntervalloTolleranza = -1;
  426.                 }
  427.             }catch(java.lang.Exception e) {
  428.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.date.intervalloTolleranza' non impostata, viene utilizzato il default=-1 (accettate qualsiasi date future): "+e.getMessage());
  429.                 this.dateFutureIntervalloTolleranza = -1;
  430.             }  
  431.         }

  432.         return this.dateFutureIntervalloTolleranza;
  433.     }
  434.     public boolean isCheckTolleranzaDateFutureAttivo(){
  435.         return getIntervalloMinutiTolleranzaDateFuture() > 0;
  436.     }
  437.    

  438.     /**
  439.      * Restituisce Indicazione se filtrare le buste scadute rispetto all'ora di registrazione
  440.      *
  441.      * @return Indicazione se filtrare le buste scadute rispetto all'ora di registrazione
  442.      *
  443.      */
  444.     private Boolean repositoryBusteFiltraBusteScaduteRispettoOraRegistrazione = null;
  445.     public boolean isRepositoryBusteFiltraBusteScaduteRispettoOraRegistrazione() {  
  446.         if(this.repositoryBusteFiltraBusteScaduteRispettoOraRegistrazione==null){
  447.             try{
  448.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.scadenzaMessaggio.filtraBusteScaduteRispettoOraRegistrazione");
  449.                 if(value==null){
  450.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.scadenzaMessaggio.filtraBusteScaduteRispettoOraRegistrazione' non definita (Viene utilizzato il default:true)");
  451.                     this.repositoryBusteFiltraBusteScaduteRispettoOraRegistrazione = true;
  452.                 }else{
  453.                     this.repositoryBusteFiltraBusteScaduteRispettoOraRegistrazione = Boolean.parseBoolean(value);
  454.                 }
  455.             }catch(java.lang.Exception e) {
  456.                 this.log.warn("Riscontrato errore durante la lettura della proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.scadenzaMessaggio.filtraBusteScaduteRispettoOraRegistrazione' (Viene utilizzato il default:true): "+e.getMessage());
  457.                 this.repositoryBusteFiltraBusteScaduteRispettoOraRegistrazione = true;
  458.             }    
  459.         }

  460.         return this.repositoryBusteFiltraBusteScaduteRispettoOraRegistrazione;
  461.     }

  462.     /**
  463.      * Keyword utilizzata per identificare il tipo mittente di una busta dove il tipo mittente non e' indicato
  464.      *  
  465.      * @return Keyword utilizzata per identificare il tipo mittente di una busta dove il tipo mittente non e' indicato
  466.      *
  467.      */
  468.     private String getKeywordTipoMittenteSconosciuto = null;
  469.     public String getKeywordTipoMittenteSconosciuto(){
  470.         if(this.getKeywordTipoMittenteSconosciuto==null){
  471.             try{  
  472.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.mittenteSconosciuto.tipo");

  473.                 if (value != null){
  474.                     value = value.trim();
  475.                     this.getKeywordTipoMittenteSconosciuto = value;
  476.                 }else{
  477.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.mittenteSconosciuto.tipo' non impostata, viene utilizzato il default=Sconosciuto");
  478.                     this.getKeywordTipoMittenteSconosciuto = "Sconosciuto";
  479.                 }

  480.             }catch(java.lang.Exception e) {
  481.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.mittenteSconosciuto.tipo' non impostata, viene utilizzato il default=Sconosciuto, errore:"+e.getMessage());
  482.                 this.getKeywordTipoMittenteSconosciuto = "Sconosciuto";
  483.             }
  484.         }

  485.         return this.getKeywordTipoMittenteSconosciuto;
  486.     }

  487.     /**
  488.      * Keyword utilizzata per identificare il mittente di una busta dove il tipo mittente non e' indicato
  489.      *  
  490.      * @return Keyword utilizzata per identificare il mittente di una busta dove il tipo mittente non e' indicato
  491.      *
  492.      */
  493.     private String getKeywordMittenteSconosciuto = null;
  494.     public String getKeywordMittenteSconosciuto(){
  495.         if(this.getKeywordMittenteSconosciuto==null){
  496.             try{  
  497.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.mittenteSconosciuto.nome");

  498.                 if (value != null){
  499.                     value = value.trim();
  500.                     this.getKeywordMittenteSconosciuto = value;
  501.                 }else{
  502.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.mittenteSconosciuto.nome' non impostata, viene utilizzato il default=Sconosciuto");
  503.                     this.getKeywordMittenteSconosciuto = "Sconosciuto";
  504.                 }

  505.             }catch(java.lang.Exception e) {
  506.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.mittenteSconosciuto.nome' non impostata, viene utilizzato il default=Sconosciuto, errore:"+e.getMessage());
  507.                 this.getKeywordMittenteSconosciuto = "Sconosciuto";
  508.             }
  509.         }

  510.         return this.getKeywordMittenteSconosciuto;
  511.     }


  512.     private String getSchemaXSDValidazioneXSDBusta = null;
  513.     public String getSchemaXSDValidazioneXSDBusta(){
  514.         if(this.getSchemaXSDValidazioneXSDBusta==null){
  515.             String defaultSchema = "Busta.xsd";
  516.             try{  
  517.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.validazione_xsd.schema");

  518.                 if (value != null){
  519.                     value = value.trim();
  520.                     this.getSchemaXSDValidazioneXSDBusta = value;
  521.                 }else{
  522.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.validazione_xsd.schema' non impostata, viene utilizzato il default=["+defaultSchema+"]");
  523.                     this.getSchemaXSDValidazioneXSDBusta = defaultSchema;
  524.                 }

  525.             }catch(java.lang.Exception e) {
  526.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.validazione_xsd.schema' non impostata, viene utilizzato il default=["+defaultSchema+"], errore:"+e.getMessage());
  527.                 this.getSchemaXSDValidazioneXSDBusta = defaultSchema;
  528.             }
  529.         }

  530.         return this.getSchemaXSDValidazioneXSDBusta;
  531.     }


  532.     private String [] schemiImportatiValidazioneXSDBusta = null;
  533.     public String[] getSchemiXSDImportatiValidazioneXSDBusta(){

  534.         String defaults = "soapEnvelope.xsd,wssecurityUtility.xsd";
  535.         String [] arrayDefault = {"soapEnvelope.xsd","wssecurityUtility.xsd"};

  536.         if(this.schemiImportatiValidazioneXSDBusta==null){
  537.             try{  
  538.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.validazione_xsd.schemiImportati");

  539.                 if (value != null){
  540.                     value = value.trim();
  541.                     this.schemiImportatiValidazioneXSDBusta = value.split(",");
  542.                     if(this.schemiImportatiValidazioneXSDBusta==null || this.schemiImportatiValidazioneXSDBusta.length<=0){
  543.                         throw new Exception("schemi non definiti");
  544.                     }
  545.                     else{
  546.                         for(int i=0;i<this.schemiImportatiValidazioneXSDBusta.length;i++){
  547.                             this.schemiImportatiValidazioneXSDBusta[i] = this.schemiImportatiValidazioneXSDBusta[i].trim();
  548.                         }
  549.                     }
  550.                 }else{
  551.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.validazione_xsd.schemiImportati' non impostata, viene utilizzato il default="+defaults);
  552.                     this.schemiImportatiValidazioneXSDBusta = arrayDefault;
  553.                 }

  554.             }catch(java.lang.Exception e) {
  555.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.validazione_xsd.schemiImportati' non impostata, viene utilizzato il default="+defaults+", errore:"+e.getMessage());
  556.                 this.schemiImportatiValidazioneXSDBusta = arrayDefault;
  557.             }
  558.         }

  559.         return this.schemiImportatiValidazioneXSDBusta;
  560.     }

  561.     /**
  562.      * Indicazione se devono essere generati in risposte errore, elementi non validabili rispetto xsd.
  563.      *  
  564.      * @return Indicazione se devono essere generati in risposte errore, elementi non validabili rispetto xsd.
  565.      *
  566.      */
  567.     private Boolean isGenerazioneElementiNonValidabiliRispettoXSD = null;
  568.     public boolean isGenerazioneElementiNonValidabiliRispettoXSD(){
  569.         if(this.isGenerazioneElementiNonValidabiliRispettoXSD==null){
  570.             try{  
  571.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.generazioneElementiNonValidabiliRispettoXSD");

  572.                 if (value != null){
  573.                     value = value.trim();
  574.                     this.isGenerazioneElementiNonValidabiliRispettoXSD = Boolean.parseBoolean(value);
  575.                 }else{
  576.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.generazioneElementiNonValidabiliRispettoXSD' non impostata, viene utilizzato il default=false");
  577.                     this.isGenerazioneElementiNonValidabiliRispettoXSD = false;
  578.                 }

  579.             }catch(java.lang.Exception e) {
  580.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.generazioneElementiNonValidabiliRispettoXSD' non impostata, viene utilizzato il default=false, errore:"+e.getMessage());
  581.                 this.isGenerazioneElementiNonValidabiliRispettoXSD = false;
  582.             }
  583.         }

  584.         return this.isGenerazioneElementiNonValidabiliRispettoXSD;
  585.     }
  586.    
  587.     /**
  588.      * Indicazione se ritenere errore eccezioni di livello non gravi
  589.      *  
  590.      * @return Indicazione se ritenere errore eccezioni di livello non gravi
  591.      *
  592.      */
  593.     private Boolean isBustaErrore_EccezioniNonGravi = null;
  594.     public boolean isIgnoraEccezioniNonGravi(){
  595.         if(this.isBustaErrore_EccezioniNonGravi==null){
  596.             try{  
  597.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.bustaErrore.ignoraEccezioniNonGravi.enable");

  598.                 if (value != null){
  599.                     value = value.trim();
  600.                     this.isBustaErrore_EccezioniNonGravi = Boolean.parseBoolean(value);
  601.                 }else{
  602.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.bustaErrore.ignoraEccezioniNonGravi.enable' non impostata, viene utilizzato il default=false");
  603.                     this.isBustaErrore_EccezioniNonGravi = false;
  604.                 }

  605.             }catch(java.lang.Exception e) {
  606.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.bustaErrore.ignoraEccezioniNonGravi.enable' non impostata, viene utilizzato il default=false, errore:"+e.getMessage());
  607.                 this.isBustaErrore_EccezioniNonGravi = false;
  608.             }
  609.         }

  610.         return this.isBustaErrore_EccezioniNonGravi;
  611.     }

  612.      /**
  613.      * Indicazione se generare MessaggipErrore Processamento senza ListaEccezione
  614.      *  
  615.      * @return Indicazione se generare MessaggiErrore Processamento senza ListaEccezione
  616.      *
  617.      */
  618.     private Boolean isGenerazioneListaEccezioniErroreProcessamento = null;
  619.     public boolean isGenerazioneListaEccezioniErroreProcessamento(){
  620.         if(this.isGenerazioneListaEccezioniErroreProcessamento==null){
  621.             try{  
  622.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.eccezioneProcessamento.generazioneListaEccezioni");
  623.                 if (value != null){
  624.                     value = value.trim();
  625.                     this.isGenerazioneListaEccezioniErroreProcessamento = Boolean.parseBoolean(value);
  626.                 }else{
  627.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.eccezioneProcessamento.generazioneListaEccezioni' non impostata, viene utilizzato il default=false");
  628.                     this.isGenerazioneListaEccezioniErroreProcessamento = false;
  629.                 }
  630.                
  631.             }catch(java.lang.Exception e) {
  632.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.eccezioneProcessamento.generazioneListaEccezioni' non impostata, viene utilizzato il default=false, errore:"+e.getMessage());
  633.                 this.isGenerazioneListaEccezioniErroreProcessamento = false;
  634.             }
  635.         }
  636.        
  637.         return this.isGenerazioneListaEccezioniErroreProcessamento;
  638.     }
  639.    

  640.    
  641.    
  642.    
  643.    
  644.     /* **** MANIFEST **** */
  645.        
  646.     /**
  647.      * Restituisce Attributo 'role' di un elemento 'Riferimento' di un descrittore presente in un manifest
  648.      * Valore utilizzato per identificare una richiesta
  649.      *  
  650.      * @return Restituisce Attributo 'role' di un elemento 'Riferimento' di un descrittore presente in un manifest, valore utilizzato per identificare una richiesta
  651.      *
  652.      */
  653.     private String roleRichiestaManifest = null;
  654.     public String getRoleRichiestaManifest(){

  655.         if(this.roleRichiestaManifest==null){
  656.             try{  
  657.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.manifestAttachments.role.richiesta");

  658.                 if (value != null){
  659.                     value = value.trim();
  660.                     this.roleRichiestaManifest = value;
  661.                 }else{
  662.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.manifestAttachments.role.richiesta' non impostata, viene utilizzato il default="+SPCoopCostanti.ATTACHMENTS_MANIFEST_RICHIESTA);
  663.                     this.roleRichiestaManifest = SPCoopCostanti.ATTACHMENTS_MANIFEST_RICHIESTA;
  664.                 }

  665.             }catch(java.lang.Exception e) {
  666.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.manifestAttachments.role.richiesta' non impostata, viene utilizzato il default="+SPCoopCostanti.ATTACHMENTS_MANIFEST_RICHIESTA+", errore:"+e.getMessage());
  667.                 this.roleRichiestaManifest = SPCoopCostanti.ATTACHMENTS_MANIFEST_RICHIESTA;
  668.             }
  669.         }

  670.         return this.roleRichiestaManifest;
  671.     }

  672.     /**
  673.      * Restituisce Attributo 'role' di un elemento 'Riferimento' di un descrittore presente in un manifest
  674.      * Valore utilizzato per identificare una risposta
  675.      *  
  676.      * @return Restituisce Attributo 'role' di un elemento 'Riferimento' di un descrittore presente in un manifest, valore utilizzato per identificare una risposta
  677.      *
  678.      */
  679.     private String roleRispostaManifest = null;
  680.     public String getRoleRispostaManifest(){

  681.         if(this.roleRispostaManifest==null){
  682.             try{  
  683.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.manifestAttachments.role.risposta");

  684.                 if (value != null){
  685.                     value = value.trim();
  686.                     this.roleRispostaManifest = value;
  687.                 }else{
  688.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.manifestAttachments.role.risposta' non impostata, viene utilizzato il default="+SPCoopCostanti.ATTACHMENTS_MANIFEST_RISPOSTA);
  689.                     this.roleRispostaManifest = SPCoopCostanti.ATTACHMENTS_MANIFEST_RISPOSTA;
  690.                 }

  691.             }catch(java.lang.Exception e) {
  692.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.manifestAttachments.role.risposta' non impostata, viene utilizzato il default="+SPCoopCostanti.ATTACHMENTS_MANIFEST_RISPOSTA+", errore:"+e.getMessage());
  693.                 this.roleRispostaManifest = SPCoopCostanti.ATTACHMENTS_MANIFEST_RISPOSTA;
  694.             }
  695.         }

  696.         return this.roleRispostaManifest;
  697.     }

  698.     /**
  699.      * Restituisce Attributo 'role' di un elemento 'Riferimento' di un descrittore presente in un manifest
  700.      * Valore utilizzato per identificare un allegato
  701.      *  
  702.      * @return Restituisce Attributo 'role' di un elemento 'Riferimento' di un descrittore presente in un manifest, valore utilizzato per identificare un allegato
  703.      *
  704.      */
  705.     private String roleAllegatoManifest = null;
  706.     public String getRoleAllegatoManifest(){

  707.         if(this.roleAllegatoManifest==null){
  708.             try{  
  709.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.manifestAttachments.role.allegato");

  710.                 if (value != null){
  711.                     value = value.trim();
  712.                     this.roleAllegatoManifest = value;
  713.                 }else{
  714.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.manifestAttachments.role.richiesta' non impostata, viene utilizzato il default="+SPCoopCostanti.ATTACHMENTS_MANIFEST_ALLEGATO);
  715.                     this.roleAllegatoManifest = SPCoopCostanti.ATTACHMENTS_MANIFEST_ALLEGATO;
  716.                 }

  717.             }catch(java.lang.Exception e) {
  718.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.manifestAttachments.role.richiesta' non impostata, viene utilizzato il default="+SPCoopCostanti.ATTACHMENTS_MANIFEST_ALLEGATO+", errore:"+e.getMessage());
  719.                 this.roleAllegatoManifest = SPCoopCostanti.ATTACHMENTS_MANIFEST_ALLEGATO;
  720.             }
  721.         }

  722.         return this.roleAllegatoManifest;
  723.     }

  724.     /**
  725.      * Indicazione se i riferimenti presenti all'interno del Manifest 'eGov_IT:Riferimento' nell'attributo 'href'
  726.      * devono contenere i caratteri '<' e '>' dei Content-ID che riferiscono gli attachments
  727.      *  
  728.      * @return Indicazione se generare i caratteri '<' e '>' dei Content-ID che riferiscono gli attachments
  729.      *
  730.      */
  731.     private Boolean generateManifestAttachmentsIdWithBrackets = null;
  732.     public boolean isGenerateManifestAttachmentsIdWithBrackets(){
  733.         if(this.generateManifestAttachmentsIdWithBrackets==null){
  734.             try{  
  735.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.manifestAttachments.id.brackets");
  736.                
  737.                 if (value != null){
  738.                     value = value.trim();
  739.                     this.generateManifestAttachmentsIdWithBrackets = Boolean.parseBoolean(value);
  740.                 }else{
  741.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.manifestAttachments.id.brackets' non impostata, viene utilizzato il default=false");
  742.                     this.generateManifestAttachmentsIdWithBrackets = false;
  743.                 }
  744.                
  745.             }catch(java.lang.Exception e) {
  746.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.manifestAttachments.id.brackets' non impostata, viene utilizzato il default=false, errore:"+e.getMessage());
  747.                 this.generateManifestAttachmentsIdWithBrackets = false;
  748.             }
  749.         }
  750.        
  751.         return this.generateManifestAttachmentsIdWithBrackets;
  752.     }
  753.    
  754.    
  755.    
  756.    
  757.    
  758.    
  759.    
  760.    
  761.     /* **** SOAP FAULT (Protocollo, Porta Applicativa) **** */
  762.    
  763.     /**
  764.      * Indicazione se generare i details in caso di SOAPFault *_001 (senza buste Errore)
  765.      *  
  766.      * @return Indicazione se generare i details in caso di SOAPFault *_001 (senza buste Errore)
  767.      *
  768.      */
  769.     private Boolean isGenerazioneDetailsSOAPFaultProtocolValidazione = null;
  770.     public boolean isGenerazioneDetailsSOAPFaultProtocolValidazione(){
  771.         if(this.isGenerazioneDetailsSOAPFaultProtocolValidazione==null){
  772.             try{  
  773.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.protocol.eccezioneIntestazione");
  774.                
  775.                 if (value != null){
  776.                     value = value.trim();
  777.                     this.isGenerazioneDetailsSOAPFaultProtocolValidazione = Boolean.parseBoolean(value);
  778.                 }else{
  779.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.protocol.eccezioneIntestazione' non impostata, viene utilizzato il default=false");
  780.                     this.isGenerazioneDetailsSOAPFaultProtocolValidazione = false;
  781.                 }
  782.                
  783.             }catch(java.lang.Exception e) {
  784.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.protocol.eccezioneIntestazione' non impostata, viene utilizzato il default=false, errore:"+e.getMessage());
  785.                 this.isGenerazioneDetailsSOAPFaultProtocolValidazione = false;
  786.             }
  787.         }
  788.        
  789.         return this.isGenerazioneDetailsSOAPFaultProtocolValidazione;
  790.     }
  791.    
  792.     /**
  793.      * Indicazione se generare i details in caso di SOAPFault *_300
  794.      *  
  795.      * @return Indicazione se generare i details in caso di SOAPFault *_300
  796.      *
  797.      */
  798.     private Boolean isGenerazioneDetailsSOAPFaultProtocolProcessamento = null;
  799.     public boolean isGenerazioneDetailsSOAPFaultProtocolProcessamento(){
  800.         if(this.isGenerazioneDetailsSOAPFaultProtocolProcessamento==null){
  801.             try{  
  802.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.protocol.eccezioneProcessamento");
  803.                
  804.                 if (value != null){
  805.                     value = value.trim();
  806.                     this.isGenerazioneDetailsSOAPFaultProtocolProcessamento = Boolean.parseBoolean(value);
  807.                 }else{
  808.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.protocol.eccezioneProcessamento' non impostata, viene utilizzato il default=true");
  809.                     this.isGenerazioneDetailsSOAPFaultProtocolProcessamento = true;
  810.                 }
  811.                
  812.             }catch(java.lang.Exception e) {
  813.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.protocol.eccezioneProcessamento' non impostata, viene utilizzato il default=true, errore:"+e.getMessage());
  814.                 this.isGenerazioneDetailsSOAPFaultProtocolProcessamento = true;
  815.             }
  816.         }
  817.        
  818.         return this.isGenerazioneDetailsSOAPFaultProtocolProcessamento;
  819.     }
  820.    
  821.    
  822.     /**
  823.      * Indicazione se generare nei details in caso di SOAPFault *_300 lo stack trace
  824.      *  
  825.      * @return Indicazione se generare nei details in caso di SOAPFault *_300 lo stack trace
  826.      *
  827.      */
  828.     private Boolean isGenerazioneDetailsSOAPFaultProtocolWithStackTrace = null;
  829.     public boolean isGenerazioneDetailsSOAPFaultProtocolWithStackTrace(){
  830.         if(this.isGenerazioneDetailsSOAPFaultProtocolWithStackTrace==null){
  831.             try{  
  832.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.protocol.stackTrace");
  833.                
  834.                 if (value != null){
  835.                     value = value.trim();
  836.                     this.isGenerazioneDetailsSOAPFaultProtocolWithStackTrace = Boolean.parseBoolean(value);
  837.                 }else{
  838.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.protocol.stackTrace' non impostata, viene utilizzato il default=false");
  839.                     this.isGenerazioneDetailsSOAPFaultProtocolWithStackTrace = false;
  840.                 }
  841.                
  842.             }catch(java.lang.Exception e) {
  843.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.protocol.stackTrace' non impostata, viene utilizzato il default=false, errore:"+e.getMessage());
  844.                 this.isGenerazioneDetailsSOAPFaultProtocolWithStackTrace = false;
  845.             }
  846.         }
  847.        
  848.         return this.isGenerazioneDetailsSOAPFaultProtocolWithStackTrace;
  849.     }
  850.    
  851.     /**
  852.      * Indicazione se generare nei details in caso di SOAPFault informazioni generiche
  853.      *  
  854.      * @return Indicazione se generare nei details in caso di SOAPFault informazioni generiche
  855.      *
  856.      */
  857.     private Boolean isGenerazioneDetailsSOAPFaultProtocolConInformazioniGeneriche = null;
  858.     public boolean isGenerazioneDetailsSOAPFaultProtocolConInformazioniGeneriche(){
  859.         if(this.isGenerazioneDetailsSOAPFaultProtocolConInformazioniGeneriche==null){
  860.             try{  
  861.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.protocol.informazioniGeneriche");
  862.                
  863.                 if (value != null){
  864.                     value = value.trim();
  865.                     this.isGenerazioneDetailsSOAPFaultProtocolConInformazioniGeneriche = Boolean.parseBoolean(value);
  866.                 }else{
  867.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.protocol.informazioniGeneriche' non impostata, viene utilizzato il default=true");
  868.                     this.isGenerazioneDetailsSOAPFaultProtocolConInformazioniGeneriche = true;
  869.                 }
  870.                
  871.             }catch(java.lang.Exception e) {
  872.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.protocol.informazioniGeneriche' non impostata, viene utilizzato il default=true, errore:"+e.getMessage());
  873.                 this.isGenerazioneDetailsSOAPFaultProtocolConInformazioniGeneriche = true;
  874.             }
  875.         }
  876.        
  877.         return this.isGenerazioneDetailsSOAPFaultProtocolConInformazioniGeneriche;
  878.     }
  879.    
  880.    
  881.    
  882.     /* **** SOAP FAULT (Integrazione, Porta Delegata) **** */
  883.    
  884.     /**
  885.      * Indicazione se generare i details in Casi di errore 5XX
  886.      *  
  887.      * @return Indicazione se generare i details in Casi di errore 5XX
  888.      *
  889.      */
  890.     private Boolean isGenerazioneDetailsSOAPFaultIntegrationServerError = null;
  891.     public boolean isGenerazioneDetailsSOAPFaultIntegrationServerError(){
  892.         if(this.isGenerazioneDetailsSOAPFaultIntegrationServerError==null){
  893.             try{  
  894.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.integration.serverError");
  895.                
  896.                 if (value != null){
  897.                     value = value.trim();
  898.                     this.isGenerazioneDetailsSOAPFaultIntegrationServerError = Boolean.parseBoolean(value);
  899.                 }else{
  900.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.integration.serverError' non impostata, viene utilizzato il default=true");
  901.                     this.isGenerazioneDetailsSOAPFaultIntegrationServerError = true;
  902.                 }
  903.                
  904.             }catch(java.lang.Exception e) {
  905.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.integration.serverError' non impostata, viene utilizzato il default=true, errore:"+e.getMessage());
  906.                 this.isGenerazioneDetailsSOAPFaultIntegrationServerError = true;
  907.             }
  908.         }
  909.        
  910.         return this.isGenerazioneDetailsSOAPFaultIntegrationServerError;
  911.     }
  912.    
  913.     /**
  914.      * Indicazione se generare i details in Casi di errore 4XX
  915.      *  
  916.      * @return Indicazione se generare i details in Casi di errore 4XX
  917.      *
  918.      */
  919.     private Boolean isGenerazioneDetailsSOAPFaultIntegrationClientError = null;
  920.     public boolean isGenerazioneDetailsSOAPFaultIntegrationClientError(){
  921.         if(this.isGenerazioneDetailsSOAPFaultIntegrationClientError==null){
  922.             try{  
  923.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.integration.clientError");
  924.                
  925.                 if (value != null){
  926.                     value = value.trim();
  927.                     this.isGenerazioneDetailsSOAPFaultIntegrationClientError = Boolean.parseBoolean(value);
  928.                 }else{
  929.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.integration.clientError' non impostata, viene utilizzato il default=false");
  930.                     this.isGenerazioneDetailsSOAPFaultIntegrationClientError = false;
  931.                 }
  932.                
  933.             }catch(java.lang.Exception e) {
  934.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.integration.clientError' non impostata, viene utilizzato il default=false, errore:"+e.getMessage());
  935.                 this.isGenerazioneDetailsSOAPFaultIntegrationClientError = false;
  936.             }
  937.         }
  938.        
  939.         return this.isGenerazioneDetailsSOAPFaultIntegrationClientError;
  940.     }
  941.    
  942.     /**
  943.      * Indicazione se generare nei details lo stack trace all'interno
  944.      *  
  945.      * @return Indicazione se generare nei details lo stack trace all'interno
  946.      *
  947.      */
  948.     private Boolean isGenerazioneDetailsSOAPFaultIntegrationWithStackTrace = null;
  949.     public boolean isGenerazioneDetailsSOAPFaultIntegrationWithStackTrace(){
  950.         if(this.isGenerazioneDetailsSOAPFaultIntegrationWithStackTrace==null){
  951.             try{  
  952.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.integration.stackTrace");
  953.                
  954.                 if (value != null){
  955.                     value = value.trim();
  956.                     this.isGenerazioneDetailsSOAPFaultIntegrationWithStackTrace = Boolean.parseBoolean(value);
  957.                 }else{
  958.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.integration.stackTrace' non impostata, viene utilizzato il default=false");
  959.                     this.isGenerazioneDetailsSOAPFaultIntegrationWithStackTrace = false;
  960.                 }
  961.                
  962.             }catch(java.lang.Exception e) {
  963.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.integration.stackTrace' non impostata, viene utilizzato il default=false, errore:"+e.getMessage());
  964.                 this.isGenerazioneDetailsSOAPFaultIntegrationWithStackTrace = false;
  965.             }
  966.         }
  967.        
  968.         return this.isGenerazioneDetailsSOAPFaultIntegrationWithStackTrace;
  969.     }
  970.    
  971.     /**
  972.      * Indicazione se generare nei details informazioni dettagliate o solo di carattere generale
  973.      *  
  974.      * @return Indicazione se generare nei details informazioni dettagliate o solo di carattere generale
  975.      *
  976.      */
  977.     private Boolean isGenerazioneDetailsSOAPFaultIntegrationConInformazioniGeneriche= null;
  978.     private Boolean isGenerazioneDetailsSOAPFaultIntegrationConInformazioniGenericheRead= null;
  979.     public Boolean isGenerazioneDetailsSOAPFaultIntegrazionConInformazioniGeneriche(){
  980.         if(this.isGenerazioneDetailsSOAPFaultIntegrationConInformazioniGenericheRead==null){
  981.             try{  
  982.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.integration.informazioniGeneriche");
  983.                
  984.                 if (value != null){
  985.                     value = value.trim();
  986.                     this.isGenerazioneDetailsSOAPFaultIntegrationConInformazioniGeneriche = Boolean.parseBoolean(value);
  987.                 }else{
  988.                     this.log.debug("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.integration.informazioniGeneriche' non impostata, viene utilizzato il default associato al Servizio Applicativo (faultAsGenericCode)");
  989.                     this.isGenerazioneDetailsSOAPFaultIntegrationConInformazioniGeneriche = null;
  990.                 }
  991.                
  992.                 this.isGenerazioneDetailsSOAPFaultIntegrationConInformazioniGenericheRead = true;
  993.                
  994.             }catch(java.lang.Exception e) {
  995.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.generazioneDetailsSoapFault.integration.informazioniGeneriche' non impostata, viene utilizzato il default associato al Servizio Applicativo (faultAsGenericCode), errore:"+e.getMessage());
  996.                 this.isGenerazioneDetailsSOAPFaultIntegrationConInformazioniGeneriche = null;
  997.                
  998.                 this.isGenerazioneDetailsSOAPFaultIntegrationConInformazioniGenericheRead = true;
  999.             }
  1000.         }
  1001.        
  1002.         return this.isGenerazioneDetailsSOAPFaultIntegrationConInformazioniGeneriche;
  1003.     }
  1004.    
  1005.    
  1006.     /* **** SOAP FAULT (Generati dagli attori esterni) **** */
  1007.    
  1008.     /**
  1009.      * Indicazione se aggiungere un detail contenente descrizione dell'errore nel SoapFaultApplicativo originale
  1010.      *  
  1011.      * @return Indicazione se aggiungere un detail contenente descrizione dell'errore nel SoapFaultApplicativo originale
  1012.      *
  1013.      */
  1014.     private BooleanNullable isAggiungiDetailErroreApplicativo_SoapFaultApplicativo= null;
  1015.     private Boolean isAggiungiDetailErroreApplicativo_SoapFaultApplicativoRead= null;
  1016.     public BooleanNullable isAggiungiDetailErroreApplicativo_SoapFaultApplicativo(){
  1017.         if(this.isAggiungiDetailErroreApplicativo_SoapFaultApplicativoRead==null){
  1018.             try{  
  1019.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.erroreApplicativo.faultApplicativo.enrichDetails");
  1020.                
  1021.                 if (value != null){
  1022.                     value = value.trim();
  1023.                     Boolean b = Boolean.parseBoolean(value);
  1024.                     this.isAggiungiDetailErroreApplicativo_SoapFaultApplicativo = b ? BooleanNullable.TRUE() : BooleanNullable.FALSE();
  1025.                 }else{
  1026.                     this.log.debug("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.erroreApplicativo.faultApplicativo.enrichDetails' non impostata, viene utilizzato il default associato al Servizio Applicativo (faultApplicativo.enrichDetails)");
  1027.                     this.isAggiungiDetailErroreApplicativo_SoapFaultApplicativo = BooleanNullable.NULL();
  1028.                 }
  1029.                
  1030.                 this.isAggiungiDetailErroreApplicativo_SoapFaultApplicativoRead = true;
  1031.                
  1032.             }catch(java.lang.Exception e) {
  1033.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.erroreApplicativo.faultApplicativo.enrichDetails' non impostata, viene utilizzato il default associato al Servizio Applicativo (faultApplicativo.enrichDetails), errore:"+e.getMessage());
  1034.                 this.isAggiungiDetailErroreApplicativo_SoapFaultApplicativo = BooleanNullable.NULL();
  1035.                
  1036.                 this.isAggiungiDetailErroreApplicativo_SoapFaultApplicativoRead = true;
  1037.             }
  1038.         }
  1039.        
  1040.         return this.isAggiungiDetailErroreApplicativo_SoapFaultApplicativo;
  1041.     }
  1042.    
  1043.     /**
  1044.      * Indicazione se aggiungere un detail contenente descrizione dell'errore nel SoapFaultPdD originale
  1045.      *  
  1046.      * @return Indicazione se aggiungere un detail contenente descrizione dell'errore nel SoapFaultPdD originale
  1047.      *
  1048.      */
  1049.     private BooleanNullable isAggiungiDetailErroreApplicativo_SoapFaultPdD= null;
  1050.     private Boolean isAggiungiDetailErroreApplicativo_SoapFaultPdDRead= null;
  1051.     public BooleanNullable isAggiungiDetailErroreApplicativo_SoapFaultPdD(){
  1052.         if(this.isAggiungiDetailErroreApplicativo_SoapFaultPdDRead==null){
  1053.             try{  
  1054.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.erroreApplicativo.faultPdD.enrichDetails");
  1055.                
  1056.                 if (value != null){
  1057.                     value = value.trim();
  1058.                     Boolean b = Boolean.parseBoolean(value);
  1059.                     this.isAggiungiDetailErroreApplicativo_SoapFaultPdD = b ? BooleanNullable.TRUE() : BooleanNullable.FALSE();
  1060.                 }else{
  1061.                     this.log.debug("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.erroreApplicativo.faultPdD.enrichDetails' non impostata, viene utilizzato il default associato al Servizio Applicativo (faultPdD.enrichDetails)");
  1062.                     this.isAggiungiDetailErroreApplicativo_SoapFaultPdD = BooleanNullable.NULL();
  1063.                 }
  1064.                
  1065.                 this.isAggiungiDetailErroreApplicativo_SoapFaultPdDRead = true;
  1066.                
  1067.             }catch(java.lang.Exception e) {
  1068.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.erroreApplicativo.faultPdD.enrichDetails' non impostata, viene utilizzato il default associato al Servizio Applicativo (faultPdD.enrichDetails), errore:"+e.getMessage());
  1069.                 this.isAggiungiDetailErroreApplicativo_SoapFaultPdD = BooleanNullable.NULL();
  1070.                
  1071.                 this.isAggiungiDetailErroreApplicativo_SoapFaultPdDRead = true;
  1072.             }
  1073.         }
  1074.        
  1075.         return this.isAggiungiDetailErroreApplicativo_SoapFaultPdD;
  1076.     }
  1077.    
  1078.    
  1079.    
  1080.    
  1081.     /* **** Package CNIPA **** */
  1082.    
  1083.     private Boolean isGestionePackageSICA= null;
  1084.     public Boolean isGestionePackageSICA(){
  1085.         if(this.isGestionePackageSICA==null){
  1086.             try{  
  1087.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.spcoop.packageSICA");
  1088.                
  1089.                 if (value != null){
  1090.                     value = value.trim();
  1091.                     this.isGestionePackageSICA = Boolean.parseBoolean(value);
  1092.                 }else{
  1093.                     this.log.debug("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.packageSICA' non impostata, viene utilizzato il default=false");
  1094.                     this.isGestionePackageSICA = false;
  1095.                 }
  1096.                
  1097.             }catch(java.lang.Exception e) {
  1098.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.spcoop.packageSICA' non impostata, viene utilizzato il default=false, errore:"+e.getMessage());
  1099.                 this.isGestionePackageSICA = false;
  1100.             }
  1101.         }
  1102.        
  1103.         return this.isGestionePackageSICA;
  1104.     }
  1105.    
  1106.    
  1107.    
  1108.     /* **** Prefisso 'SOAP_ENV' **** */
  1109.    
  1110.     private Boolean isAddPrefixSOAPENV= null;
  1111.     public Boolean isAddPrefixSOAPENV(){
  1112.         if(this.isAddPrefixSOAPENV==null){
  1113.             String pName = "org.openspcoop2.protocol.spcoop.addPrefixSOAP_ENV";
  1114.             try{  
  1115.                 String value = this.reader.getValueConvertEnvProperties(pName);
  1116.                
  1117.                 if (value != null){
  1118.                     value = value.trim();
  1119.                     this.isAddPrefixSOAPENV = Boolean.parseBoolean(value);
  1120.                 }else{
  1121.                     this.log.debug("Proprieta' di openspcoop '"+pName+"' non impostata, viene utilizzato il default=false");
  1122.                     this.isAddPrefixSOAPENV = false;
  1123.                 }
  1124.                
  1125.             }catch(java.lang.Exception e) {
  1126.                 this.log.warn("Proprieta' di openspcoop '"+pName+"' non impostata, viene utilizzato il default=false, errore:"+e.getMessage());
  1127.                 this.isAddPrefixSOAPENV = false;
  1128.             }
  1129.         }
  1130.        
  1131.         return this.isAddPrefixSOAPENV;
  1132.     }
  1133.    
  1134.    
  1135.    
  1136.     /* **** Static instance config **** */
  1137.    
  1138.     private Boolean useConfigStaticInstance = null;
  1139.     private Boolean useConfigStaticInstance(){
  1140.         if(this.useConfigStaticInstance==null){
  1141.            
  1142.             Boolean defaultValue = true;
  1143.             String propertyName = "org.openspcoop2.protocol.spcoop.factory.config.staticInstance";
  1144.            
  1145.             try{  
  1146.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  1147.                 if (value != null){
  1148.                     value = value.trim();
  1149.                     this.useConfigStaticInstance = Boolean.parseBoolean(value);
  1150.                 }else{
  1151.                     this.log.debug("Proprieta' di openspcoop '"+propertyName+"' non impostata, viene utilizzato il default="+defaultValue);
  1152.                     this.useConfigStaticInstance = defaultValue;
  1153.                 }

  1154.             }catch(java.lang.Exception e) {
  1155.                 this.log.debug("Proprieta' di openspcoop '"+propertyName+"' non impostata, viene utilizzato il default="+defaultValue+", errore:"+e.getMessage());
  1156.                 this.useConfigStaticInstance = defaultValue;
  1157.             }
  1158.         }

  1159.         return this.useConfigStaticInstance;
  1160.     }
  1161.    
  1162.     private Boolean useErroreApplicativoStaticInstance = null;
  1163.     private Boolean useErroreApplicativoStaticInstance(){
  1164.         if(this.useErroreApplicativoStaticInstance==null){
  1165.            
  1166.             Boolean defaultValue = true;
  1167.             String propertyName = "org.openspcoop2.protocol.spcoop.factory.erroreApplicativo.staticInstance";
  1168.            
  1169.             try{  
  1170.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  1171.                 if (value != null){
  1172.                     value = value.trim();
  1173.                     this.useErroreApplicativoStaticInstance = Boolean.parseBoolean(value);
  1174.                 }else{
  1175.                     this.log.debug("Proprieta' di openspcoop '"+propertyName+"' non impostata, viene utilizzato il default="+defaultValue);
  1176.                     this.useErroreApplicativoStaticInstance = defaultValue;
  1177.                 }

  1178.             }catch(java.lang.Exception e) {
  1179.                 this.log.debug("Proprieta' di openspcoop '"+propertyName+"' non impostata, viene utilizzato il default="+defaultValue+", errore:"+e.getMessage());
  1180.                 this.useErroreApplicativoStaticInstance = defaultValue;
  1181.             }
  1182.         }

  1183.         return this.useErroreApplicativoStaticInstance;
  1184.     }
  1185.    
  1186.     private Boolean useEsitoStaticInstance = null;
  1187.     private Boolean useEsitoStaticInstance(){
  1188.         if(this.useEsitoStaticInstance==null){
  1189.            
  1190.             Boolean defaultValue = true;
  1191.             String propertyName = "org.openspcoop2.protocol.spcoop.factory.esito.staticInstance";
  1192.            
  1193.             try{  
  1194.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  1195.                 if (value != null){
  1196.                     value = value.trim();
  1197.                     this.useEsitoStaticInstance = Boolean.parseBoolean(value);
  1198.                 }else{
  1199.                     this.log.debug("Proprieta' di openspcoop '"+propertyName+"' non impostata, viene utilizzato il default="+defaultValue);
  1200.                     this.useEsitoStaticInstance = defaultValue;
  1201.                 }

  1202.             }catch(java.lang.Exception e) {
  1203.                 this.log.debug("Proprieta' di openspcoop '"+propertyName+"' non impostata, viene utilizzato il default="+defaultValue+", errore:"+e.getMessage());
  1204.                 this.useEsitoStaticInstance = defaultValue;
  1205.             }
  1206.         }

  1207.         return this.useEsitoStaticInstance;
  1208.     }
  1209.    
  1210.     private BasicStaticInstanceConfig staticInstanceConfig = null;
  1211.     public BasicStaticInstanceConfig getStaticInstanceConfig(){
  1212.         if(this.staticInstanceConfig==null){
  1213.             this.staticInstanceConfig = new BasicStaticInstanceConfig();
  1214.             if(useConfigStaticInstance()!=null) {
  1215.                 this.staticInstanceConfig.setStaticConfig(useConfigStaticInstance());
  1216.             }
  1217.             if(useErroreApplicativoStaticInstance()!=null) {
  1218.                 this.staticInstanceConfig.setStaticErrorBuilder(useErroreApplicativoStaticInstance());
  1219.             }
  1220.             if(useEsitoStaticInstance()!=null) {
  1221.                 this.staticInstanceConfig.setStaticEsitoBuilder(useEsitoStaticInstance());
  1222.             }
  1223.         }
  1224.         return this.staticInstanceConfig;
  1225.     }
  1226. }