SDIProperties.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.sdi.config;

  21. import java.util.ArrayList;
  22. import java.util.List;
  23. import java.util.Properties;

  24. import org.openspcoop2.protocol.basic.BasicStaticInstanceConfig;
  25. import org.openspcoop2.protocol.sdk.ProtocolException;
  26. import org.openspcoop2.utils.BooleanNullable;
  27. import org.openspcoop2.utils.LoggerWrapperFactory;
  28. import org.openspcoop2.utils.resources.Loader;
  29. import org.slf4j.Logger;

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

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


  40.     /** Copia Statica */
  41.     private static SDIProperties sdiProperties = null;

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

  43.     /** Reader delle proprieta' impostate nel file 'sdi.properties' */
  44.     private SDIInstanceProperties reader;





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

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

  52.         if(log != null)
  53.             this.log = log;
  54.         else
  55.             this.log = LoggerWrapperFactory.getLogger("SDIProperties");

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

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

  81.     }

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

  88.         if(SDIProperties.sdiProperties==null)
  89.             SDIProperties.sdiProperties = new SDIProperties(confDir,log);  

  90.     }

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

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

  105.         return SDIProperties.sdiProperties;
  106.     }




  107.     public void validaConfigurazione(Loader loader) throws ProtocolException  {
  108.         try{  

  109.             this.getTipoSoggettoSDI();
  110.             this.getNomeSoggettoSDI();

  111.             this.isEnableGenerazioneMessaggiCompatibilitaNamespaceSenzaGov();
  112.             this.isEnableValidazioneMessaggiCompatibilitaNamespaceSenzaGov();
  113.            
  114.             this.isEnableValidazioneNomeFile();
  115.            
  116.             this.isEnableValidazioneXsdFatturaDaInviare();
  117.             this.isEnable_fatturazioneAttiva_notifiche_enrichInfoFromFattura();
  118.             this.isEnable_fatturazioneAttiva_generazioneNomeFileFattura();
  119.             this.isEnable_fatturazioneAttiva_generazioneNomeFileFatturaOpzionale();
  120.            
  121.             this.isEnableValidazioneXsdNotificaDaInviare();
  122.             this.isEnableAccessoNotificaDaInviare();
  123.             this.isEnable_InputIdSDIValidationAsBigInteger_NotificaDaInviare();
  124.             this.isEnable_fatturazionePassiva_consegnaFileMetadati();
  125.             this.isEnable_fatturazionePassiva_notifiche_enrichInfoFromFattura();
  126.             this.isEnable_fatturazionePassiva_generazioneNomeFileEsito();
  127.            
  128.             if(this.isTracciamentoRequiredFromConfiguration()) {
  129.                 if(this.getTracciamentoDatasource()==null) {
  130.                     throw new Exception("Datasource non definito per l'accesso al database delle tracce");
  131.                 }
  132.                 this.getTracciamentoDatasource_jndiContext();
  133.                 this.getTracciamentoTipoDatabase();
  134.             }
  135.            
  136.             this.isEnableAccessoMetadati();
  137.             this.isEnableAccessoFattura();
  138.             this.isEnableAccessoMessaggi();
  139.            
  140.             this.isEnableAccessoMetadatiWarningMode();
  141.             this.isEnableAccessoFatturaWarningMode();
  142.             this.isEnableAccessoMessaggiWarningMode();
  143.            
  144.             this.isEnableValidazioneXsdMetadati();
  145.             this.isEnableValidazioneXsdFattura();
  146.             this.isEnableValidazioneXsdMessaggi();
  147.            
  148.             this.isEnableValidazioneCampiInterniMetadati();
  149.             this.isEnableValidazioneCampiInterniFattura();
  150.             this.isEnableValidazioneCampiInterniMessaggi();
  151.            
  152.             this.isSaveFatturaInContext();
  153.             this.isSaveMessaggiInContext();
  154.            
  155.             this.isNotificaATConsegnaSoloAttestato();
  156.            
  157.             this.getSoggettiWhiteList();
  158.             this.getServiziWhiteList();
  159.             this.getAzioniWhiteList();
  160.             this.getNamespaceWhiteList();
  161.            
  162.             this.isAggiungiDetailErroreApplicativo_SoapFaultApplicativo();
  163.             this.isAggiungiDetailErroreApplicativo_SoapFaultPdD();
  164.             this.isGenerazioneDetailsSOAPFaultProtocolValidazione();
  165.             this.isGenerazioneDetailsSOAPFaultProtocolProcessamento();
  166.             this.isGenerazioneDetailsSOAPFaultProtocolWithStackTrace();
  167.             this.isGenerazioneDetailsSOAPFaultProtocolConInformazioniGeneriche();
  168.            
  169.             this.isGenerazioneDetailsSOAPFaultIntegrationServerError();
  170.             this.isGenerazioneDetailsSOAPFaultIntegrationClientError();
  171.             this.isGenerazioneDetailsSOAPFaultIntegrationWithStackTrace();
  172.             this.isGenerazioneDetailsSOAPFaultIntegrazionConInformazioniGeneriche();
  173.            
  174.             this.isPortaApplicativaBustaErrore_personalizzaElementiFault();
  175.             this.isPortaApplicativaBustaErrore_aggiungiErroreApplicativo();
  176.            
  177.             this.useConfigStaticInstance();
  178.             this.useErroreApplicativoStaticInstance();
  179.             this.useEsitoStaticInstance();
  180.             this.getStaticInstanceConfig();
  181.            
  182.         }catch(java.lang.Exception e) {
  183.             String msg = "Riscontrato errore durante la validazione della proprieta' del protocollo sdi, "+e.getMessage();
  184.             this.log.error(msg,e);
  185.             throw new ProtocolException(msg,e);
  186.         }
  187.     }


  188.     /**
  189.      * Tipo Soggetto Sistema di Interscambio
  190.      *  
  191.      * @return Tipo Soggetto Sistema di Interscambio
  192.      *
  193.      */
  194.     private String tipoSoggettoSDI = null;
  195.     public String getTipoSoggettoSDI() throws ProtocolException{
  196.         if(this.tipoSoggettoSDI==null){
  197.            
  198.             String propertyName = "org.openspcoop2.protocol.sdi.soggetto.tipo";
  199.            
  200.             try{  
  201.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  202.                 if (value != null){
  203.                     value = value.trim();
  204.                     this.tipoSoggettoSDI = value;
  205.                 }else{
  206.                     throw new Exception("Non definita");
  207.                 }

  208.             }catch(java.lang.Exception e) {
  209.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  210.                 this.log.error(msg,e);
  211.                 throw new ProtocolException(msg,e);
  212.             }
  213.         }

  214.         return this.tipoSoggettoSDI;
  215.     }
  216.    
  217.     /**
  218.      * Nome Soggetto Sistema di Interscambio
  219.      *  
  220.      * @return Nome Soggetto Sistema di Interscambio
  221.      *
  222.      */
  223.     private String nomeSoggettoSDI = null;
  224.     public String getNomeSoggettoSDI() throws ProtocolException{
  225.         if(this.nomeSoggettoSDI==null){
  226.            
  227.             String propertyName = "org.openspcoop2.protocol.sdi.soggetto.nome";
  228.            
  229.             try{  
  230.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  231.                 if (value != null){
  232.                     value = value.trim();
  233.                     this.nomeSoggettoSDI = value;
  234.                 }else{
  235.                     throw new Exception("Non definita");
  236.                 }

  237.             }catch(java.lang.Exception e) {
  238.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  239.                 this.log.error(msg,e);
  240.                 throw new ProtocolException(msg,e);
  241.             }
  242.         }

  243.         return this.nomeSoggettoSDI;
  244.     }
  245.    
  246.     /**
  247.      * Indicazione se abiltiare la Compatibilita' sulle Notifiche da inviare con  Namespace errato 'http://www.fatturapa.it/sdi/messaggi/v1.0'
  248.      *  
  249.      * @return Indicazione se abiltiare la Compatibilita' sulle Notifiche da inviare con  Namespace errato 'http://www.fatturapa.it/sdi/messaggi/v1.0'
  250.      *
  251.      */
  252.     private Boolean isEnableGenerazioneMessaggiCompatibilitaNamespaceSenzaGov = null;
  253.     public Boolean isEnableGenerazioneMessaggiCompatibilitaNamespaceSenzaGov() throws ProtocolException{
  254.         if(this.isEnableGenerazioneMessaggiCompatibilitaNamespaceSenzaGov==null){
  255.            
  256.             String propertyName = "org.openspcoop2.protocol.sdi.generazione.messaggi.compatibilitaNamespaceSenzaGov";
  257.            
  258.             try{  
  259.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  260.                 if (value != null){
  261.                     value = value.trim();
  262.                     this.isEnableGenerazioneMessaggiCompatibilitaNamespaceSenzaGov = Boolean.parseBoolean(value);
  263.                 }else{
  264.                     throw new Exception("Non definita");
  265.                 }

  266.             }catch(java.lang.Exception e) {
  267.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  268.                 this.log.error(msg,e);
  269.                 throw new ProtocolException(msg,e);
  270.             }
  271.         }

  272.         return this.isEnableGenerazioneMessaggiCompatibilitaNamespaceSenzaGov;
  273.     }
  274.    
  275.     /**
  276.      * Indicazione se abiltiare la Compatibilita' sulle Notifiche ricevute con  Namespace errato 'http://www.fatturapa.it/sdi/messaggi/v1.0'
  277.      *  
  278.      * @return Indicazione se abiltiare la Compatibilita' sulle Notifiche ricevute con  Namespace errato 'http://www.fatturapa.it/sdi/messaggi/v1.0'
  279.      *
  280.      */
  281.     private Boolean isEnableValidazioneMessaggiCompatibilitaNamespaceSenzaGov = null;
  282.     public Boolean isEnableValidazioneMessaggiCompatibilitaNamespaceSenzaGov() throws ProtocolException{
  283.         if(this.isEnableValidazioneMessaggiCompatibilitaNamespaceSenzaGov==null){
  284.            
  285.             String propertyName = "org.openspcoop2.protocol.sdi.validazione.messaggi.compatibilitaNamespaceSenzaGov";
  286.            
  287.             try{  
  288.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  289.                 if (value != null){
  290.                     value = value.trim();
  291.                     this.isEnableValidazioneMessaggiCompatibilitaNamespaceSenzaGov = Boolean.parseBoolean(value);
  292.                 }else{
  293.                     throw new Exception("Non definita");
  294.                 }

  295.             }catch(java.lang.Exception e) {
  296.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  297.                 this.log.error(msg,e);
  298.                 throw new ProtocolException(msg,e);
  299.             }
  300.         }

  301.         return this.isEnableValidazioneMessaggiCompatibilitaNamespaceSenzaGov;
  302.     }
  303.    
  304.     /**
  305.      * Indicazione se effettuare la validazione dei nomi di file
  306.      *  
  307.      * @return Indicazione se effettuare la validazione dei nomi di file
  308.      *
  309.      */
  310.     private Boolean isEnableValidazioneNomeFile = null;
  311.     public Boolean isEnableValidazioneNomeFile() throws ProtocolException{
  312.         if(this.isEnableValidazioneNomeFile==null){
  313.            
  314.             String propertyName = "org.openspcoop2.protocol.sdi.validazione.nomeFile.enable";
  315.            
  316.             try{  
  317.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  318.                 if (value != null){
  319.                     value = value.trim();
  320.                     this.isEnableValidazioneNomeFile = Boolean.parseBoolean(value);
  321.                 }else{
  322.                     throw new Exception("Non definita");
  323.                 }

  324.             }catch(java.lang.Exception e) {
  325.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  326.                 this.log.error(msg,e);
  327.                 throw new ProtocolException(msg,e);
  328.             }
  329.         }

  330.         return this.isEnableValidazioneNomeFile;
  331.     }

  332.     /**
  333.      * Indicazione se effettuare la validazione xsd della fattura da inviare
  334.      *  
  335.      * @return Indicazione se effettuare la validazione xsd della fattura da inviare
  336.      *
  337.      */
  338.     private Boolean isEnableValidazioneXsdFatturaDaInviare = null;
  339.     public Boolean isEnableValidazioneXsdFatturaDaInviare() throws ProtocolException{
  340.         if(this.isEnableValidazioneXsdFatturaDaInviare==null){
  341.            
  342.             String propertyName = "org.openspcoop2.protocol.sdi.validazione.xsd.fatturaDaInviare";
  343.            
  344.             try{  
  345.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  346.                 if (value != null){
  347.                     value = value.trim();
  348.                     this.isEnableValidazioneXsdFatturaDaInviare = Boolean.parseBoolean(value);
  349.                 }else{
  350.                     throw new Exception("Non definita");
  351.                 }

  352.             }catch(java.lang.Exception e) {
  353.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  354.                 this.log.error(msg,e);
  355.                 throw new ProtocolException(msg,e);
  356.             }
  357.         }

  358.         return this.isEnableValidazioneXsdFatturaDaInviare;
  359.     }
  360.    
  361.     /**
  362.      * Indicazione se accedere al database delle tracce per aggiungere alle notifiche informazioni prese dalla fattura inviata precedentemente (es. IdTrasmittente (IdPaese + IdCodice), Applicativo che ha inviato la fattura).
  363.      *  
  364.      * @return Indicazione se accedere al database delle tracce per aggiungere alle notifiche informazioni prese dalla fattura inviata precedentemente (es. IdTrasmittente (IdPaese + IdCodice), Applicativo che ha inviato la fattura).
  365.      *
  366.      */
  367.     private Boolean isEnable_fatturazioneAttiva_notifiche_enrichInfoFromFattura = null;
  368.     public Boolean isEnable_fatturazioneAttiva_notifiche_enrichInfoFromFattura() throws ProtocolException{
  369.         if(this.isEnable_fatturazioneAttiva_notifiche_enrichInfoFromFattura==null){
  370.            
  371.             String propertyName = "org.openspcoop2.protocol.sdi.fatturazioneAttiva.notifiche.enrichInfoFromFattura";
  372.            
  373.             try{  
  374.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  375.                 if (value != null){
  376.                     value = value.trim();
  377.                     this.isEnable_fatturazioneAttiva_notifiche_enrichInfoFromFattura = Boolean.parseBoolean(value);
  378.                 }else{
  379.                     throw new Exception("Non definita");
  380.                 }

  381.             }catch(java.lang.Exception e) {
  382.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  383.                 this.log.error(msg,e);
  384.                 throw new ProtocolException(msg,e);
  385.             }
  386.         }

  387.         return this.isEnable_fatturazioneAttiva_notifiche_enrichInfoFromFattura;
  388.     }
  389.    
  390.     /**
  391.      * Indicazione se il nome file associato alla fattura viene generato da GovWay o viene fornito dall'Applicativo mittente.
  392.      *  
  393.      * @return Indicazione se il nome file associato alla fattura viene generato da GovWay o viene fornito dall'Applicativo mittente.
  394.      *
  395.      */
  396.     private Boolean isEnable_fatturazioneAttiva_generazioneNomeFileFattura = null;
  397.     public Boolean isEnable_fatturazioneAttiva_generazioneNomeFileFattura() throws ProtocolException{
  398.         if(this.isEnable_fatturazioneAttiva_generazioneNomeFileFattura==null){
  399.            
  400.             String propertyName = "org.openspcoop2.protocol.sdi.fatturazioneAttiva.nomeFile.gestione";
  401.            
  402.             try{  
  403.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  404.                 if (value != null){
  405.                     value = value.trim();
  406.                     this.isEnable_fatturazioneAttiva_generazioneNomeFileFattura = Boolean.parseBoolean(value);
  407.                 }else{
  408.                     throw new Exception("Non definita");
  409.                 }

  410.             }catch(java.lang.Exception e) {
  411.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  412.                 this.log.error(msg,e);
  413.                 throw new ProtocolException(msg,e);
  414.             }
  415.         }

  416.         return this.isEnable_fatturazioneAttiva_generazioneNomeFileFattura;
  417.     }
  418.    
  419.     private Boolean isEnable_fatturazioneAttiva_generazioneNomeFileFatturaOpzionale = null;
  420.     public Boolean isEnable_fatturazioneAttiva_generazioneNomeFileFatturaOpzionale() throws ProtocolException{
  421.         if(this.isEnable_fatturazioneAttiva_generazioneNomeFileFatturaOpzionale==null){
  422.            
  423.             String propertyName = "org.openspcoop2.protocol.sdi.fatturazioneAttiva.nomeFile.gestioneOpzionale";
  424.            
  425.             try{  
  426.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  427.                 if (value != null){
  428.                     value = value.trim();
  429.                     this.isEnable_fatturazioneAttiva_generazioneNomeFileFatturaOpzionale = Boolean.parseBoolean(value);
  430.                 }else{
  431.                     this.isEnable_fatturazioneAttiva_generazioneNomeFileFatturaOpzionale = false;
  432.                 }

  433.             }catch(java.lang.Exception e) {
  434.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  435.                 this.log.error(msg,e);
  436.                 throw new ProtocolException(msg,e);
  437.             }
  438.         }

  439.         return this.isEnable_fatturazioneAttiva_generazioneNomeFileFatturaOpzionale;
  440.     }
  441.    
  442.     /**
  443.      * Indicazione se effettuare la validazione xsd della notifica da inviare
  444.      *  
  445.      * @return Indicazione se effettuare la validazione xsd della notifica da inviare
  446.      *
  447.      */
  448.     private Boolean isEnableValidazioneXsdNotificaDaInviare = null;
  449.     public Boolean isEnableValidazioneXsdNotificaDaInviare() throws ProtocolException{
  450.         if(this.isEnableValidazioneXsdNotificaDaInviare==null){
  451.            
  452.             String propertyName = "org.openspcoop2.protocol.sdi.validazione.xsd.notificaDaInviare";
  453.            
  454.             try{  
  455.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  456.                 if (value != null){
  457.                     value = value.trim();
  458.                     this.isEnableValidazioneXsdNotificaDaInviare = Boolean.parseBoolean(value);
  459.                 }else{
  460.                     throw new Exception("Non definita");
  461.                 }

  462.             }catch(java.lang.Exception e) {
  463.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  464.                 this.log.error(msg,e);
  465.                 throw new ProtocolException(msg,e);
  466.             }
  467.         }

  468.         return this.isEnableValidazioneXsdNotificaDaInviare;
  469.     }
  470.    
  471.     private Boolean isEnableAccessoNotificaDaInviare = null;
  472.     public Boolean isEnableAccessoNotificaDaInviare() throws ProtocolException{
  473.         if(this.isEnableAccessoNotificaDaInviare==null){
  474.            
  475.             String propertyName = "org.openspcoop2.protocol.sdi.access.notificaDaInviare";
  476.            
  477.             try{  
  478.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  479.                 if (value != null){
  480.                     value = value.trim();
  481.                     this.isEnableAccessoNotificaDaInviare = Boolean.parseBoolean(value);
  482.                 }else{
  483.                     throw new Exception("Non definita");
  484.                 }

  485.             }catch(java.lang.Exception e) {
  486.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  487.                 this.log.error(msg,e);
  488.                 throw new ProtocolException(msg,e);
  489.             }
  490.         }

  491.         return this.isEnableAccessoNotificaDaInviare;
  492.     }
  493.    
  494.     private Boolean isEnable_InputIdSDIValidationAsBigInteger_NotificaDaInviare = null;
  495.     public Boolean isEnable_InputIdSDIValidationAsBigInteger_NotificaDaInviare() throws ProtocolException{
  496.         if(this.isEnable_InputIdSDIValidationAsBigInteger_NotificaDaInviare==null){
  497.            
  498.             String propertyName = "org.openspcoop2.protocol.sdi.inputIdSDI.validationAsBigInteger.notificaDaInviare";
  499.            
  500.             try{  
  501.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  502.                 if (value != null){
  503.                     value = value.trim();
  504.                     this.isEnable_InputIdSDIValidationAsBigInteger_NotificaDaInviare = Boolean.parseBoolean(value);
  505.                 }else{
  506.                     throw new Exception("Non definita");
  507.                 }

  508.             }catch(java.lang.Exception e) {
  509.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  510.                 this.log.error(msg,e);
  511.                 throw new ProtocolException(msg,e);
  512.             }
  513.         }

  514.         return this.isEnable_InputIdSDIValidationAsBigInteger_NotificaDaInviare;
  515.     }
  516.    
  517.     /**
  518.      * Indicazione se serializzare il File MetaDati come header HTTP 'GovWay-SDI-FileMetadati' codificato in BASE64
  519.      *  
  520.      * @return Indicazione se serializzare il File MetaDati come header HTTP 'GovWay-SDI-FileMetadati' codificato in BASE64
  521.      *
  522.      */
  523.     private Boolean isEnable_fatturazionePassiva_consegnaFileMetadati = null;
  524.     public Boolean isEnable_fatturazionePassiva_consegnaFileMetadati() throws ProtocolException{
  525.         if(this.isEnable_fatturazionePassiva_consegnaFileMetadati==null){
  526.            
  527.             String propertyName = "org.openspcoop2.protocol.sdi.fatturazionePassiva.consegnaFileMetadati";
  528.            
  529.             try{  
  530.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  531.                 if (value != null){
  532.                     value = value.trim();
  533.                     this.isEnable_fatturazionePassiva_consegnaFileMetadati = Boolean.parseBoolean(value);
  534.                 }else{
  535.                     throw new Exception("Non definita");
  536.                 }

  537.             }catch(java.lang.Exception e) {
  538.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  539.                 this.log.error(msg,e);
  540.                 throw new ProtocolException(msg,e);
  541.             }
  542.         }

  543.         return this.isEnable_fatturazionePassiva_consegnaFileMetadati;
  544.     }
  545.    
  546.     /**
  547.      * Indicazione se accedere al database delle tracce per aggiungere alla notifica decorrenza termini informazioni prese dalla fattura ricevuta precedentemente (es. CodiceDestinatario).
  548.      *  
  549.      * @return Indicazione se accedere al database delle tracce per aggiungere alla notifica decorrenza termini informazioni prese dalla fattura ricevuta precedentemente (es. CodiceDestinatario).
  550.      *
  551.      */
  552.     private Boolean isEnable_fatturazionePassiva_notifiche_enrichInfoFromFattura = null;
  553.     public Boolean isEnable_fatturazionePassiva_notifiche_enrichInfoFromFattura() throws ProtocolException{
  554.         if(this.isEnable_fatturazionePassiva_notifiche_enrichInfoFromFattura==null){
  555.            
  556.             String propertyName = "org.openspcoop2.protocol.sdi.fatturazionePassiva.notifiche.enrichInfoFromFattura";
  557.            
  558.             try{  
  559.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  560.                 if (value != null){
  561.                     value = value.trim();
  562.                     this.isEnable_fatturazionePassiva_notifiche_enrichInfoFromFattura = Boolean.parseBoolean(value);
  563.                 }else{
  564.                     throw new Exception("Non definita");
  565.                 }

  566.             }catch(java.lang.Exception e) {
  567.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  568.                 this.log.error(msg,e);
  569.                 throw new ProtocolException(msg,e);
  570.             }
  571.         }

  572.         return this.isEnable_fatturazionePassiva_notifiche_enrichInfoFromFattura;
  573.     }
  574.    
  575.     /**
  576.      * Indicazione se il nome file associato alla fattura viene generato da GovWay o viene fornito dall'Applicativo mittente.
  577.      *  
  578.      * @return Indicazione se il nome file associato alla fattura viene generato da GovWay o viene fornito dall'Applicativo mittente.
  579.      *
  580.      */
  581.     private Boolean isEnable_fatturazionePassiva_generazioneNomeFileEsito = null;
  582.     public Boolean isEnable_fatturazionePassiva_generazioneNomeFileEsito() throws ProtocolException{
  583.         if(this.isEnable_fatturazionePassiva_generazioneNomeFileEsito==null){
  584.            
  585.             String propertyName = "org.openspcoop2.protocol.sdi.fatturazionePassiva.nomeFile.gestione";
  586.            
  587.             try{  
  588.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  589.                 if (value != null){
  590.                     value = value.trim();
  591.                     this.isEnable_fatturazionePassiva_generazioneNomeFileEsito = Boolean.parseBoolean(value);
  592.                 }else{
  593.                     throw new Exception("Non definita");
  594.                 }

  595.             }catch(java.lang.Exception e) {
  596.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  597.                 this.log.error(msg,e);
  598.                 throw new ProtocolException(msg,e);
  599.             }
  600.         }

  601.         return this.isEnable_fatturazionePassiva_generazioneNomeFileEsito;
  602.     }
  603.    
  604.     public boolean isTracciamentoRequiredFromConfiguration() throws ProtocolException {
  605.         return this.isEnable_fatturazioneAttiva_notifiche_enrichInfoFromFattura() ||
  606.                 this.isEnable_fatturazionePassiva_notifiche_enrichInfoFromFattura();
  607.     }
  608.    
  609.     private Boolean tracciamentoDatasource_read;
  610.     private String tracciamentoDatasource;
  611.     public String getTracciamentoDatasource() throws ProtocolException {
  612.         if(this.tracciamentoDatasource_read==null){
  613.             try{  
  614.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.sdi.tracce.dataSource");
  615.                
  616.                 if (value != null){
  617.                     value = value.trim();
  618.                     this.tracciamentoDatasource = value;
  619.                 }
  620.                
  621.             }catch(java.lang.Exception e) {
  622.                 this.log.error("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.tracce.dataSource', errore:"+e.getMessage());
  623.                 throw new ProtocolException(e);
  624.             }finally {
  625.                 this.tracciamentoDatasource_read = true;
  626.             }
  627.         }
  628.         return this.tracciamentoDatasource;
  629.     }
  630.    
  631.     private Boolean tracciamentoTipoDatabase_read;
  632.     private String tracciamentoTipoDatabase;
  633.     public String getTracciamentoTipoDatabase() throws ProtocolException {
  634.         if(this.tracciamentoTipoDatabase_read==null){
  635.             try{  
  636.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.sdi.tracce.tipoDatabase");
  637.                
  638.                 if (value != null){
  639.                     value = value.trim();
  640.                     this.tracciamentoTipoDatabase = value;
  641.                 }
  642.                
  643.             }catch(java.lang.Exception e) {
  644.                 this.log.error("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.tracce.tipoDatabase', errore:"+e.getMessage());
  645.                 throw new ProtocolException(e);
  646.             }finally {
  647.                 this.tracciamentoTipoDatabase_read = true;
  648.             }
  649.         }
  650.         return this.tracciamentoTipoDatabase;
  651.     }
  652.    
  653.     private Properties tracciamentoDatasource_jndiContext = null;
  654.     public Properties getTracciamentoDatasource_jndiContext() throws ProtocolException {
  655.         if(this.tracciamentoDatasource_jndiContext==null){
  656.             try{  
  657.                 this.tracciamentoDatasource_jndiContext = this.reader.readPropertiesConvertEnvProperties("org.openspcoop2.protocol.sdi.tracce.dataSource.property.");
  658.                 if (this.tracciamentoDatasource_jndiContext == null || this.tracciamentoDatasource_jndiContext.size()<0){
  659.                     this.tracciamentoDatasource_jndiContext = new Properties(); // context jndi vuoto
  660.                 }
  661.                
  662.             }catch(java.lang.Exception e) {
  663.                 this.log.error("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.tracce.dataSource.property.*', errore:"+e.getMessage());
  664.                 throw new ProtocolException(e);
  665.             }
  666.         }
  667.         return this.tracciamentoDatasource_jndiContext;
  668.     }
  669.    
  670.    
  671.     /**
  672.      * Indicazione se effettuare l'accesso ai metadati
  673.      *  
  674.      * @return Indicazione se effettuare l'accesso ai metadati
  675.      *
  676.      */
  677.     private Boolean isEnableAccessoMetadati = null;
  678.     public Boolean isEnableAccessoMetadati() throws ProtocolException{
  679.         if(this.isEnableAccessoMetadati==null){
  680.            
  681.             String propertyName = "org.openspcoop2.protocol.sdi.accesso.campiMetadati.enable";
  682.            
  683.             try{  
  684.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  685.                 if (value != null){
  686.                     value = value.trim();
  687.                     this.isEnableAccessoMetadati = Boolean.parseBoolean(value);
  688.                 }else{
  689.                     throw new Exception("Non definita");
  690.                 }

  691.             }catch(java.lang.Exception e) {
  692.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  693.                 this.log.error(msg,e);
  694.                 throw new ProtocolException(msg,e);
  695.             }
  696.         }

  697.         return this.isEnableAccessoMetadati;
  698.     }
  699.    
  700.     /**
  701.      * Indicazione se effettuare l'accesso alla fattura
  702.      *  
  703.      * @return Indicazione se effettuare l'accesso alla fattura
  704.      *
  705.      */
  706.     private Boolean isEnableAccessoFattura = null;
  707.     public Boolean isEnableAccessoFattura() throws ProtocolException{
  708.         if(this.isEnableAccessoFattura==null){
  709.            
  710.             String propertyName = "org.openspcoop2.protocol.sdi.accesso.campiFattura.enable";
  711.            
  712.             try{  
  713.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  714.                 if (value != null){
  715.                     value = value.trim();
  716.                     this.isEnableAccessoFattura = Boolean.parseBoolean(value);
  717.                 }else{
  718.                     throw new Exception("Non definita");
  719.                 }

  720.             }catch(java.lang.Exception e) {
  721.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  722.                 this.log.error(msg,e);
  723.                 throw new ProtocolException(msg,e);
  724.             }
  725.         }

  726.         return this.isEnableAccessoFattura;
  727.     }
  728.    
  729.     /**
  730.      * Indicazione se effettuare l'accesso ai messaggi
  731.      *  
  732.      * @return Indicazione se effettuare l'accesso ai messaggi
  733.      *
  734.      */
  735.     private Boolean isEnableAccessoMessaggi = null;
  736.     public Boolean isEnableAccessoMessaggi() throws ProtocolException{
  737.         if(this.isEnableAccessoMessaggi==null){
  738.            
  739.             String propertyName = "org.openspcoop2.protocol.sdi.accesso.campiMessaggi.enable";
  740.            
  741.             try{  
  742.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  743.                 if (value != null){
  744.                     value = value.trim();
  745.                     this.isEnableAccessoMessaggi = Boolean.parseBoolean(value);
  746.                 }else{
  747.                     throw new Exception("Non definita");
  748.                 }

  749.             }catch(java.lang.Exception e) {
  750.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  751.                 this.log.error(msg,e);
  752.                 throw new ProtocolException(msg,e);
  753.             }
  754.         }

  755.         return this.isEnableAccessoMessaggi;
  756.     }
  757.    
  758.     /**
  759.      * Indicazione se effettuare l'accesso ai metadati in warning mode
  760.      *  
  761.      * @return Indicazione se effettuare l'accesso ai metadati in warning mode
  762.      *
  763.      */
  764.     private Boolean isEnableAccessoMetadatiWarningMode = null;
  765.     public Boolean isEnableAccessoMetadatiWarningMode() throws ProtocolException{
  766.         if(this.isEnableAccessoMetadatiWarningMode==null){
  767.            
  768.             String propertyName = "org.openspcoop2.protocol.sdi.accesso.campiMetadati.enable.throwError";
  769.            
  770.             try{  
  771.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  772.                 if (value != null){
  773.                     value = value.trim();
  774.                     this.isEnableAccessoMetadatiWarningMode = !Boolean.parseBoolean(value);
  775.                 }else{
  776.                     throw new Exception("Non definita");
  777.                 }

  778.             }catch(java.lang.Exception e) {
  779.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  780.                 this.log.error(msg,e);
  781.                 throw new ProtocolException(msg,e);
  782.             }
  783.         }

  784.         return this.isEnableAccessoMetadatiWarningMode;
  785.     }
  786.    
  787.     /**
  788.      * Indicazione se effettuare l'accesso alla fattura in warning mode
  789.      *  
  790.      * @return Indicazione se effettuare l'accesso alla fattura in warning mode
  791.      *
  792.      */
  793.     private Boolean isEnableAccessoFatturaWarningMode = null;
  794.     public Boolean isEnableAccessoFatturaWarningMode() throws ProtocolException{
  795.         if(this.isEnableAccessoFatturaWarningMode==null){
  796.            
  797.             String propertyName = "org.openspcoop2.protocol.sdi.accesso.campiFattura.enable.throwError";
  798.            
  799.             try{  
  800.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  801.                 if (value != null){
  802.                     value = value.trim();
  803.                     this.isEnableAccessoFatturaWarningMode = !Boolean.parseBoolean(value);
  804.                 }else{
  805.                     throw new Exception("Non definita");
  806.                 }

  807.             }catch(java.lang.Exception e) {
  808.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  809.                 this.log.error(msg,e);
  810.                 throw new ProtocolException(msg,e);
  811.             }
  812.         }

  813.         return this.isEnableAccessoFatturaWarningMode;
  814.     }
  815.    
  816.     /**
  817.      * Indicazione se effettuare l'accesso ai messaggi in warning mode
  818.      *  
  819.      * @return Indicazione se effettuare l'accesso ai messaggi in warning mode
  820.      *
  821.      */
  822.     private Boolean isEnableAccessoMessaggiWarningMode = null;
  823.     public Boolean isEnableAccessoMessaggiWarningMode() throws ProtocolException{
  824.         if(this.isEnableAccessoMessaggiWarningMode==null){
  825.            
  826.             String propertyName = "org.openspcoop2.protocol.sdi.accesso.campiMessaggi.enable.throwError";
  827.            
  828.             try{  
  829.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  830.                 if (value != null){
  831.                     value = value.trim();
  832.                     this.isEnableAccessoMessaggiWarningMode = !Boolean.parseBoolean(value);
  833.                 }else{
  834.                     throw new Exception("Non definita");
  835.                 }

  836.             }catch(java.lang.Exception e) {
  837.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  838.                 this.log.error(msg,e);
  839.                 throw new ProtocolException(msg,e);
  840.             }
  841.         }

  842.         return this.isEnableAccessoMessaggiWarningMode;
  843.     }
  844.    
  845.     /**
  846.      * Indicazione se effettuare la validazione xsd dei metadati
  847.      *  
  848.      * @return Indicazione se effettuare la validazione xsd dei metadati
  849.      *
  850.      */
  851.     private Boolean isEnableValidazioneXsdMetadati = null;
  852.     public Boolean isEnableValidazioneXsdMetadati() throws ProtocolException{
  853.         if(this.isEnableValidazioneXsdMetadati==null){
  854.            
  855.             String propertyName = "org.openspcoop2.protocol.sdi.validazione.xsd.metadati";
  856.            
  857.             try{  
  858.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  859.                 if (value != null){
  860.                     value = value.trim();
  861.                     this.isEnableValidazioneXsdMetadati = Boolean.parseBoolean(value);
  862.                 }else{
  863.                     throw new Exception("Non definita");
  864.                 }

  865.             }catch(java.lang.Exception e) {
  866.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  867.                 this.log.error(msg,e);
  868.                 throw new ProtocolException(msg,e);
  869.             }
  870.         }

  871.         return this.isEnableValidazioneXsdMetadati;
  872.     }
  873.    
  874.     /**
  875.      * Indicazione se effettuare la validazione xsd della fattura
  876.      *  
  877.      * @return Indicazione se effettuare la validazione xsd della fattura
  878.      *
  879.      */
  880.     private Boolean isEnableValidazioneXsdFattura = null;
  881.     public Boolean isEnableValidazioneXsdFattura() throws ProtocolException{
  882.         if(this.isEnableValidazioneXsdFattura==null){
  883.            
  884.             String propertyName = "org.openspcoop2.protocol.sdi.validazione.xsd.fattura";
  885.            
  886.             try{  
  887.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  888.                 if (value != null){
  889.                     value = value.trim();
  890.                     this.isEnableValidazioneXsdFattura = Boolean.parseBoolean(value);
  891.                 }else{
  892.                     throw new Exception("Non definita");
  893.                 }

  894.             }catch(java.lang.Exception e) {
  895.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  896.                 this.log.error(msg,e);
  897.                 throw new ProtocolException(msg,e);
  898.             }
  899.         }

  900.         return this.isEnableValidazioneXsdFattura;
  901.     }
  902.    
  903.     /**
  904.      * Indicazione se effettuare la validazione xsd dei messaggi
  905.      *  
  906.      * @return Indicazione se effettuare la validazione xsd dei messaggi
  907.      *
  908.      */
  909.     private Boolean isEnableValidazioneXsdMessaggi = null;
  910.     public Boolean isEnableValidazioneXsdMessaggi() throws ProtocolException{
  911.         if(this.isEnableValidazioneXsdMessaggi==null){
  912.            
  913.             String propertyName = "org.openspcoop2.protocol.sdi.validazione.xsd.messaggi";
  914.            
  915.             try{  
  916.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  917.                 if (value != null){
  918.                     value = value.trim();
  919.                     this.isEnableValidazioneXsdMessaggi = Boolean.parseBoolean(value);
  920.                 }else{
  921.                     throw new Exception("Non definita");
  922.                 }

  923.             }catch(java.lang.Exception e) {
  924.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  925.                 this.log.error(msg,e);
  926.                 throw new ProtocolException(msg,e);
  927.             }
  928.         }

  929.         return this.isEnableValidazioneXsdMessaggi;
  930.     }
  931.    
  932.     /**
  933.      * Indicazione se effettuare la validazione dei campi interni ai metadati
  934.      *  
  935.      * @return Indicazione se effettuare la validazione dei campi interni ai metadati
  936.      *
  937.      */
  938.     private Boolean isEnableValidazioneCampiInterniMetadati = null;
  939.     public Boolean isEnableValidazioneCampiInterniMetadati() throws ProtocolException{
  940.         if(this.isEnableValidazioneCampiInterniMetadati==null){
  941.            
  942.             String propertyName = "org.openspcoop2.protocol.sdi.validazione.campiMetadati.enable";
  943.            
  944.             try{  
  945.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  946.                 if (value != null){
  947.                     value = value.trim();
  948.                     this.isEnableValidazioneCampiInterniMetadati = Boolean.parseBoolean(value);
  949.                 }else{
  950.                     throw new Exception("Non definita");
  951.                 }

  952.             }catch(java.lang.Exception e) {
  953.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  954.                 this.log.error(msg,e);
  955.                 throw new ProtocolException(msg,e);
  956.             }
  957.         }

  958.         return this.isEnableValidazioneCampiInterniMetadati;
  959.     }
  960.    
  961.     /**
  962.      * Indicazione se effettuare la validazione dei campi interni alla fattura
  963.      *  
  964.      * @return Indicazione se effettuare la validazione dei campi interni alla fattura
  965.      *
  966.      */
  967.     private Boolean isEnableValidazioneCampiInterniFattura = null;
  968.     public Boolean isEnableValidazioneCampiInterniFattura() throws ProtocolException{
  969.         if(this.isEnableValidazioneCampiInterniFattura==null){
  970.            
  971.             String propertyName = "org.openspcoop2.protocol.sdi.validazione.campiFattura.enable";
  972.            
  973.             try{  
  974.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  975.                 if (value != null){
  976.                     value = value.trim();
  977.                     this.isEnableValidazioneCampiInterniFattura = Boolean.parseBoolean(value);
  978.                 }else{
  979.                     throw new Exception("Non definita");
  980.                 }

  981.             }catch(java.lang.Exception e) {
  982.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  983.                 this.log.error(msg,e);
  984.                 throw new ProtocolException(msg,e);
  985.             }
  986.         }

  987.         return this.isEnableValidazioneCampiInterniFattura;
  988.     }
  989.    
  990.     /**
  991.      * Indicazione se effettuare la validazione dei campi interni ai messaggi
  992.      *  
  993.      * @return Indicazione se effettuare la validazione dei campi interni ai messaggi
  994.      *
  995.      */
  996.     private Boolean isEnableValidazioneCampiInterniMessaggi = null;
  997.     public Boolean isEnableValidazioneCampiInterniMessaggi() throws ProtocolException{
  998.         if(this.isEnableValidazioneCampiInterniMessaggi==null){
  999.            
  1000.             String propertyName = "org.openspcoop2.protocol.sdi.validazione.campiMessaggi.enable";
  1001.            
  1002.             try{  
  1003.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  1004.                 if (value != null){
  1005.                     value = value.trim();
  1006.                     this.isEnableValidazioneCampiInterniMessaggi = Boolean.parseBoolean(value);
  1007.                 }else{
  1008.                     throw new Exception("Non definita");
  1009.                 }

  1010.             }catch(java.lang.Exception e) {
  1011.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  1012.                 this.log.error(msg,e);
  1013.                 throw new ProtocolException(msg,e);
  1014.             }
  1015.         }

  1016.         return this.isEnableValidazioneCampiInterniMessaggi;
  1017.     }
  1018.    
  1019.        
  1020.    
  1021.    
  1022.     /**
  1023.      * Indicazione se effettuare il salvataggio della fattura letta nel context
  1024.      *  
  1025.      * @return Indicazione se effettuare il salvataggio della fattura letta nel context
  1026.      *
  1027.      */
  1028.     private Boolean isSaveFatturaInContext = null;
  1029.     public Boolean isSaveFatturaInContext() throws ProtocolException{
  1030.         if(this.isSaveFatturaInContext==null){
  1031.            
  1032.             String propertyName = "org.openspcoop2.protocol.sdi.parse.fattura.saveInContext";
  1033.            
  1034.             try{  
  1035.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  1036.                 if (value != null){
  1037.                     value = value.trim();
  1038.                     this.isSaveFatturaInContext = Boolean.parseBoolean(value);
  1039.                 }else{
  1040.                     throw new Exception("Non definita");
  1041.                 }

  1042.             }catch(java.lang.Exception e) {
  1043.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  1044.                 this.log.error(msg,e);
  1045.                 throw new ProtocolException(msg,e);
  1046.             }
  1047.         }

  1048.         return this.isSaveFatturaInContext;
  1049.     }
  1050.    
  1051.     /**
  1052.      * Indicazione se effettuare il salvataggio dei messsaggi di servizio letti nel context
  1053.      *  
  1054.      * @return Indicazione se effettuare il salvataggio dei messsaggi di servizio letti nel context
  1055.      *
  1056.      */
  1057.     private Boolean isSaveMessaggiInContext = null;
  1058.     public Boolean isSaveMessaggiInContext() throws ProtocolException{
  1059.         if(this.isSaveMessaggiInContext==null){
  1060.            
  1061.             String propertyName = "org.openspcoop2.protocol.sdi.parse.messaggi.saveInContext";
  1062.            
  1063.             try{  
  1064.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  1065.                 if (value != null){
  1066.                     value = value.trim();
  1067.                     this.isSaveMessaggiInContext = Boolean.parseBoolean(value);
  1068.                 }else{
  1069.                     throw new Exception("Non definita");
  1070.                 }

  1071.             }catch(java.lang.Exception e) {
  1072.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  1073.                 this.log.error(msg,e);
  1074.                 throw new ProtocolException(msg,e);
  1075.             }
  1076.         }

  1077.         return this.isSaveMessaggiInContext;
  1078.     }
  1079.    
  1080.    
  1081.    
  1082.     /**
  1083.      * Indicazione se effettuare il salvataggio dei messsaggi di servizio letti nel context
  1084.      *  
  1085.      * @return Indicazione se effettuare il salvataggio dei messsaggi di servizio letti nel context
  1086.      *
  1087.      */
  1088.     private Boolean isNotificaATConsegnaSoloAttestato = null;
  1089.     public Boolean isNotificaATConsegnaSoloAttestato() throws ProtocolException{
  1090.         if(this.isNotificaATConsegnaSoloAttestato==null){
  1091.            
  1092.             String propertyName = "org.openspcoop2.protocol.sdi.notifica.attestazioneTrasmissioneImpossibilitaRecapito.consegnaSoloAttestato";
  1093.            
  1094.             try{  
  1095.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  1096.                 if (value != null){
  1097.                     value = value.trim();
  1098.                     this.isNotificaATConsegnaSoloAttestato = Boolean.parseBoolean(value);
  1099.                 }else{
  1100.                     throw new Exception("Non definita");
  1101.                 }

  1102.             }catch(java.lang.Exception e) {
  1103.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  1104.                 this.log.error(msg,e);
  1105.                 throw new ProtocolException(msg,e);
  1106.             }
  1107.         }

  1108.         return this.isNotificaATConsegnaSoloAttestato;
  1109.     }
  1110.    
  1111.    
  1112.    
  1113.     /**
  1114.      * Indicazione se viene ricreato il protocollo sdi, in tal caso e' possibile utilizzare l'opzione sbustamento informazioni protocollo disabilitato.
  1115.      *  
  1116.      * @return Indicazione se viene ricreato il protocollo sdi, in tal caso e' possibile utilizzare l'opzione sbustamento informazioni protocollo disabilitato.
  1117.      *
  1118.      */
  1119.     private Boolean isBehaviourCreaProtocolloSDI = null;
  1120.     public Boolean isBehaviourCreaProtocolloSDI() throws ProtocolException{
  1121.         if(this.isBehaviourCreaProtocolloSDI==null){
  1122.            
  1123.             String propertyName = "org.openspcoop2.protocol.sdi.behaviour.creaProtocolloSDI";
  1124.            
  1125.             try{  
  1126.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  1127.                 if (value != null){
  1128.                     value = value.trim();
  1129.                     this.isBehaviourCreaProtocolloSDI = Boolean.parseBoolean(value);
  1130.                 }else{
  1131.                     throw new Exception("Non definita");
  1132.                 }

  1133.             }catch(java.lang.Exception e) {
  1134.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  1135.                 this.log.error(msg,e);
  1136.                 throw new ProtocolException(msg,e);
  1137.             }
  1138.         }

  1139.         return this.isBehaviourCreaProtocolloSDI;
  1140.     }
  1141.    
  1142.    
  1143.     // Utile per sonde applicative
  1144.    
  1145.     private List<String> soggettiWhiteList = null;
  1146.     public List<String> getSoggettiWhiteList() throws ProtocolException{
  1147.         if(this.soggettiWhiteList==null){
  1148.            
  1149.             String propertyName = "org.openspcoop2.protocol.sdi.whiteList.soggetti";
  1150.            
  1151.             try{  
  1152.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  1153.                 this.soggettiWhiteList = new ArrayList<>();
  1154.                
  1155.                 if (value != null){
  1156.                     value = value.trim();
  1157.                     String [] tmp = value.split(",");
  1158.                     for (int i = 0; i < tmp.length; i++) {
  1159.                         this.soggettiWhiteList.add(tmp[i]);
  1160.                     }
  1161.                 }

  1162.             }catch(java.lang.Exception e) {
  1163.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  1164.                 this.log.error(msg,e);
  1165.                 throw new ProtocolException(msg,e);
  1166.             }
  1167.         }

  1168.         return this.soggettiWhiteList;
  1169.     }
  1170.    
  1171.     private List<String> serviziWhiteList = null;
  1172.     public List<String> getServiziWhiteList() throws ProtocolException{
  1173.         if(this.serviziWhiteList==null){
  1174.            
  1175.             String propertyName = "org.openspcoop2.protocol.sdi.whiteList.servizi";
  1176.            
  1177.             try{  
  1178.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  1179.                 this.serviziWhiteList = new ArrayList<>();
  1180.                
  1181.                 if (value != null){
  1182.                     value = value.trim();
  1183.                     String [] tmp = value.split(",");
  1184.                     for (int i = 0; i < tmp.length; i++) {
  1185.                         this.serviziWhiteList.add(tmp[i]);
  1186.                     }
  1187.                 }

  1188.             }catch(java.lang.Exception e) {
  1189.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  1190.                 this.log.error(msg,e);
  1191.                 throw new ProtocolException(msg,e);
  1192.             }
  1193.         }

  1194.         return this.serviziWhiteList;
  1195.     }
  1196.    
  1197.     private List<String> azioniWhiteList = null;
  1198.     public List<String> getAzioniWhiteList() throws ProtocolException{
  1199.         if(this.azioniWhiteList==null){
  1200.            
  1201.             String propertyName = "org.openspcoop2.protocol.sdi.whiteList.azioni";
  1202.            
  1203.             try{  
  1204.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  1205.                 this.azioniWhiteList = new ArrayList<>();
  1206.                
  1207.                 if (value != null){
  1208.                     value = value.trim();
  1209.                     String [] tmp = value.split(",");
  1210.                     for (int i = 0; i < tmp.length; i++) {
  1211.                         this.azioniWhiteList.add(tmp[i]);
  1212.                     }
  1213.                 }

  1214.             }catch(java.lang.Exception e) {
  1215.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  1216.                 this.log.error(msg,e);
  1217.                 throw new ProtocolException(msg,e);
  1218.             }
  1219.         }

  1220.         return this.azioniWhiteList;
  1221.     }
  1222.    
  1223.     private List<String> namespaceWhiteList = null;
  1224.     public List<String> getNamespaceWhiteList() throws ProtocolException{
  1225.         if(this.namespaceWhiteList==null){
  1226.            
  1227.             String propertyName = "org.openspcoop2.protocol.sdi.whiteList.namespace";
  1228.            
  1229.             try{  
  1230.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  1231.                 this.namespaceWhiteList = new ArrayList<>();
  1232.                
  1233.                 if (value != null){
  1234.                     value = value.trim();
  1235.                     String [] tmp = value.split(",");
  1236.                     for (int i = 0; i < tmp.length; i++) {
  1237.                         this.namespaceWhiteList.add(tmp[i]);
  1238.                     }
  1239.                 }

  1240.             }catch(java.lang.Exception e) {
  1241.                 String msg = "Riscontrato errore durante la lettura della proprieta' '"+propertyName+"': "+e.getMessage();
  1242.                 this.log.error(msg,e);
  1243.                 throw new ProtocolException(msg,e);
  1244.             }
  1245.         }

  1246.         return this.namespaceWhiteList;
  1247.     }
  1248.    
  1249.    
  1250.    
  1251.     /* **** SOAP FAULT (Protocollo, Porta Applicativa) **** */
  1252.    
  1253.     /**
  1254.      * Indicazione se ritornare un soap fault personalizzato nel codice/actor/faultString per i messaggi di errore di protocollo (Porta Applicativa)
  1255.      *  
  1256.      * @return Indicazione se ritornare un soap fault personalizzato nel codice/actor/faultString per i messaggi di errore di protocollo (Porta Applicativa)
  1257.      *
  1258.      */
  1259.     private Boolean isPortaApplicativaBustaErrore_personalizzaElementiFault= null;
  1260.     private Boolean isPortaApplicativaBustaErrore_personalizzaElementiFaultRead= null;
  1261.     public Boolean isPortaApplicativaBustaErrore_personalizzaElementiFault(){
  1262.         if(this.isPortaApplicativaBustaErrore_personalizzaElementiFaultRead==null){
  1263.             try{  
  1264.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.sdi.pa.bustaErrore.personalizzaElementiFault");
  1265.                
  1266.                 if (value != null){
  1267.                     value = value.trim();
  1268.                     this.isPortaApplicativaBustaErrore_personalizzaElementiFault = Boolean.parseBoolean(value);
  1269.                 }else{
  1270.                     this.log.debug("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.pa.bustaErrore.personalizzaElementiFault' non impostata, viene utilizzato il default associato al Servizio Applicativo (faultApplicativo.enrichDetails)");
  1271.                     this.isPortaApplicativaBustaErrore_personalizzaElementiFault = null;
  1272.                 }
  1273.                
  1274.                 this.isPortaApplicativaBustaErrore_personalizzaElementiFaultRead = true;
  1275.                
  1276.             }catch(java.lang.Exception e) {
  1277.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.pa.bustaErrore.personalizzaElementiFault' non impostata, viene utilizzato il default associato al Servizio Applicativo (faultApplicativo.enrichDetails), errore:"+e.getMessage());
  1278.                 this.isPortaApplicativaBustaErrore_personalizzaElementiFault = null;
  1279.                
  1280.                 this.isPortaApplicativaBustaErrore_personalizzaElementiFaultRead = true;
  1281.             }
  1282.         }
  1283.        
  1284.         return this.isPortaApplicativaBustaErrore_personalizzaElementiFault;
  1285.     }
  1286.    
  1287.    
  1288.     /**
  1289.      * Indicazione se deve essere aggiunto un errore-applicativo nei details di un messaggio di errore di protocollo (Porta Applicativa)
  1290.      *  
  1291.      * @return Indicazione se deve essere aggiunto un errore-applicativo nei details di un messaggio di errore di protocollo (Porta Applicativa)
  1292.      *
  1293.      */
  1294.     private Boolean isPortaApplicativaBustaErrore_aggiungiErroreApplicativo= null;
  1295.     private Boolean isPortaApplicativaBustaErrore_aggiungiErroreApplicativoRead= null;
  1296.     public Boolean isPortaApplicativaBustaErrore_aggiungiErroreApplicativo(){
  1297.         if(this.isPortaApplicativaBustaErrore_aggiungiErroreApplicativoRead==null){
  1298.             try{  
  1299.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.sdi.pa.bustaErrore.aggiungiErroreApplicativo");
  1300.                
  1301.                 if (value != null){
  1302.                     value = value.trim();
  1303.                     this.isPortaApplicativaBustaErrore_aggiungiErroreApplicativo = Boolean.parseBoolean(value);
  1304.                 }else{
  1305.                     this.log.debug("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.pa.bustaErrore.aggiungiErroreApplicativo' non impostata, viene utilizzato il default associato al Servizio Applicativo (faultApplicativo.enrichDetails)");
  1306.                     this.isPortaApplicativaBustaErrore_aggiungiErroreApplicativo = null;
  1307.                 }
  1308.                
  1309.                 this.isPortaApplicativaBustaErrore_aggiungiErroreApplicativoRead = true;
  1310.                
  1311.             }catch(java.lang.Exception e) {
  1312.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.pa.bustaErrore.aggiungiErroreApplicativo' non impostata, viene utilizzato il default associato al Servizio Applicativo (faultApplicativo.enrichDetails), errore:"+e.getMessage());
  1313.                 this.isPortaApplicativaBustaErrore_aggiungiErroreApplicativo = null;
  1314.                
  1315.                 this.isPortaApplicativaBustaErrore_aggiungiErroreApplicativoRead = true;
  1316.             }
  1317.         }
  1318.        
  1319.         return this.isPortaApplicativaBustaErrore_aggiungiErroreApplicativo;
  1320.     }
  1321.    
  1322.     /**
  1323.      * Indicazione se generare i details in caso di SOAPFault *_001 (senza buste Errore)
  1324.      *  
  1325.      * @return Indicazione se generare i details in caso di SOAPFault *_001 (senza buste Errore)
  1326.      *
  1327.      */
  1328.     private Boolean isGenerazioneDetailsSOAPFaultProtocolValidazione = null;
  1329.     public boolean isGenerazioneDetailsSOAPFaultProtocolValidazione(){
  1330.         if(this.isGenerazioneDetailsSOAPFaultProtocolValidazione==null){
  1331.             try{  
  1332.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.protocol.eccezioneIntestazione");
  1333.                
  1334.                 if (value != null){
  1335.                     value = value.trim();
  1336.                     this.isGenerazioneDetailsSOAPFaultProtocolValidazione = Boolean.parseBoolean(value);
  1337.                 }else{
  1338.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.protocol.eccezioneIntestazione' non impostata, viene utilizzato il default=false");
  1339.                     this.isGenerazioneDetailsSOAPFaultProtocolValidazione = false;
  1340.                 }
  1341.                
  1342.             }catch(java.lang.Exception e) {
  1343.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.protocol.eccezioneIntestazione' non impostata, viene utilizzato il default=false, errore:"+e.getMessage());
  1344.                 this.isGenerazioneDetailsSOAPFaultProtocolValidazione = false;
  1345.             }
  1346.         }
  1347.        
  1348.         return this.isGenerazioneDetailsSOAPFaultProtocolValidazione;
  1349.     }
  1350.    
  1351.     /**
  1352.      * Indicazione se generare i details in caso di SOAPFault *_300
  1353.      *  
  1354.      * @return Indicazione se generare i details in caso di SOAPFault *_300
  1355.      *
  1356.      */
  1357.     private Boolean isGenerazioneDetailsSOAPFaultProtocolProcessamento = null;
  1358.     public boolean isGenerazioneDetailsSOAPFaultProtocolProcessamento(){
  1359.         if(this.isGenerazioneDetailsSOAPFaultProtocolProcessamento==null){
  1360.             try{  
  1361.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.protocol.eccezioneProcessamento");
  1362.                
  1363.                 if (value != null){
  1364.                     value = value.trim();
  1365.                     this.isGenerazioneDetailsSOAPFaultProtocolProcessamento = Boolean.parseBoolean(value);
  1366.                 }else{
  1367.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.protocol.eccezioneProcessamento' non impostata, viene utilizzato il default=true");
  1368.                     this.isGenerazioneDetailsSOAPFaultProtocolProcessamento = true;
  1369.                 }
  1370.                
  1371.             }catch(java.lang.Exception e) {
  1372.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.protocol.eccezioneProcessamento' non impostata, viene utilizzato il default=true, errore:"+e.getMessage());
  1373.                 this.isGenerazioneDetailsSOAPFaultProtocolProcessamento = true;
  1374.             }
  1375.         }
  1376.        
  1377.         return this.isGenerazioneDetailsSOAPFaultProtocolProcessamento;
  1378.     }
  1379.    
  1380.    
  1381.     /**
  1382.      * Indicazione se generare nei details in caso di SOAPFault *_300 lo stack trace
  1383.      *  
  1384.      * @return Indicazione se generare nei details in caso di SOAPFault *_300 lo stack trace
  1385.      *
  1386.      */
  1387.     private Boolean isGenerazioneDetailsSOAPFaultProtocolWithStackTrace = null;
  1388.     public boolean isGenerazioneDetailsSOAPFaultProtocolWithStackTrace(){
  1389.         if(this.isGenerazioneDetailsSOAPFaultProtocolWithStackTrace==null){
  1390.             try{  
  1391.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.protocol.stackTrace");
  1392.                
  1393.                 if (value != null){
  1394.                     value = value.trim();
  1395.                     this.isGenerazioneDetailsSOAPFaultProtocolWithStackTrace = Boolean.parseBoolean(value);
  1396.                 }else{
  1397.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.protocol.stackTrace' non impostata, viene utilizzato il default=false");
  1398.                     this.isGenerazioneDetailsSOAPFaultProtocolWithStackTrace = false;
  1399.                 }
  1400.                
  1401.             }catch(java.lang.Exception e) {
  1402.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.protocol.stackTrace' non impostata, viene utilizzato il default=false, errore:"+e.getMessage());
  1403.                 this.isGenerazioneDetailsSOAPFaultProtocolWithStackTrace = false;
  1404.             }
  1405.         }
  1406.        
  1407.         return this.isGenerazioneDetailsSOAPFaultProtocolWithStackTrace;
  1408.     }
  1409.    
  1410.     /**
  1411.      * Indicazione se generare nei details in caso di SOAPFault informazioni generiche
  1412.      *  
  1413.      * @return Indicazione se generare nei details in caso di SOAPFault informazioni generiche
  1414.      *
  1415.      */
  1416.     private Boolean isGenerazioneDetailsSOAPFaultProtocolConInformazioniGeneriche = null;
  1417.     public boolean isGenerazioneDetailsSOAPFaultProtocolConInformazioniGeneriche(){
  1418.         if(this.isGenerazioneDetailsSOAPFaultProtocolConInformazioniGeneriche==null){
  1419.             try{  
  1420.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.protocol.informazioniGeneriche");
  1421.                
  1422.                 if (value != null){
  1423.                     value = value.trim();
  1424.                     this.isGenerazioneDetailsSOAPFaultProtocolConInformazioniGeneriche = Boolean.parseBoolean(value);
  1425.                 }else{
  1426.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.protocol.informazioniGeneriche' non impostata, viene utilizzato il default=true");
  1427.                     this.isGenerazioneDetailsSOAPFaultProtocolConInformazioniGeneriche = true;
  1428.                 }
  1429.                
  1430.             }catch(java.lang.Exception e) {
  1431.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.protocol.informazioniGeneriche' non impostata, viene utilizzato il default=true, errore:"+e.getMessage());
  1432.                 this.isGenerazioneDetailsSOAPFaultProtocolConInformazioniGeneriche = true;
  1433.             }
  1434.         }
  1435.        
  1436.         return this.isGenerazioneDetailsSOAPFaultProtocolConInformazioniGeneriche;
  1437.     }
  1438.    
  1439.    
  1440.    
  1441.     /* **** SOAP FAULT (Integrazione, Porta Delegata) **** */
  1442.    
  1443.     /**
  1444.      * Indicazione se generare i details in Casi di errore 5XX
  1445.      *  
  1446.      * @return Indicazione se generare i details in Casi di errore 5XX
  1447.      *
  1448.      */
  1449.     private Boolean isGenerazioneDetailsSOAPFaultIntegrationServerError = null;
  1450.     public boolean isGenerazioneDetailsSOAPFaultIntegrationServerError(){
  1451.         if(this.isGenerazioneDetailsSOAPFaultIntegrationServerError==null){
  1452.             try{  
  1453.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.integration.serverError");
  1454.                
  1455.                 if (value != null){
  1456.                     value = value.trim();
  1457.                     this.isGenerazioneDetailsSOAPFaultIntegrationServerError = Boolean.parseBoolean(value);
  1458.                 }else{
  1459.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.integration.serverError' non impostata, viene utilizzato il default=true");
  1460.                     this.isGenerazioneDetailsSOAPFaultIntegrationServerError = true;
  1461.                 }
  1462.                
  1463.             }catch(java.lang.Exception e) {
  1464.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.integration.serverError' non impostata, viene utilizzato il default=true, errore:"+e.getMessage());
  1465.                 this.isGenerazioneDetailsSOAPFaultIntegrationServerError = true;
  1466.             }
  1467.         }
  1468.        
  1469.         return this.isGenerazioneDetailsSOAPFaultIntegrationServerError;
  1470.     }
  1471.    
  1472.     /**
  1473.      * Indicazione se generare i details in Casi di errore 4XX
  1474.      *  
  1475.      * @return Indicazione se generare i details in Casi di errore 4XX
  1476.      *
  1477.      */
  1478.     private Boolean isGenerazioneDetailsSOAPFaultIntegrationClientError = null;
  1479.     public boolean isGenerazioneDetailsSOAPFaultIntegrationClientError(){
  1480.         if(this.isGenerazioneDetailsSOAPFaultIntegrationClientError==null){
  1481.             try{  
  1482.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.integration.clientError");
  1483.                
  1484.                 if (value != null){
  1485.                     value = value.trim();
  1486.                     this.isGenerazioneDetailsSOAPFaultIntegrationClientError = Boolean.parseBoolean(value);
  1487.                 }else{
  1488.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.integration.clientError' non impostata, viene utilizzato il default=false");
  1489.                     this.isGenerazioneDetailsSOAPFaultIntegrationClientError = false;
  1490.                 }
  1491.                
  1492.             }catch(java.lang.Exception e) {
  1493.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.integration.clientError' non impostata, viene utilizzato il default=false, errore:"+e.getMessage());
  1494.                 this.isGenerazioneDetailsSOAPFaultIntegrationClientError = false;
  1495.             }
  1496.         }
  1497.        
  1498.         return this.isGenerazioneDetailsSOAPFaultIntegrationClientError;
  1499.     }
  1500.    
  1501.     /**
  1502.      * Indicazione se generare nei details lo stack trace all'interno
  1503.      *  
  1504.      * @return Indicazione se generare nei details lo stack trace all'interno
  1505.      *
  1506.      */
  1507.     private Boolean isGenerazioneDetailsSOAPFaultIntegrationWithStackTrace = null;
  1508.     public boolean isGenerazioneDetailsSOAPFaultIntegrationWithStackTrace(){
  1509.         if(this.isGenerazioneDetailsSOAPFaultIntegrationWithStackTrace==null){
  1510.             try{  
  1511.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.integration.stackTrace");
  1512.                
  1513.                 if (value != null){
  1514.                     value = value.trim();
  1515.                     this.isGenerazioneDetailsSOAPFaultIntegrationWithStackTrace = Boolean.parseBoolean(value);
  1516.                 }else{
  1517.                     this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.integration.stackTrace' non impostata, viene utilizzato il default=false");
  1518.                     this.isGenerazioneDetailsSOAPFaultIntegrationWithStackTrace = false;
  1519.                 }
  1520.                
  1521.             }catch(java.lang.Exception e) {
  1522.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.integration.stackTrace' non impostata, viene utilizzato il default=false, errore:"+e.getMessage());
  1523.                 this.isGenerazioneDetailsSOAPFaultIntegrationWithStackTrace = false;
  1524.             }
  1525.         }
  1526.        
  1527.         return this.isGenerazioneDetailsSOAPFaultIntegrationWithStackTrace;
  1528.     }
  1529.    
  1530.     /**
  1531.      * Indicazione se generare nei details informazioni dettagliate o solo di carattere generale
  1532.      *  
  1533.      * @return Indicazione se generare nei details informazioni dettagliate o solo di carattere generale
  1534.      *
  1535.      */
  1536.     private Boolean isGenerazioneDetailsSOAPFaultIntegrationConInformazioniGeneriche= null;
  1537.     private Boolean isGenerazioneDetailsSOAPFaultIntegrationConInformazioniGenericheRead= null;
  1538.     public Boolean isGenerazioneDetailsSOAPFaultIntegrazionConInformazioniGeneriche(){
  1539.         if(this.isGenerazioneDetailsSOAPFaultIntegrationConInformazioniGenericheRead==null){
  1540.             try{  
  1541.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.integration.informazioniGeneriche");
  1542.                
  1543.                 if (value != null){
  1544.                     value = value.trim();
  1545.                     this.isGenerazioneDetailsSOAPFaultIntegrationConInformazioniGeneriche = Boolean.parseBoolean(value);
  1546.                 }else{
  1547.                     this.log.debug("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.integration.informazioniGeneriche' non impostata, viene utilizzato il default associato al Servizio Applicativo (faultAsGenericCode)");
  1548.                     this.isGenerazioneDetailsSOAPFaultIntegrationConInformazioniGeneriche = null;
  1549.                 }
  1550.                
  1551.                 this.isGenerazioneDetailsSOAPFaultIntegrationConInformazioniGenericheRead = true;
  1552.                
  1553.             }catch(java.lang.Exception e) {
  1554.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.generazioneDetailsSoapFault.integration.informazioniGeneriche' non impostata, viene utilizzato il default associato al Servizio Applicativo (faultAsGenericCode), errore:"+e.getMessage());
  1555.                 this.isGenerazioneDetailsSOAPFaultIntegrationConInformazioniGeneriche = null;
  1556.                
  1557.                 this.isGenerazioneDetailsSOAPFaultIntegrationConInformazioniGenericheRead = true;
  1558.             }
  1559.         }
  1560.        
  1561.         return this.isGenerazioneDetailsSOAPFaultIntegrationConInformazioniGeneriche;
  1562.     }
  1563.    
  1564.    
  1565.    
  1566.    
  1567.     /* **** SOAP FAULT (Generati dagli attori esterni) **** */
  1568.    
  1569.     /**
  1570.      * Indicazione se aggiungere un detail contenente descrizione dell'errore nel SoapFaultApplicativo originale
  1571.      *  
  1572.      * @return Indicazione se aggiungere un detail contenente descrizione dell'errore nel SoapFaultApplicativo originale
  1573.      *
  1574.      */
  1575.     private BooleanNullable isAggiungiDetailErroreApplicativo_SoapFaultApplicativo= null;
  1576.     private Boolean isAggiungiDetailErroreApplicativo_SoapFaultApplicativoRead= null;
  1577.     public BooleanNullable isAggiungiDetailErroreApplicativo_SoapFaultApplicativo(){
  1578.         if(this.isAggiungiDetailErroreApplicativo_SoapFaultApplicativoRead==null){
  1579.             try{  
  1580.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.sdi.erroreApplicativo.faultApplicativo.enrichDetails");
  1581.                
  1582.                 if (value != null){
  1583.                     value = value.trim();
  1584.                     Boolean b = Boolean.parseBoolean(value);
  1585.                     this.isAggiungiDetailErroreApplicativo_SoapFaultApplicativo = b ? BooleanNullable.TRUE() : BooleanNullable.FALSE();
  1586.                 }else{
  1587.                     this.log.debug("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.erroreApplicativo.faultApplicativo.enrichDetails' non impostata, viene utilizzato il default associato al Servizio Applicativo (faultApplicativo.enrichDetails)");
  1588.                     this.isAggiungiDetailErroreApplicativo_SoapFaultApplicativo = BooleanNullable.NULL();
  1589.                 }
  1590.                
  1591.                 this.isAggiungiDetailErroreApplicativo_SoapFaultApplicativoRead = true;
  1592.                
  1593.             }catch(java.lang.Exception e) {
  1594.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.erroreApplicativo.faultApplicativo.enrichDetails' non impostata, viene utilizzato il default associato al Servizio Applicativo (faultApplicativo.enrichDetails), errore:"+e.getMessage());
  1595.                 this.isAggiungiDetailErroreApplicativo_SoapFaultApplicativo = BooleanNullable.NULL();
  1596.                
  1597.                 this.isAggiungiDetailErroreApplicativo_SoapFaultApplicativoRead = true;
  1598.             }
  1599.         }
  1600.        
  1601.         return this.isAggiungiDetailErroreApplicativo_SoapFaultApplicativo;
  1602.     }
  1603.    
  1604.     /**
  1605.      * Indicazione se aggiungere un detail contenente descrizione dell'errore nel SoapFaultPdD originale
  1606.      *  
  1607.      * @return Indicazione se aggiungere un detail contenente descrizione dell'errore nel SoapFaultPdD originale
  1608.      *
  1609.      */
  1610.     private BooleanNullable isAggiungiDetailErroreApplicativo_SoapFaultPdD= null;
  1611.     private Boolean isAggiungiDetailErroreApplicativo_SoapFaultPdDRead= null;
  1612.     public BooleanNullable isAggiungiDetailErroreApplicativo_SoapFaultPdD(){
  1613.         if(this.isAggiungiDetailErroreApplicativo_SoapFaultPdDRead==null){
  1614.             try{  
  1615.                 String value = this.reader.getValueConvertEnvProperties("org.openspcoop2.protocol.sdi.erroreApplicativo.faultPdD.enrichDetails");
  1616.                
  1617.                 if (value != null){
  1618.                     value = value.trim();
  1619.                     Boolean b = Boolean.parseBoolean(value);
  1620.                     this.isAggiungiDetailErroreApplicativo_SoapFaultPdD = b ? BooleanNullable.TRUE() : BooleanNullable.FALSE();
  1621.                 }else{
  1622.                     this.log.debug("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.erroreApplicativo.faultPdD.enrichDetails' non impostata, viene utilizzato il default associato al Servizio Applicativo (faultPdD.enrichDetails)");
  1623.                     this.isAggiungiDetailErroreApplicativo_SoapFaultPdD = BooleanNullable.NULL();
  1624.                 }
  1625.                
  1626.                 this.isAggiungiDetailErroreApplicativo_SoapFaultPdDRead = true;
  1627.                
  1628.             }catch(java.lang.Exception e) {
  1629.                 this.log.warn("Proprieta' di openspcoop 'org.openspcoop2.protocol.sdi.erroreApplicativo.faultPdD.enrichDetails' non impostata, viene utilizzato il default associato al Servizio Applicativo (faultPdD.enrichDetails), errore:"+e.getMessage());
  1630.                 this.isAggiungiDetailErroreApplicativo_SoapFaultPdD = BooleanNullable.NULL();
  1631.                
  1632.                 this.isAggiungiDetailErroreApplicativo_SoapFaultPdDRead = true;
  1633.             }
  1634.         }
  1635.        
  1636.         return this.isAggiungiDetailErroreApplicativo_SoapFaultPdD;
  1637.     }
  1638.    
  1639.    
  1640.     private Boolean useConfigStaticInstance = null;
  1641.     private Boolean useConfigStaticInstance(){
  1642.         if(this.useConfigStaticInstance==null){
  1643.            
  1644.             Boolean defaultValue = true;
  1645.             String propertyName = "org.openspcoop2.protocol.sdi.factory.config.staticInstance";
  1646.            
  1647.             try{  
  1648.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  1649.                 if (value != null){
  1650.                     value = value.trim();
  1651.                     this.useConfigStaticInstance = Boolean.parseBoolean(value);
  1652.                 }else{
  1653.                     this.log.debug("Proprieta' di openspcoop '"+propertyName+"' non impostata, viene utilizzato il default="+defaultValue);
  1654.                     this.useConfigStaticInstance = defaultValue;
  1655.                 }

  1656.             }catch(java.lang.Exception e) {
  1657.                 this.log.debug("Proprieta' di openspcoop '"+propertyName+"' non impostata, viene utilizzato il default="+defaultValue+", errore:"+e.getMessage());
  1658.                 this.useConfigStaticInstance = defaultValue;
  1659.             }
  1660.         }

  1661.         return this.useConfigStaticInstance;
  1662.     }
  1663.    
  1664.     private Boolean useErroreApplicativoStaticInstance = null;
  1665.     private Boolean useErroreApplicativoStaticInstance(){
  1666.         if(this.useErroreApplicativoStaticInstance==null){
  1667.            
  1668.             Boolean defaultValue = true;
  1669.             String propertyName = "org.openspcoop2.protocol.sdi.factory.erroreApplicativo.staticInstance";
  1670.            
  1671.             try{  
  1672.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  1673.                 if (value != null){
  1674.                     value = value.trim();
  1675.                     this.useErroreApplicativoStaticInstance = Boolean.parseBoolean(value);
  1676.                 }else{
  1677.                     this.log.debug("Proprieta' di openspcoop '"+propertyName+"' non impostata, viene utilizzato il default="+defaultValue);
  1678.                     this.useErroreApplicativoStaticInstance = defaultValue;
  1679.                 }

  1680.             }catch(java.lang.Exception e) {
  1681.                 this.log.debug("Proprieta' di openspcoop '"+propertyName+"' non impostata, viene utilizzato il default="+defaultValue+", errore:"+e.getMessage());
  1682.                 this.useErroreApplicativoStaticInstance = defaultValue;
  1683.             }
  1684.         }

  1685.         return this.useErroreApplicativoStaticInstance;
  1686.     }
  1687.    
  1688.     private Boolean useEsitoStaticInstance = null;
  1689.     private Boolean useEsitoStaticInstance(){
  1690.         if(this.useEsitoStaticInstance==null){
  1691.            
  1692.             Boolean defaultValue = true;
  1693.             String propertyName = "org.openspcoop2.protocol.sdi.factory.esito.staticInstance";
  1694.            
  1695.             try{  
  1696.                 String value = this.reader.getValueConvertEnvProperties(propertyName);

  1697.                 if (value != null){
  1698.                     value = value.trim();
  1699.                     this.useEsitoStaticInstance = Boolean.parseBoolean(value);
  1700.                 }else{
  1701.                     this.log.debug("Proprieta' di openspcoop '"+propertyName+"' non impostata, viene utilizzato il default="+defaultValue);
  1702.                     this.useEsitoStaticInstance = defaultValue;
  1703.                 }

  1704.             }catch(java.lang.Exception e) {
  1705.                 this.log.debug("Proprieta' di openspcoop '"+propertyName+"' non impostata, viene utilizzato il default="+defaultValue+", errore:"+e.getMessage());
  1706.                 this.useEsitoStaticInstance = defaultValue;
  1707.             }
  1708.         }

  1709.         return this.useEsitoStaticInstance;
  1710.     }
  1711.    
  1712.     private BasicStaticInstanceConfig staticInstanceConfig = null;
  1713.     public BasicStaticInstanceConfig getStaticInstanceConfig(){
  1714.         if(this.staticInstanceConfig==null){
  1715.             this.staticInstanceConfig = new BasicStaticInstanceConfig();
  1716.             if(useConfigStaticInstance()!=null) {
  1717.                 this.staticInstanceConfig.setStaticConfig(useConfigStaticInstance());
  1718.             }
  1719.             if(useErroreApplicativoStaticInstance()!=null) {
  1720.                 this.staticInstanceConfig.setStaticErrorBuilder(useErroreApplicativoStaticInstance());
  1721.             }
  1722.             if(useEsitoStaticInstance()!=null) {
  1723.                 this.staticInstanceConfig.setStaticEsitoBuilder(useEsitoStaticInstance());
  1724.             }
  1725.         }
  1726.         return this.staticInstanceConfig;
  1727.     }
  1728.    
  1729. }