ControlStationCore.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.web.ctrlstat.core;

  21. import java.awt.Font;
  22. import java.awt.font.FontRenderContext;
  23. import java.awt.geom.AffineTransform;
  24. import java.awt.geom.Rectangle2D;
  25. import java.lang.reflect.InvocationTargetException;
  26. import java.sql.Connection;
  27. import java.util.ArrayList;
  28. import java.util.Date;
  29. import java.util.Enumeration;
  30. import java.util.HashMap;
  31. import java.util.List;
  32. import java.util.Map;
  33. import java.util.Properties;

  34. import javax.servlet.http.HttpServletRequest;
  35. import javax.servlet.http.HttpSession;

  36. import org.apache.commons.lang.StringUtils;
  37. import org.openspcoop2.core.allarmi.Allarme;
  38. import org.openspcoop2.core.allarmi.AllarmeHistory;
  39. import org.openspcoop2.core.byok.IDriverBYOKConfig;
  40. import org.openspcoop2.core.commons.CoreException;
  41. import org.openspcoop2.core.commons.DBUtils;
  42. import org.openspcoop2.core.commons.Filtri;
  43. import org.openspcoop2.core.commons.ISearch;
  44. import org.openspcoop2.core.commons.Liste;
  45. import org.openspcoop2.core.config.AccessoConfigurazione;
  46. import org.openspcoop2.core.config.AccessoDatiAutorizzazione;
  47. import org.openspcoop2.core.config.AccessoRegistro;
  48. import org.openspcoop2.core.config.AccessoRegistroRegistro;
  49. import org.openspcoop2.core.config.AttributeAuthority;
  50. import org.openspcoop2.core.config.CanaliConfigurazione;
  51. import org.openspcoop2.core.config.Configurazione;
  52. import org.openspcoop2.core.config.ConfigurazioneMultitenant;
  53. import org.openspcoop2.core.config.ConfigurazioneUrlInvocazione;
  54. import org.openspcoop2.core.config.ConfigurazioneUrlInvocazioneRegola;
  55. import org.openspcoop2.core.config.Credenziali;
  56. import org.openspcoop2.core.config.GenericProperties;
  57. import org.openspcoop2.core.config.GestioneErrore;
  58. import org.openspcoop2.core.config.MessaggiDiagnostici;
  59. import org.openspcoop2.core.config.OpenspcoopSorgenteDati;
  60. import org.openspcoop2.core.config.PortaApplicativa;
  61. import org.openspcoop2.core.config.PortaApplicativaServizio;
  62. import org.openspcoop2.core.config.PortaApplicativaSoggettoVirtuale;
  63. import org.openspcoop2.core.config.PortaDelegata;
  64. import org.openspcoop2.core.config.Property;
  65. import org.openspcoop2.core.config.Proprieta;
  66. import org.openspcoop2.core.config.RegistroPlugin;
  67. import org.openspcoop2.core.config.RegistroPluginArchivio;
  68. import org.openspcoop2.core.config.RoutingTable;
  69. import org.openspcoop2.core.config.ServizioApplicativo;
  70. import org.openspcoop2.core.config.Soggetto;
  71. import org.openspcoop2.core.config.SystemProperties;
  72. import org.openspcoop2.core.config.Tracciamento;
  73. import org.openspcoop2.core.config.TracciamentoConfigurazione;
  74. import org.openspcoop2.core.config.constants.StatoFunzionalita;
  75. import org.openspcoop2.core.config.constants.StatoFunzionalitaBloccante;
  76. import org.openspcoop2.core.config.constants.StatoFunzionalitaConPersonalizzazione;
  77. import org.openspcoop2.core.config.constants.TipoAutenticazione;
  78. import org.openspcoop2.core.config.constants.TipoAutenticazionePrincipal;
  79. import org.openspcoop2.core.config.driver.DriverConfigurazioneException;
  80. import org.openspcoop2.core.config.driver.DriverConfigurazioneNotFound;
  81. import org.openspcoop2.core.config.driver.db.DriverConfigurazioneDB;
  82. import org.openspcoop2.core.config.utils.ConfigUtils;
  83. import org.openspcoop2.core.config.utils.UpdateProprietaOggetto;
  84. import org.openspcoop2.core.constants.CostantiDB;
  85. import org.openspcoop2.core.constants.CostantiLabel;
  86. import org.openspcoop2.core.controllo_traffico.AttivazionePolicy;
  87. import org.openspcoop2.core.controllo_traffico.ConfigurazioneGenerale;
  88. import org.openspcoop2.core.controllo_traffico.ConfigurazionePolicy;
  89. import org.openspcoop2.core.controllo_traffico.driver.PolicyGroupByActiveThreadsType;
  90. import org.openspcoop2.core.id.IDAccordo;
  91. import org.openspcoop2.core.id.IDAccordoCooperazione;
  92. import org.openspcoop2.core.id.IDGruppo;
  93. import org.openspcoop2.core.id.IDPortaApplicativa;
  94. import org.openspcoop2.core.id.IDPortaDelegata;
  95. import org.openspcoop2.core.id.IDRuolo;
  96. import org.openspcoop2.core.id.IDScope;
  97. import org.openspcoop2.core.id.IDServizio;
  98. import org.openspcoop2.core.id.IDSoggetto;
  99. import org.openspcoop2.core.mapping.MappingErogazionePortaApplicativa;
  100. import org.openspcoop2.core.mapping.MappingFruizionePortaDelegata;
  101. import org.openspcoop2.core.mvc.properties.Config;
  102. import org.openspcoop2.core.mvc.properties.provider.ExternalResources;
  103. import org.openspcoop2.core.mvc.properties.provider.ProviderException;
  104. import org.openspcoop2.core.mvc.properties.utils.PropertiesSourceConfiguration;
  105. import org.openspcoop2.core.plugins.Plugin;
  106. import org.openspcoop2.core.plugins.constants.TipoPlugin;
  107. import org.openspcoop2.core.registry.AccordoCooperazione;
  108. import org.openspcoop2.core.registry.AccordoServizioParteComune;
  109. import org.openspcoop2.core.registry.AccordoServizioParteSpecifica;
  110. import org.openspcoop2.core.registry.CredenzialiSoggetto;
  111. import org.openspcoop2.core.registry.Documento;
  112. import org.openspcoop2.core.registry.Fruitore;
  113. import org.openspcoop2.core.registry.Gruppo;
  114. import org.openspcoop2.core.registry.PortType;
  115. import org.openspcoop2.core.registry.PortaDominio;
  116. import org.openspcoop2.core.registry.Ruolo;
  117. import org.openspcoop2.core.registry.Scope;
  118. import org.openspcoop2.core.registry.beans.AccordoServizioParteComuneSintetico;
  119. import org.openspcoop2.core.registry.constants.CostantiRegistroServizi;
  120. import org.openspcoop2.core.registry.constants.FormatoSpecifica;
  121. import org.openspcoop2.core.registry.constants.PddTipologia;
  122. import org.openspcoop2.core.registry.driver.DriverRegistroServiziException;
  123. import org.openspcoop2.core.registry.driver.DriverRegistroServiziNotFound;
  124. import org.openspcoop2.core.registry.driver.FiltroRicercaGruppi;
  125. import org.openspcoop2.core.registry.driver.FiltroRicercaRuoli;
  126. import org.openspcoop2.core.registry.driver.FiltroRicercaScope;
  127. import org.openspcoop2.core.registry.driver.IDAccordoCooperazioneFactory;
  128. import org.openspcoop2.core.registry.driver.IDAccordoFactory;
  129. import org.openspcoop2.core.registry.driver.IDServizioFactory;
  130. import org.openspcoop2.core.registry.driver.db.DriverRegistroServiziDB;
  131. import org.openspcoop2.core.registry.driver.db.IDAccordoDB;
  132. import org.openspcoop2.message.config.ServiceBindingConfiguration;
  133. import org.openspcoop2.message.constants.MessageType;
  134. import org.openspcoop2.message.constants.ServiceBinding;
  135. import org.openspcoop2.monitor.engine.alarm.AlarmConfigProperties;
  136. import org.openspcoop2.monitor.engine.alarm.AlarmEngineConfig;
  137. import org.openspcoop2.monitor.engine.dynamic.CorePluginLoader;
  138. import org.openspcoop2.monitor.engine.dynamic.PluginLoader;
  139. import org.openspcoop2.pdd.config.ConfigurazioneNodiRuntime;
  140. import org.openspcoop2.pdd.config.ConfigurazionePriorita;
  141. import org.openspcoop2.pdd.config.InvokerNodiRuntime;
  142. import org.openspcoop2.pdd.config.OpenSPCoop2ConfigurationException;
  143. import org.openspcoop2.pdd.core.CostantiPdD;
  144. import org.openspcoop2.pdd.core.autenticazione.ParametriAutenticazioneApiKey;
  145. import org.openspcoop2.pdd.core.autenticazione.ParametriAutenticazioneBasic;
  146. import org.openspcoop2.pdd.core.autenticazione.ParametriAutenticazionePrincipal;
  147. import org.openspcoop2.pdd.core.byok.DriverBYOK;
  148. import org.openspcoop2.pdd.core.byok.DriverBYOKUtilities;
  149. import org.openspcoop2.pdd.core.jmx.JMXUtils;
  150. import org.openspcoop2.pdd.core.keystore.RemoteStoreKeyEntry;
  151. import org.openspcoop2.pdd.core.keystore.RemoteStoreProviderDriverUtils;
  152. import org.openspcoop2.pdd.logger.DriverMsgDiagnostici;
  153. import org.openspcoop2.pdd.logger.DriverTracciamento;
  154. import org.openspcoop2.protocol.engine.ProtocolFactoryManager;
  155. import org.openspcoop2.protocol.engine.utils.AzioniUtils;
  156. import org.openspcoop2.protocol.engine.utils.NamingUtils;
  157. import org.openspcoop2.protocol.manifest.constants.InterfaceType;
  158. import org.openspcoop2.protocol.sdk.ConfigurazionePdD;
  159. import org.openspcoop2.protocol.sdk.IProtocolFactory;
  160. import org.openspcoop2.protocol.sdk.constants.FunzionalitaProtocollo;
  161. import org.openspcoop2.protocol.sdk.constants.ProfiloDiCollaborazione;
  162. import org.openspcoop2.protocol.sdk.registry.IConfigIntegrationReader;
  163. import org.openspcoop2.protocol.sdk.registry.IRegistryReader;
  164. import org.openspcoop2.protocol.utils.ModIUtils;
  165. import org.openspcoop2.protocol.utils.ProtocolUtils;
  166. import org.openspcoop2.utils.IVersionInfo;
  167. import org.openspcoop2.utils.LoggerWrapperFactory;
  168. import org.openspcoop2.utils.Semaphore;
  169. import org.openspcoop2.utils.SemaphoreLock;
  170. import org.openspcoop2.utils.SortedMap;
  171. import org.openspcoop2.utils.TipiDatabase;
  172. import org.openspcoop2.utils.UtilsException;
  173. import org.openspcoop2.utils.VersionUtilities;
  174. import org.openspcoop2.utils.certificate.remote.RemoteStoreConfig;
  175. import org.openspcoop2.utils.crypt.CryptConfig;
  176. import org.openspcoop2.utils.crypt.CryptFactory;
  177. import org.openspcoop2.utils.crypt.CryptType;
  178. import org.openspcoop2.utils.crypt.ICrypt;
  179. import org.openspcoop2.utils.crypt.PasswordVerifier;
  180. import org.openspcoop2.utils.date.DateManager;
  181. import org.openspcoop2.utils.jdbc.JDBCUtilities;
  182. import org.openspcoop2.utils.json.YAMLUtils;
  183. import org.openspcoop2.utils.properties.PropertiesUtilities;
  184. import org.openspcoop2.utils.resources.ClassLoaderUtilities;
  185. import org.openspcoop2.utils.resources.MapReader;
  186. import org.openspcoop2.utils.resources.ScriptInvoker;
  187. import org.openspcoop2.web.ctrlstat.config.ConsoleProperties;
  188. import org.openspcoop2.web.ctrlstat.config.DatasourceProperties;
  189. import org.openspcoop2.web.ctrlstat.costanti.CostantiControlStation;
  190. import org.openspcoop2.web.ctrlstat.costanti.MultitenantSoggettiErogazioni;
  191. import org.openspcoop2.web.ctrlstat.costanti.MultitenantSoggettiFruizioni;
  192. import org.openspcoop2.web.ctrlstat.costanti.OperationsParameter;
  193. import org.openspcoop2.web.ctrlstat.costanti.TipoOggettoDaSmistare;
  194. import org.openspcoop2.web.ctrlstat.dao.PdDControlStation;
  195. import org.openspcoop2.web.ctrlstat.dao.SoggettoCtrlStat;
  196. import org.openspcoop2.web.ctrlstat.driver.DriverControlStationDB;
  197. import org.openspcoop2.web.ctrlstat.driver.DriverControlStationException;
  198. import org.openspcoop2.web.ctrlstat.driver.DriverControlStationNotFound;
  199. import org.openspcoop2.web.ctrlstat.driver.IDBuilder;
  200. import org.openspcoop2.web.ctrlstat.gestori.GestorePdDInitThread;
  201. import org.openspcoop2.web.ctrlstat.plugins.IExtendedBean;
  202. import org.openspcoop2.web.ctrlstat.plugins.IExtendedConnettore;
  203. import org.openspcoop2.web.ctrlstat.plugins.IExtendedCoreServlet;
  204. import org.openspcoop2.web.ctrlstat.plugins.IExtendedFormServlet;
  205. import org.openspcoop2.web.ctrlstat.plugins.IExtendedListServlet;
  206. import org.openspcoop2.web.ctrlstat.plugins.IExtendedMenu;
  207. import org.openspcoop2.web.ctrlstat.plugins.WrapperExtendedBean;
  208. import org.openspcoop2.web.ctrlstat.registro.GestoreRegistroServiziRemoto;
  209. import org.openspcoop2.web.ctrlstat.servlet.ConsoleHelper;
  210. import org.openspcoop2.web.ctrlstat.servlet.apc.AccordiServizioParteComuneCore;
  211. import org.openspcoop2.web.ctrlstat.servlet.config.ConfigurazioneCostanti;
  212. import org.openspcoop2.web.ctrlstat.servlet.pdd.PddCore;
  213. import org.openspcoop2.web.ctrlstat.servlet.soggetti.SoggettiCore;
  214. import org.openspcoop2.web.ctrlstat.servlet.utils.UtilsCostanti;
  215. import org.openspcoop2.web.lib.audit.DriverAudit;
  216. import org.openspcoop2.web.lib.audit.appender.AuditAppender;
  217. import org.openspcoop2.web.lib.audit.appender.AuditDBAppender;
  218. import org.openspcoop2.web.lib.audit.appender.AuditDisabilitatoException;
  219. import org.openspcoop2.web.lib.audit.appender.IDOperazione;
  220. import org.openspcoop2.web.lib.audit.dao.Appender;
  221. import org.openspcoop2.web.lib.audit.dao.AppenderProperty;
  222. import org.openspcoop2.web.lib.audit.dao.Filtro;
  223. import org.openspcoop2.web.lib.audit.log.constants.Stato;
  224. import org.openspcoop2.web.lib.audit.log.constants.Tipologia;
  225. import org.openspcoop2.web.lib.mvc.Costanti;
  226. import org.openspcoop2.web.lib.mvc.PageData;
  227. import org.openspcoop2.web.lib.mvc.ServletUtils;
  228. import org.openspcoop2.web.lib.mvc.byok.LockUtilities;
  229. import org.openspcoop2.web.lib.mvc.properties.beans.ConfigBean;
  230. import org.openspcoop2.web.lib.mvc.properties.exception.ValidationException;
  231. import org.openspcoop2.web.lib.mvc.properties.utils.ReadPropertiesUtilities;
  232. import org.openspcoop2.web.lib.queue.config.QueueProperties;
  233. import org.openspcoop2.web.lib.queue.costanti.Operazione;
  234. import org.openspcoop2.web.lib.users.dao.User;
  235. import org.slf4j.Logger;

  236. /**
  237.  * Questa classe e' l'entrypoint alla govwayConsole, fornisce cioe' ai
  238.  * chiamanti la possibilita' di effettuare le operazioni che verranno riflesse
  239.  * sia in locale che in remoto.
  240.  *
  241.  * @author Andrea Poli (apoli@link.it)
  242.  * @author Stefano Corallo (corallo@link.it)
  243.  * @author Sandra Giangrandi (sandra@link.it)
  244.  * @author $Author$
  245.  * @version $Rev$, $Date$
  246.  *
  247.  */
  248. public class ControlStationCore {

  249.     /* ------- STATIC ----- */

  250.     /** Logger */
  251.     protected static Logger log = null;
  252.     public static Logger getLog() {
  253.         return ControlStationCore.log;
  254.     }

  255.     /** DBManager */
  256.     protected static DBManager dbM = null;


  257.     /* ---- STATIC INIT METHOD ----- */

  258.     private static synchronized void initLogger(){
  259.         // Log4J caricato tramite InitListener
  260.         ControlStationCore.log = InitListener.log;
  261.     }
  262.     private static void checkInitLogger(){
  263.         if(ControlStationCore.log==null){
  264.             ControlStationCore.initLogger();
  265.         }
  266.     }

  267.     /* ---- STATIC LOGGER ----  */

  268.     public static void logInfo(String msg){
  269.         ControlStationCore.checkInitLogger();
  270.         ControlStationCore.log.info(msg);
  271.     }
  272.     public static void logWarn(String msg){
  273.         ControlStationCore.checkInitLogger();
  274.         ControlStationCore.log.warn(msg);
  275.     }
  276.     public static void logDebug(String msg){
  277.         ControlStationCore.checkInitLogger();
  278.         ControlStationCore.log.debug(msg);
  279.     }
  280.     public static void logDebug(String msg,Throwable e){
  281.         ControlStationCore.checkInitLogger();
  282.         ControlStationCore.log.debug(msg,e);
  283.     }
  284.     public static void logError(String msg){
  285.         ControlStationCore.checkInitLogger();
  286.         ControlStationCore.log.error(msg);
  287.     }
  288.     public static void logError(String msg,Throwable e){
  289.         ControlStationCore.checkInitLogger();
  290.         ControlStationCore.log.error(msg,e);
  291.     }

  292.    
  293.     protected String getPrefixMethod(String nomeMetodo) {
  294.         return "[ControlStationCore::" + nomeMetodo + "] ";
  295.     }
  296.     protected String getPrefixError(String nomeMetodo, Exception e) {
  297.         return getPrefixMethod(nomeMetodo)+"Exception:" + e.getMessage();
  298.     }
  299.     protected String getPrefixNotFound(String nomeMetodo, Exception e) {
  300.         return getPrefixMethod(nomeMetodo)+"NotFound:" + e.getMessage();
  301.     }
  302.    
  303.    


  304.     /* ------- INFO ----- */
  305.    
  306.    



  307.     /* ------- VARIABLE ----- */

  308.     /** Impostazioni grafiche */
  309.     private String consoleNomeSintesi = null;
  310.     private String consoleNomeEsteso = null;
  311.     private String consoleCSS = null;
  312.     private String consoleLanguage = null;
  313.     private int consoleLunghezzaLabel = 50;
  314.     private String logoHeaderImage = null;
  315.     private String logoHeaderTitolo = null;
  316.     private String logoHeaderLink = null;
  317.     private boolean visualizzaLinkHomeHeader = false;
  318.     private AffineTransform affineTransform = null;
  319.     private FontRenderContext fontRenderContext = null;
  320.     private Font defaultFont = null;
  321.    
  322.     private String getTitleSuffix(HttpServletRequest request, HttpSession session) {
  323.         IVersionInfo versionInfoCheck = null;
  324.         try {
  325.             versionInfoCheck = getInfoVersion(request, session);
  326.         }catch(Exception e) {
  327.             ControlStationLogger.getPddConsoleCoreLogger().error("Errore durante la lettura delle informazioni sulla versione: "+e.getMessage(),e);
  328.         }
  329.         String consoleNomeEstesoSuffix = null;
  330.         if(versionInfoCheck!=null) {
  331.             if(!StringUtils.isEmpty(versionInfoCheck.getErrorTitleSuffix())) {
  332.                 consoleNomeEstesoSuffix = versionInfoCheck.getErrorTitleSuffix();
  333.             }
  334.             else if(!StringUtils.isEmpty(versionInfoCheck.getWarningTitleSuffix())) {
  335.                 consoleNomeEstesoSuffix = versionInfoCheck.getWarningTitleSuffix();
  336.             }
  337.         }
  338.         return consoleNomeEstesoSuffix;
  339.     }
  340.    
  341.     public String getConsoleNomeSintesi() {
  342.         return this.consoleNomeSintesi;
  343.     }
  344.     public String getConsoleNomeEsteso(HttpServletRequest request, HttpSession session) {
  345.         String titleSuffix = getTitleSuffix(request, session);
  346.         if(!StringUtils.isEmpty(titleSuffix)){
  347.             if(!titleSuffix.startsWith(" ")) {
  348.                 titleSuffix = " "+titleSuffix;
  349.             }
  350.             return this.consoleNomeEsteso+titleSuffix;
  351.         }
  352.         else{
  353.             return this.consoleNomeEsteso;
  354.         }
  355.     }
  356.     public String getProductVersion(){
  357.         String pVersion = null;
  358.         pVersion = "GovWay "+CostantiPdD.OPENSPCOOP2_VERSION;
  359.        
  360.         try {
  361.             String version = VersionUtilities.readVersion();
  362.             if(version!=null && !StringUtils.isEmpty(version)) {
  363.                 pVersion = version;
  364.             }
  365.         }catch(Exception e) {
  366.             // ignore
  367.         }
  368.        
  369.         String buildVersion = null;
  370.         try {
  371.             buildVersion = VersionUtilities.readBuildVersion();
  372.         }catch(Exception e) {
  373.             // ignore
  374.         }
  375.         if(buildVersion!=null) {
  376.             pVersion = pVersion + " (build "+buildVersion+")";
  377.         }
  378.        
  379.         return pVersion;
  380.     }
  381.     public String getConsoleCSS() {
  382.         return this.consoleCSS;
  383.     }
  384.     public String getConsoleLanguage() {
  385.         return this.consoleLanguage;
  386.     }

  387.     public int getConsoleLunghezzaLabel() {
  388.         return this.consoleLunghezzaLabel;
  389.     }
  390.    
  391.     public String getLogoHeaderImage() {
  392.         return this.logoHeaderImage;
  393.     }

  394.     public String getLogoHeaderTitolo() {
  395.         return this.logoHeaderTitolo;
  396.     }

  397.     public String getLogoHeaderLink() {
  398.         return this.logoHeaderLink;
  399.     }
  400.    
  401.     public boolean isVisualizzaLinkHomeHeader() {
  402.         return this.visualizzaLinkHomeHeader;
  403.     }

  404.     /** Tipo del Database */
  405.     protected String tipoDB = "";
  406.     public String getTipoDatabase() {
  407.         return this.tipoDB;
  408.     }

  409.     /** Accesso alle code JMS: Smistatore */
  410.     private String smistatoreQueue = "";
  411.     private String cfName = "";
  412.     private Properties cfProp = null;

  413.     /** IDFactory */
  414.     private IDAccordoFactory idAccordoFactory = null;
  415.     private IDAccordoCooperazioneFactory idAccordoCooperazioneFactory = null;
  416.     private IDServizioFactory idServizioFactory = null;

  417.     /** Protocollo */
  418.     private String protocolloDefault = null;
  419.     private long jdbcSerializableAttesaAttiva = 0;
  420.     private int jdbcSerializableCheck = 0;
  421.     public String getProtocolloDefault(HttpServletRequest request, HttpSession session, List<String> listaProtocolliUtilizzabili) throws DriverRegistroServiziException {
  422.         if(listaProtocolliUtilizzabili!=null && !listaProtocolliUtilizzabili.isEmpty()) {
  423.             // cerco prima il default
  424.             for (String protocolloUtilizzabile : listaProtocolliUtilizzabili) {
  425.                 if(protocolloUtilizzabile.equals(this.protocolloDefault)) {
  426.                     return this.protocolloDefault;
  427.                 }
  428.             }
  429.             return listaProtocolliUtilizzabili.get(0); // torno il primo
  430.         }
  431.         List<String> protocolli = this.getProtocolli(request, session);
  432.         if(protocolli!=null && protocolli.size()==1) {
  433.             return protocolli.get(0); // si tratta del protocollo selezionato se ce ne sono piu' di uno
  434.         }
  435.         return this.protocolloDefault;
  436.     }
  437.     public long getJdbcSerializableAttesaAttiva() {
  438.         return this.jdbcSerializableAttesaAttiva;
  439.     }
  440.     public int getJdbcSerializableCheck() {
  441.         return this.jdbcSerializableCheck;
  442.     }
  443.     protected ProtocolFactoryManager protocolFactoryManager = null;

  444.     /** Visione oggetti globale o per utenti */
  445.     private boolean visioneOggettiGlobale = true;
  446.     private List<String> utentiConVisioneGlobale = new ArrayList<>();
  447.     public boolean isVisioneOggettiGlobale(String user) {
  448.         if(this.visioneOggettiGlobale){
  449.             return true;
  450.         }else{
  451.             return this.utentiConVisioneGlobale.contains(user);
  452.         }
  453.     }
  454.     public boolean isVisioneOggettiGlobaleIndipendenteUtente() {
  455.         return this.visioneOggettiGlobale;
  456.     }

  457.     /** Tracciamento */
  458.     private boolean tracceShowConfigurazioneCustomAppender = false;
  459.     private boolean tracceSameDBWebUI = true;
  460.     private boolean tracceShowSorgentiDatiDatabase = false;
  461.     private String tracceDatasource = null;
  462.     private String tracceTipoDatabase = null;
  463.     private Properties tracceCtxDatasource = null;
  464.     private DriverTracciamento driverTracciamento = null;
  465.     public DriverTracciamento getDriverTracciamento()  throws DriverControlStationException {
  466.         return this.getDriverTracciamento(null, false);
  467.     }
  468.     public DriverTracciamento getDriverTracciamento(String nomeDs)  throws DriverControlStationException {
  469.         return this.getDriverTracciamento(nomeDs, false);
  470.     }
  471.     public DriverTracciamento getDriverTracciamento(String nomeDs, boolean forceChange)  throws DriverControlStationException {
  472.         if(this.driverTracciamento==null || forceChange){
  473.             initDriverTracciamento(nomeDs, forceChange);
  474.         }
  475.         return this.driverTracciamento;
  476.     }
  477.     public boolean isTracceShowConfigurazioneCustomAppender() {
  478.         return this.tracceShowConfigurazioneCustomAppender;
  479.     }
  480.     public boolean isTracceShowSorgentiDatiDatabase() {
  481.         return this.tracceShowSorgentiDatiDatabase;
  482.     }
  483.     public boolean isTracceSameDBWebUI() {
  484.         return this.tracceSameDBWebUI;
  485.     }

  486.     /** MsgDiagnostici */
  487.     private boolean msgDiagnosticiShowConfigurazioneCustomAppender = false;
  488.     private boolean msgDiagnosticiSameDBWebUI = true;
  489.     private boolean msgDiagnosticiShowSorgentiDatiDatabase = false;
  490.     private String msgDiagnosticiDatasource = null;
  491.     private String msgDiagnosticiTipoDatabase = null;
  492.     private Properties msgDiagnosticiCtxDatasource = null;
  493.     private DriverMsgDiagnostici driverMSGDiagnostici = null;
  494.     public DriverMsgDiagnostici getDriverMSGDiagnostici()  throws DriverControlStationException {
  495.         return this.getDriverMSGDiagnostici(null, false);
  496.     }
  497.     public DriverMsgDiagnostici getDriverMSGDiagnostici(String nomeDs)  throws DriverControlStationException {
  498.         return this.getDriverMSGDiagnostici(nomeDs, false);
  499.     }
  500.     public DriverMsgDiagnostici getDriverMSGDiagnostici(String nomeDs, boolean forceChange)  throws DriverControlStationException {
  501.         if(this.driverMSGDiagnostici==null || forceChange){
  502.             initDriverMSGDiagnostici(nomeDs, forceChange);
  503.         }
  504.         return this.driverMSGDiagnostici;
  505.     }
  506.     public boolean isMsgDiagnosticiShowConfigurazioneCustomAppender() {
  507.         return this.msgDiagnosticiShowConfigurazioneCustomAppender;
  508.     }
  509.     public boolean isMsgDiagnosticiShowSorgentiDatiDatabase() {
  510.         return this.msgDiagnosticiShowSorgentiDatiDatabase;
  511.     }
  512.    
  513.     /** Dump */
  514.    
  515.     private boolean dumpShowConfigurazioneCustomAppender = false;
  516.     public boolean isDumpShowConfigurazioneCustomAppender() {
  517.         return this.dumpShowConfigurazioneCustomAppender;
  518.     }
  519.    
  520.     private boolean dumpShowConfigurazioneDumpRealtime = true;
  521.     public boolean isDumpShowConfigurazioneDumpRealtime() {
  522.         return this.dumpShowConfigurazioneDumpRealtime;
  523.     }

  524.     /** Porte di Dominio */
  525.     private boolean gestionePddAbilitata = true;
  526.     public boolean isGestionePddAbilitata(ConsoleHelper consoleHelper) {
  527.         return this.singlePdD && this.registroServiziLocale && (this.gestionePddAbilitata || consoleHelper.isModalitaCompleta());
  528.     }
  529.    
  530.     /** Registro Servizi */
  531.     private boolean registroServiziLocale = true;
  532.     public boolean isRegistroServiziLocale() {
  533.         return this.registroServiziLocale;
  534.     }

  535.     /** Modalita' Single PdD */
  536.     private boolean singlePdD;
  537.     public boolean isSinglePdD() {
  538.         return this.singlePdD;
  539.     }

  540.     /** J2EE Ambiente */
  541.     private boolean showJ2eeOptions = true;
  542.     public boolean isShowJ2eeOptions() {
  543.         return this.showJ2eeOptions;
  544.     }

  545.     /** Utenze Console */
  546.    
  547.     private static CryptConfig utenzePasswordEncryptEngineApiMode = null;
  548.     public static CryptConfig getUtenzePasswordEncryptEngineApiMode() {
  549.         return utenzePasswordEncryptEngineApiMode;
  550.     }
  551.     public static void setUtenzePasswordEncryptEngineApiMode(CryptConfig utenzePasswordEncryptEngineApiMode) {
  552.         ControlStationCore.utenzePasswordEncryptEngineApiMode = utenzePasswordEncryptEngineApiMode;
  553.     }

  554.     private String utenzePasswordConfiguration = null;
  555.     public String getUtenzePasswordConfiguration() {
  556.         return this.utenzePasswordConfiguration;
  557.     }
  558.     private PasswordVerifier utenzePasswordVerifierEngine = null;
  559.     private CryptConfig utenzePasswordEncryptEngine = null;
  560.     private synchronized void initUtenzePassword() throws UtilsException {
  561.         if(this.utenzePasswordVerifierEngine==null){
  562.             this.utenzePasswordVerifierEngine = new PasswordVerifier(this.utenzePasswordConfiguration);
  563.         }
  564.         if(this.utenzePasswordEncryptEngine==null){
  565.             this.utenzePasswordEncryptEngine = new CryptConfig(this.utenzePasswordConfiguration);
  566.         }
  567.     }
  568.     public PasswordVerifier getUtenzePasswordVerifier() {
  569.         if(this.utenzePasswordConfiguration!=null){
  570.             if(this.utenzePasswordVerifierEngine==null){
  571.                 try{
  572.                     this.initUtenzePassword();
  573.                 }catch(Exception e){
  574.                     log.error(e.getMessage(),e);
  575.                 }
  576.             }
  577.             if(this.utenzePasswordVerifierEngine!=null && this.utenzePasswordVerifierEngine.existsRestriction()){
  578.                 return this.utenzePasswordVerifierEngine;
  579.             }
  580.         }
  581.         return null;
  582.     }
  583.     public CryptConfig getUtenzePasswordEncrypt() {
  584.         if(this.utenzePasswordConfiguration!=null){
  585.             if(this.utenzePasswordEncryptEngine==null){
  586.                 try{
  587.                     this.initUtenzePassword();
  588.                 }catch(Exception e){
  589.                     log.error(e.getMessage(),e);
  590.                 }
  591.             }
  592.             return this.utenzePasswordEncryptEngine;
  593.         }
  594.         return null;
  595.     }
  596.     public boolean isUtenzePasswordEncryptEnabled() {
  597.         return this.getUtenzePasswordEncrypt()!=null && !CryptType.PLAIN.equals(this.getUtenzePasswordEncrypt().getCryptType());
  598.     }
  599.     private int utenzeLunghezzaPasswordGenerate;
  600.     public int getUtenzeLunghezzaPasswordGenerate() {
  601.         return this.utenzeLunghezzaPasswordGenerate;
  602.     }
  603.    
  604.     protected ICrypt utenzePasswordManager;
  605.     protected ICrypt utenzePasswordManagerBackwardCompatibility;
  606.     public ICrypt getUtenzePasswordManager() {
  607.         return this.utenzePasswordManager;
  608.     }
  609.     public ICrypt getUtenzePasswordManagerBackwardCompatibility() {
  610.         return this.utenzePasswordManagerBackwardCompatibility;
  611.     }
  612.    
  613.     public boolean isCheckPasswordExpire(PasswordVerifier passwordVerifier) {
  614.         if(passwordVerifier != null) {
  615.             return this.isLoginApplication() && passwordVerifier.isCheckPasswordExpire();
  616.         }
  617.        
  618.         return false;
  619.     }
  620.    
  621.     private boolean utenzeModificaProfiloUtenteDaLinkAggiornaDB;
  622.     public boolean isUtenzeModificaProfiloUtenteDaLinkAggiornaDB() {
  623.         return this.utenzeModificaProfiloUtenteDaLinkAggiornaDB;
  624.     }
  625.     private boolean utenzeModificaProfiloUtenteDaFormAggiornaSessione;
  626.     public boolean isUtenzeModificaProfiloUtenteDaFormAggiornaSessione() {
  627.         return this.utenzeModificaProfiloUtenteDaFormAggiornaSessione;
  628.     }
  629.    
  630.     /** Login */
  631.     protected String loginTipo;
  632.     protected boolean loginApplication;
  633.     protected Properties loginProperties;
  634.     protected String loginUtenteNonAutorizzatoRedirectUrl;
  635.     protected String loginUtenteNonValidoRedirectUrl;
  636.     protected String loginErroreInternoRedirectUrl;
  637.     protected String loginSessioneScadutaRedirectUrl;
  638.     protected boolean logoutMostraButton;
  639.     protected String logoutUrlDestinazione;
  640.    
  641.    
  642.     public String getLoginTipo() {
  643.         return this.loginTipo;
  644.     }

  645.     public boolean isLoginApplication() {
  646.         return this.loginApplication;
  647.     }

  648.     public Properties getLoginProperties() {
  649.         return this.loginProperties;
  650.     }
  651.    
  652.     public String getLoginUtenteNonAutorizzatoRedirectUrl() {
  653.         return this.loginUtenteNonAutorizzatoRedirectUrl;
  654.     }

  655.     public String getLoginUtenteNonValidoRedirectUrl() {
  656.         return this.loginUtenteNonValidoRedirectUrl;
  657.     }
  658.    
  659.     public String getLoginErroreInternoRedirectUrl() {
  660.         return this.loginErroreInternoRedirectUrl;
  661.     }

  662.     public String getLoginSessioneScadutaRedirectUrl() {
  663.         return this.loginSessioneScadutaRedirectUrl;
  664.     }

  665.     public boolean isMostraButtonLogout() {
  666.         return this.logoutMostraButton;
  667.     }

  668.     public String getLogoutUrlDestinazione() {
  669.         return this.logoutUrlDestinazione;
  670.     }
  671.    
  672.    
  673.     /** Applicativi */
  674.    
  675.     private static CryptConfig applicativiPasswordEncryptEngineApiMode = null;
  676.     public static CryptConfig getApplicativiPasswordEncryptEngineApiMode() {
  677.         return applicativiPasswordEncryptEngineApiMode;
  678.     }
  679.     public static void setApplicativiPasswordEncryptEngineApiMode(CryptConfig applicativiPasswordEncryptEngineApiMode) {
  680.         ControlStationCore.applicativiPasswordEncryptEngineApiMode = applicativiPasswordEncryptEngineApiMode;
  681.     }
  682.     private static Integer applicativiApiKeyPasswordGeneratedLengthApiMode = null;
  683.     public static Integer getApplicativiApiKeyPasswordGeneratedLengthApiMode() {
  684.         return applicativiApiKeyPasswordGeneratedLengthApiMode;
  685.     }
  686.     public static void setApplicativiApiKeyPasswordGeneratedLengthApiMode(Integer applicativiApiKeyPasswordGeneratedLengthApiMode) {
  687.         ControlStationCore.applicativiApiKeyPasswordGeneratedLengthApiMode = applicativiApiKeyPasswordGeneratedLengthApiMode;
  688.     }
  689.     private static PasswordVerifier applicativiPasswordVerifierEngineApiMode = null;
  690.     public static PasswordVerifier getApplicativiPasswordVerifierEngineApiMode() {
  691.         return applicativiPasswordVerifierEngineApiMode;
  692.     }
  693.     public static void setApplicativiPasswordVerifierEngineApiMode(
  694.             PasswordVerifier applicativiPasswordVerifierEngineApiMode) {
  695.         ControlStationCore.applicativiPasswordVerifierEngineApiMode = applicativiPasswordVerifierEngineApiMode;
  696.     }

  697.     private String applicativiPwConfiguration = null;
  698.     public String getApplicativiPasswordConfiguration() {
  699.         return this.applicativiPwConfiguration;
  700.     }
  701.     private boolean applicativiBasicPwEnableConstraints = false;
  702.     public boolean isApplicativiBasicPasswordEnableConstraints() {
  703.         return this.applicativiBasicPwEnableConstraints;
  704.     }
  705.     private PasswordVerifier applicativiPwVerifierEngine = null;
  706.     private CryptConfig applicativiPwEncryptEngine = null;
  707.     private synchronized void initApplicativiPassword() throws UtilsException {
  708.         if(this.applicativiBasicPwEnableConstraints && this.applicativiPwVerifierEngine==null){
  709.             this.applicativiPwVerifierEngine = new PasswordVerifier(this.applicativiPwConfiguration);
  710.         }
  711.         if(this.applicativiPwEncryptEngine==null){
  712.             this.applicativiPwEncryptEngine = new CryptConfig(this.applicativiPwConfiguration);
  713.         }
  714.     }
  715.     public PasswordVerifier getApplicativiPasswordVerifier() {
  716.         if(this.applicativiBasicPwEnableConstraints && this.applicativiPwConfiguration!=null){
  717.             if(this.applicativiPwVerifierEngine==null){
  718.                 try{
  719.                     this.initApplicativiPassword();
  720.                 }catch(Exception e){
  721.                     log.error(e.getMessage(),e);
  722.                 }
  723.             }
  724.             if(this.applicativiPwVerifierEngine!=null && this.applicativiPwVerifierEngine.existsRestriction()){
  725.                 return this.applicativiPwVerifierEngine;
  726.             }
  727.         }
  728.         return null;
  729.     }
  730.     public CryptConfig getApplicativiPasswordEncrypt() {
  731.         if(this.applicativiPwConfiguration!=null){
  732.             if(this.applicativiPwEncryptEngine==null){
  733.                 try{
  734.                     this.initApplicativiPassword();
  735.                 }catch(Exception e){
  736.                     log.error(e.getMessage(),e);
  737.                 }
  738.             }
  739.             return this.applicativiPwEncryptEngine;
  740.         }
  741.         return null;
  742.     }
  743.     public boolean isApplicativiPasswordEncryptEnabled() {
  744.         return this.getApplicativiPasswordEncrypt()!=null && !CryptType.PLAIN.equals(this.getApplicativiPasswordEncrypt().getCryptType());
  745.     }
  746.     private int applicativiBasicLunghezzaPwGenerate;
  747.     public int getApplicativiBasicLunghezzaPasswordGenerate() {
  748.         return this.applicativiBasicLunghezzaPwGenerate;
  749.     }
  750.     private int applicativiApiKeyLunghezzaPwGenerate;
  751.     protected int getApplicativiApiKeyLunghezzaPasswordGenerate() {
  752.         return this.applicativiApiKeyLunghezzaPwGenerate;
  753.     }
  754.    
  755.     protected ICrypt applicativiPwManager;
  756.     public ICrypt getApplicativiPasswordManager() {
  757.         return this.applicativiPwManager;
  758.     }
  759.    
  760.     /** Soggetti */
  761.    
  762.     private static CryptConfig soggettiPasswordEncryptEngineApiMode = null;
  763.     public static CryptConfig getSoggettiPasswordEncryptEngineApiMode() {
  764.         return soggettiPasswordEncryptEngineApiMode;
  765.     }
  766.     public static void setSoggettiPasswordEncryptEngineApiMode(CryptConfig soggettiPasswordEncryptEngineApiMode) {
  767.         ControlStationCore.soggettiPasswordEncryptEngineApiMode = soggettiPasswordEncryptEngineApiMode;
  768.     }
  769.     private static Integer soggettiApiKeyPasswordGeneratedLengthApiMode = null;
  770.     public static Integer getSoggettiApiKeyPasswordGeneratedLengthApiMode() {
  771.         return soggettiApiKeyPasswordGeneratedLengthApiMode;
  772.     }
  773.     public static void setSoggettiApiKeyPasswordGeneratedLengthApiMode(Integer soggettiApiKeyPasswordGeneratedLengthApiMode) {
  774.         ControlStationCore.soggettiApiKeyPasswordGeneratedLengthApiMode = soggettiApiKeyPasswordGeneratedLengthApiMode;
  775.     }
  776.     private static PasswordVerifier soggettiPasswordVerifierEngineApiMode = null;
  777.     public static PasswordVerifier getSoggettiPasswordVerifierEngineApiMode() {
  778.         return soggettiPasswordVerifierEngineApiMode;
  779.     }
  780.     public static void setSoggettiPasswordVerifierEngineApiMode(
  781.             PasswordVerifier soggettiPasswordVerifierEngineApiMode) {
  782.         ControlStationCore.soggettiPasswordVerifierEngineApiMode = soggettiPasswordVerifierEngineApiMode;
  783.     }
  784.    
  785.     private String soggettiPwConfiguration = null;
  786.     public String getSoggettiPasswordConfiguration() {
  787.         return this.soggettiPwConfiguration;
  788.     }
  789.     private boolean soggettiBasicPwEnableConstraints = false;
  790.     public boolean isSoggettiBasicPasswordEnableConstraints() {
  791.         return this.soggettiBasicPwEnableConstraints;
  792.     }
  793.     private PasswordVerifier soggettiPwVerifierEngine = null;
  794.     private CryptConfig soggettiPwEncryptEngine = null;
  795.     private synchronized void initSoggettiPassword() throws UtilsException {
  796.         if(this.soggettiBasicPwEnableConstraints && this.soggettiPwVerifierEngine==null){
  797.             this.soggettiPwVerifierEngine = new PasswordVerifier(this.soggettiPwConfiguration);
  798.         }
  799.         if(this.soggettiPwEncryptEngine==null){
  800.             this.soggettiPwEncryptEngine = new CryptConfig(this.soggettiPwConfiguration);
  801.         }
  802.     }
  803.     public PasswordVerifier getSoggettiPasswordVerifier() {
  804.         if(this.soggettiBasicPwEnableConstraints && this.soggettiPwConfiguration!=null){
  805.             if(this.soggettiPwVerifierEngine==null){
  806.                 try{
  807.                     this.initSoggettiPassword();
  808.                 }catch(Exception e){
  809.                     log.error(e.getMessage(),e);
  810.                 }
  811.             }
  812.             if(this.soggettiPwVerifierEngine!=null && this.soggettiPwVerifierEngine.existsRestriction()){
  813.                 return this.soggettiPwVerifierEngine;
  814.             }
  815.         }
  816.         return null;
  817.     }
  818.     public CryptConfig getSoggettiPasswordEncrypt() {
  819.         if(this.soggettiPwConfiguration!=null){
  820.             if(this.soggettiPwEncryptEngine==null){
  821.                 try{
  822.                     this.initSoggettiPassword();
  823.                 }catch(Exception e){
  824.                     log.error(e.getMessage(),e);
  825.                 }
  826.             }
  827.             return this.soggettiPwEncryptEngine;
  828.         }
  829.         return null;
  830.     }
  831.     public boolean isSoggettiPasswordEncryptEnabled() {
  832.         return this.getSoggettiPasswordEncrypt()!=null && !CryptType.PLAIN.equals(this.getSoggettiPasswordEncrypt().getCryptType());
  833.     }
  834.     private int soggettiBasicLunghezzaPwGenerate;
  835.     public int getSoggettiBasicLunghezzaPasswordGenerate() {
  836.         return this.soggettiBasicLunghezzaPwGenerate;
  837.     }
  838.     private int soggettiApiKeyLunghezzaPwGenerate;
  839.     protected int getSoggettiApiKeyLunghezzaPasswordGenerate() {
  840.         return this.soggettiApiKeyLunghezzaPwGenerate;
  841.     }
  842.    
  843.     protected ICrypt soggettiPwManager;
  844.     public ICrypt getSoggettiPasswordManager() {
  845.         return this.soggettiPwManager;
  846.     }
  847.    
  848.     /** MessageSecurity PropertiesSourceConfiguration */
  849.     private PropertiesSourceConfiguration messageSecurityPropertiesSourceConfiguration = null;
  850.     public PropertiesSourceConfiguration getMessageSecurityPropertiesSourceConfiguration() {
  851.         return this.messageSecurityPropertiesSourceConfiguration;
  852.     }
  853.    
  854.     /** PolicyGestioneToken PropertiesSourceConfiguration */
  855.     private PropertiesSourceConfiguration policyGestioneTokenPropertiesSourceConfiguration = null;
  856.     private boolean isPolicyGestioneTokenVerificaCertificati = false;
  857.     private List<String> policyGestioneTokenPDND = null;
  858.     public PropertiesSourceConfiguration getPolicyGestioneTokenPropertiesSourceConfiguration() {
  859.         return this.policyGestioneTokenPropertiesSourceConfiguration;
  860.     }
  861.     public boolean isPolicyGestioneTokenVerificaCertificati() {
  862.         return this.isPolicyGestioneTokenVerificaCertificati;
  863.     }
  864.     public List<String> getPolicyGestioneTokenPDND(){
  865.         return this.policyGestioneTokenPDND;
  866.     }
  867.     public boolean isPolicyGestioneTokenPDND(String pdnd){
  868.         return this.policyGestioneTokenPDND!=null && this.policyGestioneTokenPDND.contains(pdnd);
  869.     }
  870.     public String getDefaultPolicyGestioneTokenPDND(){
  871.         if(this.policyGestioneTokenPDND!=null && !this.policyGestioneTokenPDND.isEmpty()) {
  872.             return this.policyGestioneTokenPDND.get(0);
  873.         }
  874.         return null;
  875.     }
  876.     private void initPolicyGestioneTokenPDND() {
  877.         try {
  878.             List<RemoteStoreConfig> listRSC = ModIUtils.getRemoteStoreConfig();
  879.             if(listRSC!=null && !listRSC.isEmpty()) {
  880.                 this.policyGestioneTokenPDND = new ArrayList<>();
  881.                 for (RemoteStoreConfig r : listRSC) {
  882.                     if(!this.policyGestioneTokenPDND.contains(r.getTokenPolicy())) {
  883.                         this.policyGestioneTokenPDND.add(r.getTokenPolicy());
  884.                     }
  885.                 }
  886.             }
  887.         }catch(Exception e) {
  888.             ControlStationCore.logError("Errore di inizializzazione policy 'PDND': "+e.getMessage(), e);
  889.         }
  890.     }
  891.    
  892.     /** AttributeAuthority PropertiesSourceConfiguration */
  893.     private PropertiesSourceConfiguration attributeAuthorityPropertiesSourceConfiguration = null;
  894.     private boolean isAttributeAuthorityVerificaCertificati = false;
  895.     public PropertiesSourceConfiguration getAttributeAuthorityPropertiesSourceConfiguration() {
  896.         return this.attributeAuthorityPropertiesSourceConfiguration;
  897.     }
  898.     public boolean isAttributeAuthorityVerificaCertificati() {
  899.         return this.isAttributeAuthorityVerificaCertificati;
  900.     }
  901.    
  902.     /** ControlloTraffico */
  903.     private boolean isControlloTrafficoPolicyGlobaleGroupByApi;
  904.     private boolean isControlloTrafficoPolicyGlobaleFiltroApi;
  905.     private boolean isControlloTrafficoPolicyGlobaleFiltroApiSoggettoErogatore;
  906.     private List<PolicyGroupByActiveThreadsType> controlloTrafficoPolicyRateLimitingTipiGestori;
  907.     public boolean isControlloTrafficoPolicyGlobaleGroupByApi() {
  908.         return this.isControlloTrafficoPolicyGlobaleGroupByApi;
  909.     }
  910.     public boolean isControlloTrafficoPolicyGlobaleFiltroApi() {
  911.         return this.isControlloTrafficoPolicyGlobaleFiltroApi;
  912.     }
  913.     public boolean isControlloTrafficoPolicyGlobaleFiltroApiSoggettoErogatore() {
  914.         return this.isControlloTrafficoPolicyGlobaleFiltroApiSoggettoErogatore;
  915.     }
  916.     public List<PolicyGroupByActiveThreadsType> getControlloTrafficoPolicyRateLimitingTipiGestori() {
  917.         return this.controlloTrafficoPolicyRateLimitingTipiGestori;
  918.     }
  919.    
  920.     /** Auditing */
  921.     private boolean isAuditingRegistrazioneElementiBinari;
  922.     public boolean isAuditingRegistrazioneElementiBinari() {
  923.         return this.isAuditingRegistrazioneElementiBinari;
  924.     }
  925.    
  926.     /** IntegrationManager */
  927.     private boolean isIntegrationManagerEnabled;
  928.     private boolean isIntegrationManagerTraceMessageBoxOperationEnabled;
  929.     public boolean isIntegrationManagerEnabled() {
  930.         return this.isIntegrationManagerEnabled;
  931.     }
  932.     public boolean isIntegrationManagerTraceMessageBoxOperationEnabled() {
  933.         return this.isIntegrationManagerTraceMessageBoxOperationEnabled;
  934.     }
  935.    
  936.     /** Soggetti */
  937.     private Integer soggettiNomeMaxLength;
  938.     private boolean isSoggettiVerificaCertificati;
  939.     public Integer getSoggettiNomeMaxLength() {
  940.         return this.soggettiNomeMaxLength;
  941.     }
  942.     public boolean isSoggettiVerificaCertificati() {
  943.         return this.isSoggettiVerificaCertificati;
  944.     }
  945.    
  946.     /** Applicativi */
  947.     private boolean isApplicativiVerificaCertificati;
  948.     public boolean isApplicativiVerificaCertificati() {
  949.         return this.isApplicativiVerificaCertificati;
  950.     }
  951.    
  952.     /** API */
  953.     private boolean isApiResourcePathValidatorEnabled;
  954.     private boolean isApiResourceHttpMethodAndPathQualsiasiEnabled;
  955.     private List<String> getApiResourcePathQualsiasiSpecialChar;
  956.     private boolean isApiOpenAPIValidateUriReferenceAsUrl;
  957.     private boolean isApiRestResourceRepresentationMessageTypeOverride;
  958.     private boolean isApiDescriptionTruncate255;
  959.     private boolean isApiDescriptionTruncate4000;
  960.     public boolean isApiResourcePathValidatorEnabled() {
  961.         return this.isApiResourcePathValidatorEnabled;
  962.     }
  963.     public boolean isApiResourceHttpMethodAndPathQualsiasiEnabled() {
  964.         return this.isApiResourceHttpMethodAndPathQualsiasiEnabled;
  965.     }
  966.     public List<String> getGetApiResourcePathQualsiasiSpecialChar() {
  967.         return this.getApiResourcePathQualsiasiSpecialChar;
  968.     }
  969.     public boolean isApiOpenAPIValidateUriReferenceAsUrl() {
  970.         return this.isApiOpenAPIValidateUriReferenceAsUrl;
  971.     }
  972.     public boolean isApiRestResourceRepresentationMessageTypeOverride() {
  973.         return this.isApiRestResourceRepresentationMessageTypeOverride;
  974.     }
  975.     public boolean isApiDescriptionTruncate255() {
  976.         return  this.isApiDescriptionTruncate255;
  977.     }
  978.     public boolean isApiDescriptionTruncate4000() {
  979.         return  this.isApiDescriptionTruncate4000;
  980.     }
  981.    
  982.     /** Accordi di Cooperazione */
  983.     private boolean isAccordiCooperazioneEnabled;
  984.     public boolean isAccordiCooperazioneEnabled() {
  985.         return this.isAccordiCooperazioneEnabled;
  986.     }
  987.    
  988.     /** API Impl */
  989.     private boolean isErogazioniVerificaCertificati;
  990.     private boolean isFruizioniVerificaCertificati;
  991.     public boolean isErogazioniVerificaCertificati() {
  992.         return this.isErogazioniVerificaCertificati;
  993.     }
  994.     public boolean isFruizioniVerificaCertificati() {
  995.         return this.isFruizioniVerificaCertificati;
  996.     }
  997.    
  998.     /** Message Engine */
  999.     private List<String> messageEngines;
  1000.     public List<String> getMessageEngines() {
  1001.         return this.messageEngines;
  1002.     }
  1003.    
  1004.     /** Credenziali Basic */
  1005.     private boolean isSoggettiCredenzialiBasicCheckUniqueUsePassword;
  1006.     private boolean isApplicativiCredenzialiBasicCheckUniqueUsePassword;
  1007.     private static Boolean isSoggettiApplicativiCredenzialiBasicPermitSameCredentialsApiMode;
  1008.     public static void setIsSoggettiApplicativiCredenzialiBasicPermitSameCredentialsApiMode(
  1009.             Boolean isSoggettiApplicativiCredenzialiBasicPermitSameCredentialsApiMode) {
  1010.         ControlStationCore.isSoggettiApplicativiCredenzialiBasicPermitSameCredentialsApiMode = isSoggettiApplicativiCredenzialiBasicPermitSameCredentialsApiMode;
  1011.     }
  1012.     private boolean isSoggettiApplicativiCredenzialiBasicPermitSameCredentials;
  1013.     public boolean isSoggettiCredenzialiBasicCheckUniqueUsePassword() {
  1014.         return this.isSoggettiCredenzialiBasicCheckUniqueUsePassword;
  1015.     }
  1016.     public boolean isApplicativiCredenzialiBasicCheckUniqueUsePassword() {
  1017.         return this.isApplicativiCredenzialiBasicCheckUniqueUsePassword;
  1018.     }
  1019.     public boolean isSoggettiApplicativiCredenzialiBasicPermitSameCredentials() {
  1020.         if(ControlStationCore.isAPIMode() && isSoggettiApplicativiCredenzialiBasicPermitSameCredentialsApiMode!=null) {
  1021.             return isSoggettiApplicativiCredenzialiBasicPermitSameCredentialsApiMode;
  1022.         }
  1023.         return this.isSoggettiApplicativiCredenzialiBasicPermitSameCredentials;
  1024.     }
  1025.    
  1026.     /** Credenziali Ssl */
  1027.     private static Boolean isSoggettiApplicativiCredenzialiSslPermitSameCredentialsApiMode;
  1028.     public static void setIsSoggettiApplicativiCredenzialiSslPermitSameCredentialsApiMode(
  1029.             Boolean isSoggettiApplicativiCredenzialiSslPermitSameCredentialsApiMode) {
  1030.         ControlStationCore.isSoggettiApplicativiCredenzialiSslPermitSameCredentialsApiMode = isSoggettiApplicativiCredenzialiSslPermitSameCredentialsApiMode;
  1031.     }
  1032.     private boolean isSoggettiApplicativiCredenzialiSslPermitSameCredentials;
  1033.     public boolean isSoggettiApplicativiCredenzialiSslPermitSameCredentials() {
  1034.         if(ControlStationCore.isAPIMode() && isSoggettiApplicativiCredenzialiSslPermitSameCredentialsApiMode!=null) {
  1035.             return isSoggettiApplicativiCredenzialiSslPermitSameCredentialsApiMode;
  1036.         }
  1037.         return this.isSoggettiApplicativiCredenzialiSslPermitSameCredentials;
  1038.     }
  1039.    
  1040.     /** Credenziali Principal */
  1041.     private static Boolean isSoggettiApplicativiCredenzialiPrincipalPermitSameCredentialsApiMode;
  1042.     public static void setIsSoggettiApplicativiCredenzialiPrincipalPermitSameCredentialsApiMode(
  1043.             Boolean isSoggettiApplicativiCredenzialiPrincipalPermitSameCredentialsApiMode) {
  1044.         ControlStationCore.isSoggettiApplicativiCredenzialiPrincipalPermitSameCredentialsApiMode = isSoggettiApplicativiCredenzialiPrincipalPermitSameCredentialsApiMode;
  1045.     }
  1046.     private boolean isSoggettiApplicativiCredenzialiPrincipalPermitSameCredentials;
  1047.     public boolean isSoggettiApplicativiCredenzialiPrincipalPermitSameCredentials() {
  1048.         if(ControlStationCore.isAPIMode() && isSoggettiApplicativiCredenzialiPrincipalPermitSameCredentialsApiMode!=null) {
  1049.             return isSoggettiApplicativiCredenzialiPrincipalPermitSameCredentialsApiMode;
  1050.         }
  1051.         return this.isSoggettiApplicativiCredenzialiPrincipalPermitSameCredentials;
  1052.     }
  1053.    
  1054.     /** Connettori */
  1055.     private boolean isConnettoriAllTypesEnabled;
  1056.     public boolean isConnettoriAllTypesEnabled() {
  1057.         return this.isConnettoriAllTypesEnabled;
  1058.     }
  1059.    
  1060.     /** Connettori Multipli */
  1061.     private boolean isConnettoriMultipliEnabled;
  1062.     public boolean isConnettoriMultipliEnabled() {
  1063.         return this.isConnettoriMultipliEnabled;
  1064.     }
  1065.     private boolean isConnettoriMultipliConsegnaCondizionaleStessFiltroPermesso;
  1066.     public boolean isConnettoriMultipliConsegnaCondizionaleStessFiltroPermesso() {
  1067.         return this.isConnettoriMultipliConsegnaCondizionaleStessFiltroPermesso;
  1068.     }
  1069.     private boolean isConnettoriMultipliConsegnaMultiplaEnabled;
  1070.     public boolean isConnettoriMultipliConsegnaMultiplaEnabled() {
  1071.         return this.isConnettoriMultipliConsegnaMultiplaEnabled;
  1072.     }
  1073.    
  1074.     /** Connettori Multipli */
  1075.     private boolean isApplicativiServerEnabled;
  1076.     public boolean isApplicativiServerEnabled(ConsoleHelper helper) {
  1077.         if(helper.isModalitaCompleta()) {
  1078.             return false;
  1079.         }
  1080.         return this.isApplicativiServerEnabled;
  1081.     }

  1082.     /** Gestione Consegne Asincrone */
  1083.     private List<String> consegnaNotificaCode;
  1084.     private Map<String, String> consegnaNotificaCodaLabel = new HashMap<>();
  1085.     private List<String> consegnaNotificaPriorita;
  1086.     private Map<String, ConfigurazionePriorita> consegnaNotificaConfigurazionePriorita = new HashMap<>();
  1087.     public List<String> getConsegnaNotificaCode() {
  1088.         return this.consegnaNotificaCode;
  1089.     }
  1090.     public String getConsegnaNotificaCodaLabel(String nome) {
  1091.         return this.consegnaNotificaCodaLabel.get(nome);
  1092.     }
  1093.     public List<String> getConsegnaNotificaPriorita() {
  1094.         return this.consegnaNotificaPriorita;
  1095.     }
  1096.     public ConfigurazionePriorita getConsegnaNotificaConfigurazionePriorita(String nome) {
  1097.         return this.consegnaNotificaConfigurazionePriorita.get(nome);
  1098.     }
  1099.    
  1100.     /** ModI */
  1101.     private boolean isModipaErogazioniVerificaCertificati;
  1102.     private boolean isModipaFruizioniVerificaCertificati;
  1103.     private boolean isModipaFruizioniConnettoreCheckHttps;
  1104.     private boolean isModipaFiltroRicercaProfiloQualsiasiVisualizzaDatiModi;
  1105.     public boolean isModipaErogazioniVerificaCertificati() {
  1106.         return this.isModipaErogazioniVerificaCertificati;
  1107.     }
  1108.     public boolean isModipaFruizioniVerificaCertificati() {
  1109.         return this.isModipaFruizioniVerificaCertificati;
  1110.     }
  1111.     public boolean isModipaFruizioniConnettoreCheckHttps() {
  1112.         return this.isModipaFruizioniConnettoreCheckHttps;
  1113.     }
  1114.     public boolean isModipaFiltroRicercaProfiloQualsiasiVisualizzaDatiModi() {
  1115.         return this.isModipaFiltroRicercaProfiloQualsiasiVisualizzaDatiModi;
  1116.     }
  1117.    
  1118.     /** Plugins */
  1119.     private boolean configurazionePluginsEnabled = false;
  1120.     private Integer configurazionePluginsSeconds = null;
  1121.     public boolean isConfigurazionePluginsEnabled() {
  1122.         return this.configurazionePluginsEnabled;
  1123.     }
  1124.    
  1125.     /** Handlers */
  1126.     private boolean configurazioneHandlersEnabled = false;
  1127.     public boolean isConfigurazioneHandlersEnabled() {
  1128.         return this.configurazioneHandlersEnabled;
  1129.     }
  1130.    
  1131.     /** Configurazione Allarmi */
  1132.     private boolean configurazioneAllarmiEnabled = false;
  1133.     private Integer countPluginsAllarmi = null;
  1134.     public boolean isConfigurazioneAllarmiEnabled() {
  1135.         return this.configurazioneAllarmiEnabled;
  1136.     }
  1137.     private AlarmEngineConfig allarmiConfig = null;
  1138.     public AlarmEngineConfig getAllarmiConfig() {
  1139.         return this.allarmiConfig;
  1140.     }
  1141.     private boolean showAllarmiIdentificativoRuntime = false;
  1142.     public Boolean isShowAllarmiIdentificativoRuntime() {
  1143.         return this.showAllarmiIdentificativoRuntime;
  1144.     }
  1145.     private boolean showAllarmiFormNomeSuggeritoCreazione = false;
  1146.     public Boolean isShowAllarmiFormNomeSuggeritoCreazione() {
  1147.         return this.showAllarmiFormNomeSuggeritoCreazione;
  1148.     }
  1149.     private boolean showAllarmiFormStatoAllarme = false;
  1150.     public Boolean isShowAllarmiFormStatoAllarme() {
  1151.         return this.showAllarmiFormStatoAllarme;
  1152.     }
  1153.     private boolean showAllarmiFormStatoAllarmeHistory = false;
  1154.     public Boolean isShowAllarmiFormStatoAllarmeHistory() {
  1155.         return this.showAllarmiFormStatoAllarmeHistory;
  1156.     }
  1157.     private boolean showAllarmiSearchStatiAllarmi = false;
  1158.     public Boolean isShowAllarmiSearchStatiAllarmi() {
  1159.         return this.showAllarmiSearchStatiAllarmi;
  1160.     }
  1161.     private boolean showAllarmiElenchiStatiAllarmi = false;
  1162.     public Boolean isShowAllarmiElenchiStatiAllarmi() {
  1163.         return this.showAllarmiElenchiStatiAllarmi;
  1164.     }
  1165.    
  1166.     /** Registrazione Messaggi */
  1167.     private boolean isRegistrazioneMessaggiMultipartPayloadParsingEnabled = false;
  1168.     public Boolean isRegistrazioneMessaggiMultipartPayloadParsingEnabled() {
  1169.         return this.isRegistrazioneMessaggiMultipartPayloadParsingEnabled;
  1170.     }
  1171.    
  1172.     /** Cluster dinamico */
  1173.     private boolean isClusterDinamicoEnabled = false;
  1174.     public Boolean isClusterDinamicoEnabled() {
  1175.         return this.isClusterDinamicoEnabled;
  1176.     }
  1177.    
  1178.     /** BYOK */

  1179.     private boolean visualizzaInformazioniCifrate = false;
  1180.     public boolean isVisualizzaInformazioniCifrate() {
  1181.         return this.visualizzaInformazioniCifrate;
  1182.     }
  1183.     private String byokWarningMessage = null;
  1184.     public String getByokWarningMessage() {
  1185.         return this.byokWarningMessage;
  1186.     }
  1187.     private String notaInformativaInformazioneMemorizzataInChiaro = null;
  1188.     public String getNotaInformativaInformazioneMemorizzataInChiaro() {
  1189.         return this.notaInformativaInformazioneMemorizzataInChiaro;
  1190.     }
  1191.     private String notaInformativaInformazioneCifrataSecurityPolicyDifferente = null;
  1192.     public String getNotaInformativaInformazioneCifrataSecurityPolicyDifferente() {
  1193.         return this.notaInformativaInformazioneCifrataSecurityPolicyDifferente;
  1194.     }
  1195.     private boolean visualizzaCampiPasswordComeLock = false;
  1196.     public boolean isVisualizzaCampiPasswordComeLock() {
  1197.         return this.visualizzaCampiPasswordComeLock;
  1198.     }

  1199.     /** OCSP */
  1200.     private boolean isOCSPPolicyChoiceConnettoreHTTPSVerificaServerDisabilitata = false;
  1201.     public boolean isOCSPPolicyChoiceConnettoreHTTPSVerificaServerDisabilitata() {
  1202.         return this.isOCSPPolicyChoiceConnettoreHTTPSVerificaServerDisabilitata;
  1203.     }
  1204.    
  1205.     /** Certificati */
  1206.     private int verificaCertificatiWarningExpirationDays;
  1207.     private boolean verificaCertificatiSceltaClusterId;
  1208.     public int getVerificaCertificatiWarningExpirationDays() {
  1209.         return this.verificaCertificatiWarningExpirationDays;
  1210.     }
  1211.     public boolean isVerificaCertificatiSceltaClusterId() {
  1212.         return this.verificaCertificatiSceltaClusterId;
  1213.     }
  1214.    
  1215.     /** Cluster */
  1216.     private boolean isClusterAsyncUpdate;
  1217.     private int clusterAsyncUpdateCheckInterval;
  1218.     public boolean isClusterAsyncUpdate() {
  1219.         return this.isClusterAsyncUpdate;
  1220.     }
  1221.     public int getClusterAsyncUpdateCheckInterval() {
  1222.         return this.clusterAsyncUpdateCheckInterval;
  1223.     }
  1224.    
  1225.     /** Tracciamento */
  1226.     private boolean isTracciamentoDatabaseRispostaConsegnataSelectEnabled;
  1227.     public boolean isTracciamentoDatabaseRispostaConsegnataSelectEnabled() {
  1228.         return this.isTracciamentoDatabaseRispostaConsegnataSelectEnabled;
  1229.     }
  1230.    
  1231.     /** Keystore */
  1232.     private boolean isKeystoreJksPasswordRequired;
  1233.     public boolean isKeystoreJksPasswordRequired() {
  1234.         return this.isKeystoreJksPasswordRequired;
  1235.     }
  1236.     private boolean isKeystoreJksKeyPasswordRequired;
  1237.     public boolean isKeystoreJksKeyPasswordRequired() {
  1238.         return this.isKeystoreJksKeyPasswordRequired;
  1239.     }
  1240.     private boolean isKeystorePkcs12PasswordRequired;
  1241.     public boolean isKeystorePkcs12PasswordRequired() {
  1242.         return this.isKeystorePkcs12PasswordRequired;
  1243.     }
  1244.     private boolean isKeystorePkcs12KeyPasswordRequired;
  1245.     public boolean isKeystorePkcs12KeyPasswordRequired() {
  1246.         return this.isKeystorePkcs12KeyPasswordRequired;
  1247.     }
  1248.     private boolean isTruststoreJksPasswordRequired;
  1249.     public boolean isTruststoreJksPasswordRequired() {
  1250.         return this.isTruststoreJksPasswordRequired;
  1251.     }
  1252.     private boolean isTruststorePkcs12PasswordRequired;
  1253.     public boolean isTruststorePkcs12PasswordRequired() {
  1254.         return this.isTruststorePkcs12PasswordRequired;
  1255.     }
  1256.     private boolean isLoadCertificateWizardJksPasswordRequiredRequired;
  1257.     public boolean isLoadCertificateWizardJksPasswordRequiredRequired() {
  1258.         return this.isLoadCertificateWizardJksPasswordRequiredRequired;
  1259.     }
  1260.     private boolean isLoadCertificateWizardPkcs12PasswordRequiredRequired;
  1261.     public boolean isLoadCertificateWizardPkcs12PasswordRequiredRequired() {
  1262.         return this.isLoadCertificateWizardPkcs12PasswordRequiredRequired;
  1263.     }

  1264.     /** Parametri pdd */
  1265.     private int portaPubblica = 80;
  1266.     private int portaGestione = 80;
  1267.     private String indirizzoPubblico;
  1268.     private String indirizzoGestione;
  1269.     public int getPortaPubblica() {
  1270.         return this.portaPubblica;
  1271.     }
  1272.     public int getPortaGestione() {
  1273.         return this.portaGestione;
  1274.     }
  1275.     public String getIndirizzoPubblico() {
  1276.         return this.indirizzoPubblico;
  1277.     }
  1278.     public String getIndirizzoGestione() {
  1279.         return this.indirizzoGestione;
  1280.     }
  1281.    
  1282.     /** Opzioni di visualizzazione */
  1283.     private boolean showCorrelazioneAsincronaInAccordi = false;
  1284.     private boolean showFlagPrivato = false;
  1285.     private boolean showAllConnettori = false;
  1286.     private boolean showDebugOptionConnettore = true;
  1287.     private boolean showPulsantiImportExport = false;
  1288.     private int elenchiMenuIdentificativiLunghezzaMassima = 100;
  1289.     private boolean showCountElementInLinkList = false;
  1290.     private boolean conservaRisultatiRicerca = false;
  1291.    
  1292.     private static Boolean conservaRisultatiRicercaStaticInfoRead = null;
  1293.     private static boolean conservaRisultatiRicercaStaticInfo = false;
  1294.     public static Boolean getConservaRisultatiRicercaStaticInfoRead() {
  1295.         return conservaRisultatiRicercaStaticInfoRead;
  1296.     }
  1297.     public static void setConservaRisultatiRicercaStaticInfoRead(Boolean conservaRisultatiRicercaStaticInfoRead) {
  1298.         ControlStationCore.conservaRisultatiRicercaStaticInfoRead = conservaRisultatiRicercaStaticInfoRead;
  1299.     }
  1300.     public static boolean isConservaRisultatiRicercaStaticInfo() {
  1301.         return conservaRisultatiRicercaStaticInfo;
  1302.     }
  1303.     public static void setConservaRisultatiRicercaStaticInfo(boolean conservaRisultatiRicercaStaticInfo) {
  1304.         ControlStationCore.conservaRisultatiRicercaStaticInfo = conservaRisultatiRicercaStaticInfo;
  1305.     }
  1306.    
  1307.     private boolean showAccordiColonnaAzioni = false;
  1308.     private boolean showAccordiInformazioniProtocollo = false;
  1309.     private boolean showConfigurazioniPersonalizzate = false;
  1310.     private boolean showGestioneSoggettiRouter = false;
  1311.     private boolean showGestioneSoggettiVirtuali = false;
  1312.     private boolean showGestioneWorkflowStatoDocumenti = false;
  1313.     private boolean gestioneWorkflowStatoDocumentiVisualizzaStatoLista = false;
  1314.     private boolean gestioneWorkflowStatoDocumentiRipristinoStatoOperativoDaFinale = false;
  1315.     private boolean showInterfacceAPI = false;
  1316.     private boolean showAllegati = false;
  1317.     private boolean enableAutoMappingWsdlIntoAccordo = false;
  1318.     private boolean enableAutoMappingWsdlIntoAccordoEstrazioneSchemiInWsdlTypes = false;
  1319.     private boolean showMTOMVisualizzazioneCompleta = false;
  1320.     private int portaCorrelazioneApplicativaMaxLength = 255;
  1321.     private boolean showPortaDelegataLocalForward = false;
  1322.     private boolean isProprietaErogazioniShowModalitaStandard;
  1323.     private boolean isProprietaFruizioniShowModalitaStandard;
  1324.     private boolean isPortTypeObbligatorioImplementazioniSOAP = true;
  1325.     private boolean isElenchiSAAsincroniNonSupportatiVisualizzaRispostaAsincrona = false;
  1326.     private boolean isVisualizzazioneConfigurazioneDiagnosticaLog4J = true;
  1327.     private String tokenPolicyForceId = null;
  1328.     private boolean tokenPolicyForceIdEnabled = false;
  1329.     private Properties tokenPolicyTipologia = null;
  1330.     private String attributeAuthorityForceId = null;
  1331.     private boolean attributeAuthorityForceIdEnabled = false;
  1332.     private Properties attributeAuthorityTipologia = null;
  1333.     private boolean showServiziVisualizzaModalitaElenco = false;
  1334.     private Integer selectListSoggettiOperativiNumeroMassimoSoggetti = null;
  1335.     private Integer selectListSoggettiOperativiDimensioneMassimaLabel = null;
  1336.     private Integer viewLunghezzaMassimaInformazione = null;
  1337.     private boolean isSetSearchAfterAdd = false;
  1338.     private boolean elenchiVisualizzaComandoResetCacheSingoloElemento = false;
  1339.     private Integer validitaTokenCsrf = null;
  1340.     private String cspHeaderValue = null;
  1341.    
  1342.     public boolean isShowCorrelazioneAsincronaInAccordi() {
  1343.         return this.showCorrelazioneAsincronaInAccordi;
  1344.     }
  1345.     public boolean isShowFlagPrivato() {
  1346.         return this.showFlagPrivato;
  1347.     }
  1348.     public boolean isShowAllConnettori() {
  1349.         return this.showAllConnettori;
  1350.     }
  1351.     public boolean isShowDebugOptionConnettore() {
  1352.         return this.showDebugOptionConnettore;
  1353.     }  
  1354.     public boolean isShowPulsantiImportExport() {
  1355.         return this.showPulsantiImportExport;
  1356.     }
  1357.     public int getElenchiMenuIdentificativiLunghezzaMassima() {
  1358.         return this.elenchiMenuIdentificativiLunghezzaMassima;
  1359.     }
  1360.     public boolean isShowCountElementInLinkList() {
  1361.         return this.showCountElementInLinkList;
  1362.     }
  1363.     public boolean isConservaRisultatiRicerca() {
  1364.         return this.conservaRisultatiRicerca;
  1365.     }
  1366.     public boolean isShowAccordiColonnaAzioni() {
  1367.         return this.showAccordiColonnaAzioni;
  1368.     }
  1369.     public boolean isShowAccordiInformazioniProtocollo() {
  1370.         return this.showAccordiInformazioniProtocollo;
  1371.     }
  1372.     public boolean isShowConfigurazioniPersonalizzate() {
  1373.         return this.showConfigurazioniPersonalizzate;
  1374.     }
  1375.     public boolean isShowGestioneSoggettiRouter() {
  1376.         return this.showGestioneSoggettiRouter;
  1377.     }
  1378.     public boolean isShowGestioneSoggettiVirtuali() {
  1379.         return this.showGestioneSoggettiVirtuali;
  1380.     }
  1381.     public boolean isShowGestioneWorkflowStatoDocumenti(ConsoleHelper consoleHelper) {
  1382.         return this.showGestioneWorkflowStatoDocumenti && consoleHelper.isModalitaCompleta();
  1383.     }
  1384.     public boolean isGestioneWorkflowStatoDocumentiVisualizzaStatoLista() {
  1385.         return this.gestioneWorkflowStatoDocumentiVisualizzaStatoLista;
  1386.     }
  1387.     public boolean isGestioneWorkflowStatoDocumentiRipristinoStatoOperativoDaFinale() {
  1388.         return this.gestioneWorkflowStatoDocumentiRipristinoStatoOperativoDaFinale;
  1389.     }
  1390.     public boolean isShowInterfacceAPI() {
  1391.         return this.showInterfacceAPI;
  1392.     }
  1393.     public boolean isShowAllegati() {
  1394.         return this.showAllegati;
  1395.     }
  1396.     public boolean isEnableAutoMappingWsdlIntoAccordo() {
  1397.         return this.enableAutoMappingWsdlIntoAccordo;
  1398.     }
  1399.     public boolean isEnableAutoMappingWsdlIntoAccordoEstrazioneSchemiInWsdlTypes() {
  1400.         return this.enableAutoMappingWsdlIntoAccordoEstrazioneSchemiInWsdlTypes;
  1401.     }
  1402.     public boolean isShowMTOMVisualizzazioneCompleta() {
  1403.         return this.showMTOMVisualizzazioneCompleta;
  1404.     }
  1405.     public int getPortaCorrelazioneApplicativaMaxLength() {
  1406.         return this.portaCorrelazioneApplicativaMaxLength;
  1407.     }
  1408.     public boolean isShowPortaDelegataLocalForward() {
  1409.         return this.showPortaDelegataLocalForward;
  1410.     }
  1411.     public boolean isProprietaErogazioniShowModalitaStandard() {
  1412.         return this.isProprietaErogazioniShowModalitaStandard;
  1413.     }
  1414.     public boolean isProprietaFruizioniShowModalitaStandard() {
  1415.         return this.isProprietaFruizioniShowModalitaStandard;
  1416.     }
  1417.     public boolean isPortTypeObbligatorioImplementazioniSOAP() {
  1418.         return this.isPortTypeObbligatorioImplementazioniSOAP;
  1419.     }
  1420.     public boolean isElenchiSAAsincroniNonSupportatiVisualizzaRispostaAsincrona() {
  1421.         return this.isElenchiSAAsincroniNonSupportatiVisualizzaRispostaAsincrona;
  1422.     }
  1423.     public boolean isVisualizzazioneConfigurazioneDiagnosticaLog4J() {
  1424.         return this.isVisualizzazioneConfigurazioneDiagnosticaLog4J;
  1425.     }
  1426.     public String getTokenPolicyForceId() {
  1427.         return this.tokenPolicyForceId;
  1428.     }
  1429.     public boolean isTokenPolicyForceIdEnabled() {
  1430.         return this.tokenPolicyForceIdEnabled;
  1431.     }
  1432.     public Properties getTokenPolicyTipologia() {
  1433.         return this.tokenPolicyTipologia;
  1434.     }
  1435.     public String getAttributeAuthorityForceId() {
  1436.         return this.attributeAuthorityForceId;
  1437.     }
  1438.     public boolean isAttributeAuthorityForceIdEnabled() {
  1439.         return this.attributeAuthorityForceIdEnabled;
  1440.     }
  1441.     public Properties getAttributeAuthorityTipologia() {
  1442.         return this.attributeAuthorityTipologia;
  1443.     }
  1444.     public boolean isShowServiziVisualizzaModalitaElenco() {
  1445.         return this.showServiziVisualizzaModalitaElenco;
  1446.     }
  1447.     public Integer getNumeroMassimoSoggettiSelectListSoggettiOperatiti() {
  1448.         return this.selectListSoggettiOperativiNumeroMassimoSoggetti;
  1449.     }
  1450.     public Integer getLunghezzaMassimaLabelSoggettiOperativiMenuUtente() {
  1451.         return this.selectListSoggettiOperativiDimensioneMassimaLabel;
  1452.     }
  1453.     public Integer getViewLunghezzaMassimaInformazione() {
  1454.         return this.viewLunghezzaMassimaInformazione;
  1455.     }
  1456.     public boolean isSetSearchAfterAdd() {
  1457.         return this.isSetSearchAfterAdd;
  1458.     }
  1459.     public Integer getValiditaTokenCsrf() {
  1460.         return this.validitaTokenCsrf;
  1461.     }
  1462.     public String getCspHeaderValue() {
  1463.         return this.cspHeaderValue;
  1464.     }
  1465.     public boolean showCodaMessage() {
  1466.         return this.isShowJ2eeOptions() || this.isIntegrationManagerEnabled();
  1467.     }
  1468.     public boolean isElenchiVisualizzaComandoResetCacheSingoloElemento() {
  1469.         return this.elenchiVisualizzaComandoResetCacheSingoloElemento;
  1470.     }

  1471.     /** Motori di Sincronizzazione */
  1472.     private boolean sincronizzazionePddEngineEnabled;
  1473.     private String sincronizzazionePddEngineEnabled_prefissoNomeCodaConfigurazionePdd;
  1474.     private String sincronizzazionePddEngineEnabled_scriptShell_Path;
  1475.     private String sincronizzazionePddEngineEnabled_scriptShell_Args;
  1476.     private boolean sincronizzazioneRegistroEngineEnabled;
  1477.     private boolean sincronizzazioneGEEngineEnabled;
  1478.     private String sincronizzazioneGE_TipoSoggetto;
  1479.     private String sincronizzazioneGE_NomeSoggetto;
  1480.     private String sincronizzazioneGE_NomeServizioApplicativo;
  1481.     public boolean isSincronizzazionePddEngineEnabled() {
  1482.         return this.sincronizzazionePddEngineEnabled;
  1483.     }
  1484.     public String getSincronizzazionePddEngineEnabled_prefissoNomeCodaConfigurazionePdd() {
  1485.         return this.sincronizzazionePddEngineEnabled_prefissoNomeCodaConfigurazionePdd;
  1486.     }
  1487.     public String getSincronizzazionePddEngineEnabled_scriptShell_Path() {
  1488.         return this.sincronizzazionePddEngineEnabled_scriptShell_Path;
  1489.     }
  1490.     public String getSincronizzazionePddEngineEnabled_scriptShell_Args() {
  1491.         return this.sincronizzazionePddEngineEnabled_scriptShell_Args;
  1492.     }
  1493.     public boolean isSincronizzazioneRegistroEngineEnabled() {
  1494.         return this.sincronizzazioneRegistroEngineEnabled;
  1495.     }
  1496.     public boolean isSincronizzazioneGEEngineEnabled() {
  1497.         return this.sincronizzazioneGEEngineEnabled;
  1498.     }
  1499.     public String getSincronizzazioneGE_TipoSoggetto() {
  1500.         return this.sincronizzazioneGE_TipoSoggetto;
  1501.     }
  1502.     public String getSincronizzazioneGE_NomeSoggetto() {
  1503.         return this.sincronizzazioneGE_NomeSoggetto;
  1504.     }
  1505.     public String getSincronizzazioneGE_NomeServizioApplicativo() {
  1506.         return this.sincronizzazioneGE_NomeServizioApplicativo;
  1507.     }

  1508.     /** Opzioni di importazione Archivi */
  1509.     private String importArchivi_tipoPdD;
  1510.     private boolean exportArchive_configurazione_soloDumpCompleto;
  1511.     private boolean exportArchive_servizi_standard;
  1512.     public String getImportArchivi_tipoPdD() {
  1513.         return this.importArchivi_tipoPdD;
  1514.     }
  1515.     public boolean isExportArchive_configurazione_soloDumpCompleto() {
  1516.         return this.exportArchive_configurazione_soloDumpCompleto;
  1517.     }
  1518.     public boolean isExportArchive_servizi_standard() {
  1519.         return this.exportArchive_servizi_standard;
  1520.     }

  1521.     /** Multitenant */
  1522.     private boolean multitenant = false;
  1523.     private MultitenantSoggettiErogazioni multitenantSoggettiErogazioni = null;
  1524.     private MultitenantSoggettiFruizioni multitenantSoggettiFruizioni = null;
  1525.     public boolean isMultitenant() {
  1526.         return this.multitenant;
  1527.     }
  1528.     public MultitenantSoggettiErogazioni getMultitenantSoggettiErogazioni() {
  1529.         return this.multitenantSoggettiErogazioni;
  1530.     }
  1531.     public MultitenantSoggettiFruizioni getMultitenantSoggettiFruizioni() {
  1532.         return this.multitenantSoggettiFruizioni;
  1533.     }
  1534.    
  1535.     /** Altro */
  1536.     private String suffissoConnettoreAutomatico;
  1537.     private boolean enabledToken_generazioneAutomaticaPorteDelegate;
  1538.     private boolean enabledAutenticazione_generazioneAutomaticaPorteDelegate;
  1539.     private String autenticazione_generazioneAutomaticaPorteDelegate;
  1540.     private boolean enabledAutorizzazione_generazioneAutomaticaPorteDelegate;
  1541.     private String autorizzazione_generazioneAutomaticaPorteDelegate;
  1542.     private boolean enabledToken_generazioneAutomaticaPorteApplicative;
  1543.     private boolean enabledAutenticazione_generazioneAutomaticaPorteApplicative;
  1544.     private String autenticazione_generazioneAutomaticaPorteApplicative;
  1545.     private boolean enabledAutorizzazione_generazioneAutomaticaPorteApplicative;
  1546.     private String autorizzazione_generazioneAutomaticaPorteApplicative;
  1547.     private boolean isAbilitatoControlloUnicitaImplementazionePortTypePerSoggetto;
  1548.     private boolean isAbilitatoControlloUnicitaImplementazioneAccordoPerSoggetto;
  1549.     public String getSuffissoConnettoreAutomatico() {
  1550.         return this.suffissoConnettoreAutomatico;
  1551.     }
  1552.     public boolean isEnabledToken_generazioneAutomaticaPorteDelegate() {
  1553.         return this.enabledToken_generazioneAutomaticaPorteDelegate;
  1554.     }
  1555.     public boolean isEnabledAutenticazione_generazioneAutomaticaPorteDelegate() {
  1556.         return this.enabledAutenticazione_generazioneAutomaticaPorteDelegate;
  1557.     }
  1558.     public String getAutenticazione_generazioneAutomaticaPorteDelegate() {
  1559.         return this.autenticazione_generazioneAutomaticaPorteDelegate;
  1560.     }
  1561.     public boolean isEnabledAutorizzazione_generazioneAutomaticaPorteDelegate() {
  1562.         return this.enabledAutorizzazione_generazioneAutomaticaPorteDelegate;
  1563.     }
  1564.     public String getAutorizzazione_generazioneAutomaticaPorteDelegate() {
  1565.         return this.autorizzazione_generazioneAutomaticaPorteDelegate;
  1566.     }
  1567.     public boolean isEnabledToken_generazioneAutomaticaPorteApplicative() {
  1568.         return this.enabledToken_generazioneAutomaticaPorteApplicative;
  1569.     }
  1570.     public boolean isEnabledAutenticazione_generazioneAutomaticaPorteApplicative() {
  1571.         return this.enabledAutenticazione_generazioneAutomaticaPorteApplicative;
  1572.     }
  1573.     public String getAutenticazione_generazioneAutomaticaPorteApplicative() {
  1574.         return this.autenticazione_generazioneAutomaticaPorteApplicative;
  1575.     }
  1576.     public boolean isEnabledAutorizzazione_generazioneAutomaticaPorteApplicative(boolean erogazioneIsSupportatoAutenticazioneSoggetti) {
  1577.         if(this.enabledAutorizzazione_generazioneAutomaticaPorteApplicative) {
  1578.             return true;
  1579.         }
  1580.         else {
  1581.             if(erogazioneIsSupportatoAutenticazioneSoggetti) {
  1582.                 // valore impostato
  1583.                 return this.enabledAutorizzazione_generazioneAutomaticaPorteApplicative;
  1584.             }
  1585.             else {
  1586.                 // Fix spcoop: se non e' supportata l'autenticazione dei soggetti, devo abilitare per default l'autorizzazione, altrimenti si crea un buco di sicurezza
  1587.                 // ritorno quindi l'indicazione originale impostata per l'autenticazione
  1588.                 return this.enabledAutenticazione_generazioneAutomaticaPorteApplicative;
  1589.             }
  1590.         }
  1591.     }
  1592.     public String getAutorizzazione_generazioneAutomaticaPorteApplicative() {
  1593.         return this.autorizzazione_generazioneAutomaticaPorteApplicative;
  1594.     }
  1595.     public boolean isAbilitatoControlloUnicitaImplementazionePortTypePerSoggetto() {
  1596.         return this.isAbilitatoControlloUnicitaImplementazionePortTypePerSoggetto;
  1597.     }
  1598.     public boolean isAbilitatoControlloUnicitaImplementazioneAccordoPerSoggetto() {
  1599.         return this.isAbilitatoControlloUnicitaImplementazioneAccordoPerSoggetto;
  1600.     }
  1601.    
  1602.     /** Opzioni per Plugins */
  1603.     private List<IExtendedMenu> pluginMenu;
  1604.     private List<IExtendedFormServlet> pluginConfigurazione;
  1605.     private Map<String, IExtendedListServlet> pluginConfigurazioneList = new HashMap<String, IExtendedListServlet>();
  1606.     private List<IExtendedConnettore> pluginConnettore;
  1607.     private IExtendedListServlet pluginPortaDelegata;
  1608.     private IExtendedListServlet pluginPortaApplicativa;
  1609.     private List<IExtendedMenu> newIExtendedMenu(String [] className) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
  1610.         if(className!=null){
  1611.             List<IExtendedMenu> list = new ArrayList<IExtendedMenu>();
  1612.             for (int i = 0; i < className.length; i++) {
  1613.                 Class<?> c = Class.forName(className[i]);
  1614.                 list.add( (IExtendedMenu) ClassLoaderUtilities.newInstance(c) );
  1615.             }
  1616.             return list;
  1617.         }
  1618.         return null;
  1619.     }
  1620.     private List<IExtendedFormServlet> newIExtendedFormServlet(String [] className) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
  1621.         if(className!=null){
  1622.             List<IExtendedFormServlet> list = new ArrayList<IExtendedFormServlet>();
  1623.             for (int i = 0; i < className.length; i++) {
  1624.                 Class<?> c = Class.forName(className[i]);
  1625.                 list.add( (IExtendedFormServlet) ClassLoaderUtilities.newInstance(c) );
  1626.             }
  1627.             return list;
  1628.         }
  1629.         return null;
  1630.     }
  1631.     private IExtendedListServlet newIExtendedListServlet(String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
  1632.         if(className!=null){
  1633.             Class<?> c = Class.forName(className);
  1634.             return (IExtendedListServlet) ClassLoaderUtilities.newInstance(c);
  1635.         }
  1636.         return null;
  1637.     }
  1638.     private List<IExtendedConnettore> newIExtendedConnettore(String [] className) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
  1639.         if(className!=null){
  1640.             List<IExtendedConnettore> list = new ArrayList<IExtendedConnettore>();
  1641.             for (int i = 0; i < className.length; i++) {
  1642.                 Class<?> c = Class.forName(className[i]);
  1643.                 list.add( (IExtendedConnettore) ClassLoaderUtilities.newInstance(c) );
  1644.             }
  1645.             return list;
  1646.         }
  1647.         return null;
  1648.     }
  1649.    
  1650.     /** Opzioni Accesso JMX della PdD */
  1651.     private boolean isVisualizzaLinkClearAllCachesRemoteCheckCacheStatus = false;
  1652.     private InvokerNodiRuntime invoker = null;
  1653.     private ConfigurazioneNodiRuntime configurazioneNodiRuntime = null;
  1654.     private DriverBYOKUtilities driverBYOKUtilities = null;
  1655.     private LockUtilities lockUtilities = null;
  1656.     private List<String> jmxPdDAliases = new ArrayList<>();
  1657.     private Map<String,List<String>>  jmxPdDGruppiAliases = new HashMap<>();
  1658.     private Map<String, String> jmxPdDDescrizioni = new HashMap<>();
  1659.     private CertificateChecker jmxPdDCertificateChecker;
  1660.     private Map<String, String> jmxPdDConfigurazioneSistemaType = new HashMap<>();
  1661.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeRisorsa = new HashMap<>();
  1662.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoVersionePdD = new HashMap<>();
  1663.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoVersioneBaseDati = new HashMap<>();
  1664.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoVersioneJava = new HashMap<>();
  1665.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoVendorJava = new HashMap<>();
  1666.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoTipoDatabase = new HashMap<>();
  1667.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoInformazioniDatabase = new HashMap<>();
  1668.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoInformazioniSSL = new HashMap<>();
  1669.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteSSL = new HashMap<>();
  1670.     private boolean jmxPdDConfigurazioneSistemaShowInformazioniCryptographyKeyLength = false;
  1671.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCryptographyKeyLength = new HashMap<>();
  1672.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCharset = new HashMap<>();
  1673.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoInformazioniInternazionalizzazione = new HashMap<>();
  1674.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteInternazionalizzazione = new HashMap<>();
  1675.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoInformazioniTimeZone = new HashMap<>();
  1676.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteTimeZone = new HashMap<>();
  1677.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaJavaNetworking = new HashMap<>();
  1678.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteProprietaJavaNetworking = new HashMap<>();
  1679.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaJavaAltro = new HashMap<>();
  1680.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaSistema = new HashMap<>();
  1681.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoMessageFactory = new HashMap<>();
  1682.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoDirectoryConfigurazione = new HashMap<>();
  1683.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoPluginProtocols = new HashMap<>();
  1684.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoInformazioniInstallazione = new HashMap<>();
  1685.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetFileTrace = new HashMap<>();
  1686.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoUpdateFileTrace = new HashMap<>();
  1687.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoUnwrapKey = new HashMap<>();
  1688.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoWrapKey = new HashMap<>();
  1689.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeRisorsaMonitoraggio = new HashMap<>();
  1690.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoConnessioniDB = new HashMap<>();
  1691.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoConnessioniJMS = new HashMap<>();
  1692.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoIdTransazioniAttive = new HashMap<>();
  1693.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoIdProtocolloTransazioniAttive = new HashMap<>();
  1694.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoConnessioniPD = new HashMap<>();
  1695.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoConnessioniPA = new HashMap<>();
  1696.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeRisorsaConfigurazionePdD = new HashMap<>();
  1697.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoSeveritaDiagnostici = new HashMap<>();
  1698.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoSeveritaDiagnosticiLog4j = new HashMap<>();
  1699.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTracciamento = new HashMap<>();
  1700.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoDumpPD = new HashMap<>();
  1701.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoDumpPA = new HashMap<>();
  1702.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoLog4jDiagnostica = new HashMap<>();
  1703.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoLog4jOpenspcoop = new HashMap<>();
  1704.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoLog4jIntegrationManager = new HashMap<>();
  1705.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoLog4jTracciamento = new HashMap<>();
  1706.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoLog4jDump = new HashMap<>();
  1707.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorStatusCode = new HashMap<>();
  1708.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorInstanceId = new HashMap<>();
  1709.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeBadResponse = new HashMap<>();
  1710.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalResponseError = new HashMap<>();
  1711.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalRequestError = new HashMap<>();
  1712.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalError = new HashMap<>();
  1713.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorDetails = new HashMap<>();
  1714.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorUseStatusCodeAsFaultCode = new HashMap<>();
  1715.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorGenerateHttpHeaderGovWayCode = new HashMap<>();
  1716.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerConsegnaContenutiApplicativi = new HashMap<>();
  1717.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerEventi = new HashMap<>();
  1718.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerFileSystemRecovery = new HashMap<>();
  1719.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreBusteOnewayNonRiscontrate = new HashMap<>();
  1720.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreBusteAsincroneNonRiscontrate = new HashMap<>();
  1721.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiEliminati = new HashMap<>();
  1722.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiScaduti = new HashMap<>();
  1723.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiNonGestiti = new HashMap<>();
  1724.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaCorrelazioneApplicativa = new HashMap<>();
  1725.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiVerificaConnessioniAttive = new HashMap<>();
  1726.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerGestorePuliziaMessaggiAnomali = new HashMap<>();
  1727.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreRepositoryBuste = new HashMap<>();
  1728.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerMonitoraggioRisorseThread = new HashMap<>();
  1729.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerRepositoryStatefulThread = new HashMap<>();
  1730.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheOrarie = new HashMap<>();
  1731.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheGiornaliere = new HashMap<>();
  1732.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheSettimanali = new HashMap<>();
  1733.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheMensili = new HashMap<>();
  1734.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerPdndTracciamentoGenerazione = new HashMap<>();
  1735.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerPdndTracciamentoPubblicazione = new HashMap<>();
  1736.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreChiaviPDND = new HashMap<>();
  1737.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreCacheChiaviPDND = new HashMap<>();
  1738.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreOperazioniRemote = new HashMap<>();
  1739.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerSvecchiamentoOperazioniRemote = new HashMap<>();
  1740.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerThresholdThread = new HashMap<>();
  1741.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreById = new HashMap<>();
  1742.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreById = new HashMap<>();
  1743.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyValidazione = new HashMap<>();
  1744.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyNegoziazione = new HashMap<>();
  1745.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreAttributeAuthority = new HashMap<>();
  1746.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyValidazione = new HashMap<>();
  1747.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyNegoziazione = new HashMap<>();
  1748.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreAttributeAuthority = new HashMap<>();
  1749.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoEnablePortaDelegata = new HashMap<>();
  1750.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoDisablePortaDelegata = new HashMap<>();
  1751.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoEnablePortaApplicativa = new HashMap<>();
  1752.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoDisablePortaApplicativa = new HashMap<>();
  1753.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoEnableConnettoreMultiplo = new HashMap<>();
  1754.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoDisableConnettoreMultiplo = new HashMap<>();
  1755.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiplo = new HashMap<>();
  1756.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiplo = new HashMap<>();
  1757.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiploRuntimeRepository = new HashMap<>();
  1758.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiploRuntimeRepository = new HashMap<>();
  1759.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAccordoCooperazione = new HashMap<>();
  1760.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApi = new HashMap<>();
  1761.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheErogazione = new HashMap<>();
  1762.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheFruizione = new HashMap<>();
  1763.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheSoggetto = new HashMap<>();
  1764.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApplicativo = new HashMap<>();
  1765.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheRuolo = new HashMap<>();
  1766.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheScope = new HashMap<>();
  1767.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyValidazione = new HashMap<>();
  1768.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyNegoziazione = new HashMap<>();
  1769.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAttributeAuthority = new HashMap<>();
  1770.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeRisorsaAccessoRegistroServizi = new HashMap<>();
  1771.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeRisorsaStatoServiziPdD = new HashMap<>();
  1772.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegata = new HashMap<>();
  1773.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataAbilitazioniPuntuali = new HashMap<>();
  1774.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataDisabilitazioniPuntuali = new HashMap<>();
  1775.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativa = new HashMap<>();
  1776.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaAbilitazioniPuntuali = new HashMap<>();
  1777.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaDisabilitazioniPuntuali = new HashMap<>();
  1778.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioIntegrationManager = new HashMap<>();
  1779.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaDelegata = new HashMap<>();
  1780.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaDelegata = new HashMap<>();
  1781.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaApplicativa = new HashMap<>();
  1782.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaApplicativa = new HashMap<>();
  1783.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioIntegrationManager = new HashMap<>();
  1784.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioIntegrationManager = new HashMap<>();
  1785.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeRisorsaDatasourceGW = new HashMap<>();
  1786.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoNumeroDatasourceGW = new HashMap<>();
  1787.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetDatasourcesGW = new HashMap<>();
  1788.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetUsedConnectionsDatasourcesGW = new HashMap<>();
  1789.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetInformazioniDatabaseDatasourcesGW = new HashMap<>();
  1790.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeRisorsaConsegnaContenutiApplicativi = new HashMap<>();
  1791.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetThreadPoolStatus  = new HashMap<>();
  1792.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetQueueConfig  = new HashMap<>();
  1793.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetApplicativiPrioritari  = new HashMap<>();
  1794.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetConnettoriPrioritari  = new HashMap<>();
  1795.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoUpdateConnettoriPrioritari  = new HashMap<>();
  1796.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoResetConnettoriPrioritari  = new HashMap<>();
  1797.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeRisorsaSystemPropertiesPdD = new HashMap<>();
  1798.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRefreshPersistentConfiguration = new HashMap<>();
  1799.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeRisorsaDatiRichieste = new HashMap<>();
  1800.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingGlobalConfigCache = new HashMap<>();
  1801.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingAPIConfigCache = new HashMap<>();
  1802.     private Map<String, List<String>> jmxPdDCaches = new HashMap<>();
  1803.     private Map<String, List<String>> jmxPdDCachesPrefill = new HashMap<>();
  1804.     private Map<String, String> jmxPdDCacheType = new HashMap<>();
  1805.     private Map<String, String> jmxPdDCacheNomeAttributoCacheAbilitata = new HashMap<>();
  1806.     private Map<String, String> jmxPdDCacheNomeMetodoStatoCache = new HashMap<>();
  1807.     private Map<String, String> jmxPdDCacheNomeMetodoResetCache = new HashMap<>();
  1808.     private Map<String, String> jmxPdDCacheNomeMetodoPrefillCache = new HashMap<>();
  1809.    
  1810.     public DriverBYOKUtilities getDriverBYOKUtilities() {
  1811.         return this.driverBYOKUtilities;
  1812.     }
  1813.     public LockUtilities getLockUtilities() {
  1814.         return this.lockUtilities;
  1815.     }
  1816.    
  1817.     public boolean isVisualizzaLinkClearAllCachesRemoteCheckCacheStatus() {
  1818.         return this.isVisualizzaLinkClearAllCachesRemoteCheckCacheStatus;
  1819.     }
  1820.     public List<String> getJmxPdDAliases() {
  1821.         return this.jmxPdDAliases;
  1822.     }
  1823.     public Map<String, List<String>> getJmxPdDGruppiAliases() {
  1824.         return this.jmxPdDGruppiAliases;
  1825.     }
  1826.     public String getJmxPdDDescrizione(String alias) throws DriverControlStationException, DriverControlStationNotFound {
  1827.         String descrizione = this.jmxPdDDescrizioni.get(alias);
  1828.         if(descrizione==null || "".equals(descrizione)){
  1829.             if(this.singlePdD){
  1830.                 descrizione = alias; // uso lo stesso nome dell'alias
  1831.             }
  1832.             else{
  1833.                 PddCore pddCore = new PddCore(this);
  1834.                 PdDControlStation pdd = pddCore.getPdDControlStation(alias); // esiste per forza
  1835.                 if(pdd.getDescrizione()!=null && "".equals(pdd.getDescrizione())){
  1836.                     descrizione = pdd.getDescrizione();
  1837.                 }
  1838.                 else{
  1839.                     descrizione = alias; // uso lo stesso nome dell'alias
  1840.                 }
  1841.             }
  1842.         }
  1843.         return descrizione;
  1844.     }
  1845.     public CertificateChecker getJmxPdDCertificateChecker() {
  1846.         return this.jmxPdDCertificateChecker;
  1847.     }
  1848.     public CertificateChecker newJmxPdDCertificateChecker(List<String> alias) throws OpenSPCoop2ConfigurationException {
  1849.         return new CertificateChecker(log, this.invoker, this.configurazioneNodiRuntime, alias, ConsoleProperties.getInstance());
  1850.     }
  1851.     public String getJmxPdDConfigurazioneSistemaType(String alias) {
  1852.         return this.jmxPdDConfigurazioneSistemaType.get(alias);
  1853.     }
  1854.     public String getJmxPdDConfigurazioneSistemaNomeRisorsa(String alias) {
  1855.         return this.jmxPdDConfigurazioneSistemaNomeRisorsa.get(alias);
  1856.     }
  1857.     public String getJmxPdDConfigurazioneSistemaNomeMetodoVersionePdD(String alias) {
  1858.         return this.jmxPdDConfigurazioneSistemaNomeMetodoVersionePdD.get(alias);
  1859.     }
  1860.     public String getJmxPdDConfigurazioneSistemaNomeMetodoVersioneBaseDati(String alias) {
  1861.         return this.jmxPdDConfigurazioneSistemaNomeMetodoVersioneBaseDati.get(alias);
  1862.     }
  1863.     public String getJmxPdDConfigurazioneSistemaNomeMetodoVersioneJava(String alias) {
  1864.         return this.jmxPdDConfigurazioneSistemaNomeMetodoVersioneJava.get(alias);
  1865.     }
  1866.     public String getJmxPdDConfigurazioneSistemaNomeMetodoVendorJava(String alias) {
  1867.         return this.jmxPdDConfigurazioneSistemaNomeMetodoVendorJava.get(alias);
  1868.     }
  1869.     public String getJmxPdDConfigurazioneSistemaNomeMetodoTipoDatabase(String alias) {
  1870.         return this.jmxPdDConfigurazioneSistemaNomeMetodoTipoDatabase.get(alias);
  1871.     }
  1872.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniDatabase(String alias) {
  1873.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniDatabase.get(alias);
  1874.     }
  1875.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniSSL(String alias) {
  1876.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniSSL.get(alias);
  1877.     }
  1878.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteSSL(String alias) {
  1879.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteSSL.get(alias);
  1880.     }
  1881.     public boolean isJmxPdD_configurazioneSistemaShowInformazioniCryptographyKeyLength() {
  1882.         return this.jmxPdDConfigurazioneSistemaShowInformazioniCryptographyKeyLength;
  1883.     }
  1884.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniCryptographyKeyLength(String alias) {
  1885.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCryptographyKeyLength.get(alias);
  1886.     }
  1887.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniCharset(String alias) {
  1888.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCharset.get(alias);
  1889.     }
  1890.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniInternazionalizzazione(String alias) {
  1891.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniInternazionalizzazione.get(alias);
  1892.     }
  1893.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteInternazionalizzazione(String alias) {
  1894.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteInternazionalizzazione.get(alias);
  1895.     }
  1896.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniTimeZone(String alias) {
  1897.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniTimeZone.get(alias);
  1898.     }
  1899.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteTimeZone(String alias) {
  1900.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteTimeZone.get(alias);
  1901.     }
  1902.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaJavaNetworking(String alias) {
  1903.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaJavaNetworking.get(alias);
  1904.     }
  1905.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteProprietaJavaNetworking(String alias) {
  1906.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteProprietaJavaNetworking.get(alias);
  1907.     }
  1908.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaJavaAltro(String alias) {
  1909.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaJavaAltro.get(alias);
  1910.     }
  1911.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaSistema(String alias) {
  1912.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaSistema.get(alias);
  1913.     }
  1914.     public String getJmxPdDConfigurazioneSistemaNomeMetodoMessageFactory(String alias) {
  1915.         return this.jmxPdDConfigurazioneSistemaNomeMetodoMessageFactory.get(alias);
  1916.     }
  1917.     public String getJmxPdDConfigurazioneSistemaNomeMetodoDirectoryConfigurazione(String alias) {
  1918.         return this.jmxPdDConfigurazioneSistemaNomeMetodoDirectoryConfigurazione.get(alias);
  1919.     }
  1920.     public String getJmxPdDConfigurazioneSistemaNomeMetodoPluginProtocols(String alias) {
  1921.         return this.jmxPdDConfigurazioneSistemaNomeMetodoPluginProtocols.get(alias);
  1922.     }
  1923.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniInstallazione(String alias) {
  1924.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniInstallazione.get(alias);
  1925.     }
  1926.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetFileTrace(String alias) {
  1927.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetFileTrace.get(alias);
  1928.     }
  1929.     public String getJmxPdDConfigurazioneSistemaNomeMetodoUpdateFileTrace(String alias) {
  1930.         return this.jmxPdDConfigurazioneSistemaNomeMetodoUpdateFileTrace.get(alias);
  1931.     }
  1932.     public String getJmxPdDConfigurazioneSistemaNomeMetodoUnwrapKey(String alias) {
  1933.         return this.jmxPdDConfigurazioneSistemaNomeMetodoUnwrapKey.get(alias);
  1934.     }
  1935.     public String getJmxPdDConfigurazioneSistemaNomeMetodoWrapKey(String alias) {
  1936.         return this.jmxPdDConfigurazioneSistemaNomeMetodoWrapKey.get(alias);
  1937.     }
  1938.     public String getJmxPdDConfigurazioneSistemaNomeRisorsaMonitoraggio(String alias) {
  1939.         return this.jmxPdDConfigurazioneSistemaNomeRisorsaMonitoraggio.get(alias);
  1940.     }
  1941.     public String getJmxPdDConfigurazioneSistemaNomeMetodoConnessioniDB(String alias) {
  1942.         return this.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniDB.get(alias);
  1943.     }
  1944.     public String getJmxPdDConfigurazioneSistemaNomeMetodoConnessioniJMS(String alias) {
  1945.         return this.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniJMS.get(alias);
  1946.     }
  1947.     public String getJmxPdDConfigurazioneSistemaNomeMetodoIdTransazioniAttive(String alias) {
  1948.         return this.jmxPdDConfigurazioneSistemaNomeMetodoIdTransazioniAttive.get(alias);
  1949.     }
  1950.     public String getJmxPdDConfigurazioneSistemaNomeMetodoIdProtocolloTransazioniAttive(String alias) {
  1951.         return this.jmxPdDConfigurazioneSistemaNomeMetodoIdProtocolloTransazioniAttive.get(alias);
  1952.     }
  1953.     public String getJmxPdDConfigurazioneSistemaNomeMetodoConnessioniPD(String alias) {
  1954.         return this.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniPD.get(alias);
  1955.     }
  1956.     public String getJmxPdDConfigurazioneSistemaNomeMetodoConnessioniPA(String alias) {
  1957.         return this.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniPA.get(alias);
  1958.     }
  1959.     public String getJmxPdDConfigurazioneSistemaNomeRisorsaConfigurazionePdD(String alias) {
  1960.         return this.jmxPdDConfigurazioneSistemaNomeRisorsaConfigurazionePdD.get(alias);
  1961.     }
  1962.     public String getJmxPdDConfigurazioneSistemaNomeAttributoSeveritaDiagnostici(String alias) {
  1963.         return this.jmxPdDConfigurazioneSistemaNomeAttributoSeveritaDiagnostici.get(alias);
  1964.     }
  1965.     public String getJmxPdDConfigurazioneSistemaNomeAttributoSeveritaDiagnosticiLog4j(String alias) {
  1966.         return this.jmxPdDConfigurazioneSistemaNomeAttributoSeveritaDiagnosticiLog4j.get(alias);
  1967.     }
  1968.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTracciamento(String alias) {
  1969.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTracciamento.get(alias);
  1970.     }
  1971.     public String getJmxPdDConfigurazioneSistemaNomeAttributoDumpPD(String alias) {
  1972.         return this.jmxPdDConfigurazioneSistemaNomeAttributoDumpPD.get(alias);
  1973.     }
  1974.     public String getJmxPdDConfigurazioneSistemaNomeAttributoDumpPA(String alias) {
  1975.         return this.jmxPdDConfigurazioneSistemaNomeAttributoDumpPA.get(alias);
  1976.     }
  1977.     public String getJmxPdDConfigurazioneSistemaNomeAttributoLog4jDiagnostica(String alias) {
  1978.         return this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jDiagnostica.get(alias);
  1979.     }
  1980.     public String getJmxPdDConfigurazioneSistemaNomeAttributoLog4jOpenspcoop(String alias) {
  1981.         return this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jOpenspcoop.get(alias);
  1982.     }
  1983.     public String getJmxPdDConfigurazioneSistemaNomeAttributoLog4jIntegrationManager(String alias) {
  1984.         return this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jIntegrationManager.get(alias);
  1985.     }
  1986.     public String getJmxPdDConfigurazioneSistemaNomeAttributoLog4jTracciamento(String alias) {
  1987.         return this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jTracciamento.get(alias);
  1988.     }
  1989.     public String getJmxPdDConfigurazioneSistemaNomeAttributoLog4jDump(String alias) {
  1990.         return this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jDump.get(alias);
  1991.     }
  1992.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorStatusCode(String alias) {
  1993.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorStatusCode.get(alias);
  1994.     }
  1995.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorInstanceId(String alias) {
  1996.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorInstanceId.get(alias);
  1997.     }
  1998.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeBadResponse(String alias) {
  1999.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeBadResponse.get(alias);
  2000.     }
  2001.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalResponseError(String alias) {
  2002.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalResponseError.get(alias);
  2003.     }
  2004.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalRequestError(String alias) {
  2005.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalRequestError.get(alias);
  2006.     }
  2007.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalError(String alias) {
  2008.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalError.get(alias);
  2009.     }
  2010.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorDetails(String alias) {
  2011.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorDetails.get(alias);
  2012.     }
  2013.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorUseStatusCodeAsFaultCode(String alias) {
  2014.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorUseStatusCodeAsFaultCode.get(alias);
  2015.     }
  2016.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorGenerateHttpHeaderGovWayCode(String alias) {
  2017.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorGenerateHttpHeaderGovWayCode.get(alias);
  2018.     }
  2019.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerConsegnaContenutiApplicativi(String alias) {
  2020.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerConsegnaContenutiApplicativi.get(alias);
  2021.     }
  2022.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerEventi(String alias) {
  2023.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerEventi.get(alias);
  2024.     }
  2025.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerFileSystemRecovery(String alias) {
  2026.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerFileSystemRecovery.get(alias);
  2027.     }
  2028.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreBusteOnewayNonRiscontrate(String alias) {
  2029.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreBusteOnewayNonRiscontrate.get(alias);
  2030.     }
  2031.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreBusteAsincroneNonRiscontrate(String alias) {
  2032.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreBusteAsincroneNonRiscontrate.get(alias);
  2033.     }
  2034.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiEliminati(String alias) {
  2035.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiEliminati.get(alias);
  2036.     }
  2037.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiScaduti(String alias) {
  2038.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiScaduti.get(alias);
  2039.     }
  2040.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiNonGestiti(String alias) {
  2041.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiNonGestiti.get(alias);
  2042.     }
  2043.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaCorrelazioneApplicativa(String alias) {
  2044.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaCorrelazioneApplicativa.get(alias);
  2045.     }
  2046.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiVerificaConnessioniAttive(String alias) {
  2047.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiVerificaConnessioniAttive.get(alias);
  2048.     }
  2049.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestorePuliziaMessaggiAnomali(String alias) {
  2050.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestorePuliziaMessaggiAnomali.get(alias);
  2051.     }
  2052.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreRepositoryBuste(String alias) {
  2053.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreRepositoryBuste.get(alias);
  2054.     }
  2055.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerMonitoraggioRisorseThread(String alias) {
  2056.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerMonitoraggioRisorseThread.get(alias);
  2057.     }
  2058.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerRepositoryStatefulThread(String alias) {
  2059.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerRepositoryStatefulThread.get(alias);
  2060.     }
  2061.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheOrarie(String alias) {
  2062.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheOrarie.get(alias);
  2063.     }
  2064.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheGiornaliere(String alias) {
  2065.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheGiornaliere.get(alias);
  2066.     }
  2067.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheSettimanali(String alias) {
  2068.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheSettimanali.get(alias);
  2069.     }
  2070.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheMensili(String alias) {
  2071.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheMensili.get(alias);
  2072.     }
  2073.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerPdndTracciamentoGenerazione(String alias) {
  2074.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerPdndTracciamentoGenerazione.get(alias);
  2075.     }
  2076.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerPdndTracciamentoPubblicazione(String alias) {
  2077.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerPdndTracciamentoPubblicazione.get(alias);
  2078.     }
  2079.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreChiaviPDND(String alias) {
  2080.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreChiaviPDND.get(alias);
  2081.     }
  2082.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreCacheChiaviPDND(String alias) {
  2083.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreCacheChiaviPDND.get(alias);
  2084.     }
  2085.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreOperazioniRemote(String alias) {
  2086.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreOperazioniRemote.get(alias);
  2087.     }
  2088.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerSvecchiamentoOperazioniRemote(String alias) {
  2089.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerSvecchiamentoOperazioniRemote.get(alias);
  2090.     }
  2091.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerThresholdThread(String alias) {
  2092.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerThresholdThread.get(alias);
  2093.     }
  2094.     public String getJmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreById(String alias) {
  2095.         return this.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreById.get(alias);
  2096.     }
  2097.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreById(String alias) {
  2098.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreById.get(alias);
  2099.     }
  2100.     public String getJmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyValidazione(String alias) {
  2101.         return this.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyValidazione.get(alias);
  2102.     }
  2103.     public String getJmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyNegoziazione(String alias) {
  2104.         return this.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyNegoziazione.get(alias);
  2105.     }
  2106.     public String getJmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreAttributeAuthority(String alias) {
  2107.         return this.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreAttributeAuthority.get(alias);
  2108.     }
  2109.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyValidazione(String alias) {
  2110.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyValidazione.get(alias);
  2111.     }
  2112.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyNegoziazione(String alias) {
  2113.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyNegoziazione.get(alias);
  2114.     }
  2115.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreAttributeAuthority(String alias) {
  2116.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreAttributeAuthority.get(alias);
  2117.     }
  2118.     public String getJmxPdDConfigurazioneSistemaNomeMetodoEnablePortaDelegata(String alias) {
  2119.         return this.jmxPdDConfigurazioneSistemaNomeMetodoEnablePortaDelegata.get(alias);
  2120.     }
  2121.     public String getJmxPdDConfigurazioneSistemaNomeMetodoDisablePortaDelegata(String alias) {
  2122.         return this.jmxPdDConfigurazioneSistemaNomeMetodoDisablePortaDelegata.get(alias);
  2123.     }
  2124.     public String getJmxPdDConfigurazioneSistemaNomeMetodoEnablePortaApplicativa(String alias) {
  2125.         return this.jmxPdDConfigurazioneSistemaNomeMetodoEnablePortaApplicativa.get(alias);
  2126.     }
  2127.     public String getJmxPdDConfigurazioneSistemaNomeMetodoDisablePortaApplicativa(String alias) {
  2128.         return this.jmxPdDConfigurazioneSistemaNomeMetodoDisablePortaApplicativa.get(alias);
  2129.     }
  2130.     public String getJmxPdDConfigurazioneSistemaNomeMetodoEnableConnettoreMultiplo(String alias) {
  2131.         return this.jmxPdDConfigurazioneSistemaNomeMetodoEnableConnettoreMultiplo.get(alias);
  2132.     }
  2133.     public String getJmxPdDConfigurazioneSistemaNomeMetodoDisableConnettoreMultiplo(String alias) {
  2134.         return this.jmxPdDConfigurazioneSistemaNomeMetodoDisableConnettoreMultiplo.get(alias);
  2135.     }
  2136.     public String getJmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiplo(String alias) {
  2137.         return this.jmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiplo.get(alias);
  2138.     }
  2139.     public String getJmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiplo(String alias) {
  2140.         return this.jmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiplo.get(alias);
  2141.     }
  2142.     public String getJmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiploRuntimeRepository(String alias) {
  2143.         return this.jmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiploRuntimeRepository.get(alias);
  2144.     }
  2145.     public String getJmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiploRuntimeRepository(String alias) {
  2146.         return this.jmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiploRuntimeRepository.get(alias);
  2147.     }
  2148.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAccordoCooperazione(String alias) {
  2149.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAccordoCooperazione.get(alias);
  2150.     }
  2151.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApi(String alias) {
  2152.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApi.get(alias);
  2153.     }
  2154.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheErogazione(String alias) {
  2155.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheErogazione.get(alias);
  2156.     }
  2157.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheFruizione(String alias) {
  2158.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheFruizione.get(alias);
  2159.     }
  2160.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheSoggetto(String alias) {
  2161.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheSoggetto.get(alias);
  2162.     }
  2163.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApplicativo(String alias) {
  2164.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApplicativo.get(alias);
  2165.     }
  2166.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheRuolo(String alias) {
  2167.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheRuolo.get(alias);
  2168.     }
  2169.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheScope(String alias) {
  2170.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheScope.get(alias);
  2171.     }
  2172.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyValidazione(String alias) {
  2173.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyValidazione.get(alias);
  2174.     }
  2175.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyNegoziazione(String alias) {
  2176.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyNegoziazione.get(alias);
  2177.     }
  2178.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAttributeAuthority(String alias) {
  2179.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAttributeAuthority.get(alias);
  2180.     }
  2181.     public String getJmxPdDConfigurazioneSistemaNomeRisorsaAccessoRegistroServizi(String alias) {
  2182.         return this.jmxPdDConfigurazioneSistemaNomeRisorsaAccessoRegistroServizi.get(alias);
  2183.     }
  2184.     public String getJmxPdDConfigurazioneSistemaNomeRisorsaStatoServiziPdD(String alias) {
  2185.         return this.jmxPdDConfigurazioneSistemaNomeRisorsaStatoServiziPdD.get(alias);
  2186.     }
  2187.     public String getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegata(String alias) {
  2188.         return this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegata.get(alias);
  2189.     }
  2190.     public String getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataAbilitazioniPuntuali(String alias) {
  2191.         return this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataAbilitazioniPuntuali.get(alias);
  2192.     }
  2193.     public String getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataDisabilitazioniPuntuali(String alias) {
  2194.         return this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataDisabilitazioniPuntuali.get(alias);
  2195.     }
  2196.     public String getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativa(String alias) {
  2197.         return this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativa.get(alias);
  2198.     }
  2199.     public String getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaAbilitazioniPuntuali(String alias) {
  2200.         return this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaAbilitazioniPuntuali.get(alias);
  2201.     }
  2202.     public String getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaDisabilitazioniPuntuali(String alias) {
  2203.         return this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaDisabilitazioniPuntuali.get(alias);
  2204.     }
  2205.     public String getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioIntegrationManager(String alias) {
  2206.         return this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioIntegrationManager.get(alias);
  2207.     }
  2208.     public String getJmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaDelegata(String alias) {
  2209.         return this.jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaDelegata.get(alias);
  2210.     }
  2211.     public String getJmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaDelegata(String alias) {
  2212.         return this.jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaDelegata.get(alias);
  2213.     }
  2214.     public String getJmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaApplicativa(String alias) {
  2215.         return this.jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaApplicativa.get(alias);
  2216.     }
  2217.     public String getJmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaApplicativa(String alias) {
  2218.         return this.jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaApplicativa.get(alias);
  2219.     }
  2220.     public String getJmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioIntegrationManager(String alias) {
  2221.         return this.jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioIntegrationManager.get(alias);
  2222.     }
  2223.     public String getJmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioIntegrationManager(String alias) {
  2224.         return this.jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioIntegrationManager.get(alias);
  2225.     }
  2226.     public String getJmxPdDConfigurazioneSistemaNomeRisorsaDatasourceGW(String alias) {
  2227.         return this.jmxPdDConfigurazioneSistemaNomeRisorsaDatasourceGW.get(alias);
  2228.     }
  2229.     public String getJmxPdDConfigurazioneSistemaNomeAttributoNumeroDatasourceGW(String alias) {
  2230.         return this.jmxPdDConfigurazioneSistemaNomeAttributoNumeroDatasourceGW.get(alias);
  2231.     }
  2232.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetDatasourcesGW(String alias) {
  2233.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetDatasourcesGW.get(alias);
  2234.     }
  2235.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetUsedConnectionsDatasourcesGW(String alias) {
  2236.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetUsedConnectionsDatasourcesGW.get(alias);
  2237.     }
  2238.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetInformazioniDatabaseDatasourcesGW(String alias) {
  2239.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetInformazioniDatabaseDatasourcesGW.get(alias);
  2240.     }
  2241.     public String getJmxPdDConfigurazioneSistemaNomeRisorsaConsegnaContenutiApplicativi(String alias) {
  2242.         return this.jmxPdDConfigurazioneSistemaNomeRisorsaConsegnaContenutiApplicativi.get(alias);
  2243.     }
  2244.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetThreadPoolStatus(String alias) {
  2245.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetThreadPoolStatus.get(alias);
  2246.     }
  2247.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetQueueConfig(String alias) {
  2248.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetQueueConfig.get(alias);
  2249.     }
  2250.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetApplicativiPrioritari(String alias) {
  2251.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetApplicativiPrioritari.get(alias);
  2252.     }
  2253.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetConnettoriPrioritari(String alias) {
  2254.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetConnettoriPrioritari.get(alias);
  2255.     }
  2256.     public String getJmxPdDConfigurazioneSistemaNomeMetodoUpdateConnettoriPrioritari(String alias) {
  2257.         return this.jmxPdDConfigurazioneSistemaNomeMetodoUpdateConnettoriPrioritari.get(alias);
  2258.     }
  2259.     public String getJmxPdDConfigurazioneSistemaNomeMetodoResetConnettoriPrioritari(String alias) {
  2260.         return this.jmxPdDConfigurazioneSistemaNomeMetodoResetConnettoriPrioritari.get(alias);
  2261.     }
  2262.     public String getJmxPdDConfigurazioneSistemaNomeRisorsaSystemPropertiesPdD(String alias) {
  2263.         return this.jmxPdDConfigurazioneSistemaNomeRisorsaSystemPropertiesPdD.get(alias);
  2264.     }
  2265.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRefreshPersistentConfiguration(String alias) {
  2266.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRefreshPersistentConfiguration.get(alias);
  2267.     }
  2268.     public String getJmxPdDConfigurazioneSistemaNomeRisorsaDatiRichieste(String alias) {
  2269.         return this.jmxPdDConfigurazioneSistemaNomeRisorsaDatiRichieste.get(alias);
  2270.     }
  2271.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingGlobalConfigCache(String alias) {
  2272.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingGlobalConfigCache.get(alias);
  2273.     }
  2274.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingAPIConfigCache(String alias) {
  2275.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingAPIConfigCache.get(alias);
  2276.     }
  2277.     public List<String> getJmxPdDCaches(String alias) {
  2278.         return this.jmxPdDCaches.get(alias);
  2279.     }
  2280.     public List<String> getJmxPdDCachesPrefill(String alias) {
  2281.         return this.jmxPdDCachesPrefill.get(alias);
  2282.     }
  2283.     public String getJmxPdDCacheType(String alias) {
  2284.         return this.jmxPdDCacheType.get(alias);
  2285.     }
  2286.     public String getJmxPdDCacheNomeAttributoCacheAbilitata(String alias) {
  2287.         return this.jmxPdDCacheNomeAttributoCacheAbilitata.get(alias);
  2288.     }
  2289.     public String getJmxPdDCacheNomeMetodoStatoCache(String alias) {
  2290.         return this.jmxPdDCacheNomeMetodoStatoCache.get(alias);
  2291.     }
  2292.     public String getJmxPdDCacheNomeMetodoResetCache(String alias) {
  2293.         return this.jmxPdDCacheNomeMetodoResetCache.get(alias);
  2294.     }
  2295.     public String getJmxPdDCacheNomeMetodoPrefillCache(String alias) {
  2296.         return this.jmxPdDCacheNomeMetodoPrefillCache.get(alias);
  2297.     }

  2298.     public InvokerNodiRuntime getInvoker() {
  2299.         return this.invoker;
  2300.     }
  2301.    
  2302.    

  2303.     /* --- COSTRUTTORI --- */

  2304.     public static Boolean API = null;
  2305.     public static synchronized void initAPIMode() {
  2306.         if(API==null) {
  2307.             API = true;
  2308.         }
  2309.     }
  2310.     public static boolean isAPIMode() {
  2311.         return API!=null && API.booleanValue();
  2312.     }
  2313.        
  2314.     protected boolean usedByApi = false;
  2315.     public boolean isUsedByApi() {
  2316.         return this.usedByApi;
  2317.     }
  2318.        
  2319.     public ControlStationCore() throws DriverControlStationException {
  2320.         this(false,null,null);
  2321.     }
  2322.    
  2323.     public ControlStationCore(boolean initForApi, String confDir, String protocolloDefault) throws DriverControlStationException {

  2324.         this.usedByApi = initForApi;
  2325.        
  2326.         if(initForApi) {
  2327.             ControlStationCore.log = LoggerWrapperFactory.getLogger(ControlStationCore.class);
  2328.             if(API==null) {
  2329.                 ControlStationCore.initAPIMode();
  2330.             }
  2331.         }
  2332.         else {
  2333.             ControlStationCore.checkInitLogger();
  2334.         }

  2335.         try{
  2336.             if(!initForApi) {
  2337.                 this.initCore();
  2338.             }

  2339.             // inizializzo il DBManager
  2340.             this.initConnections();

  2341.             // inizializzo DateManager
  2342.             DateManager.initializeDataManager(org.openspcoop2.utils.date.SystemDate.class.getName(), null, ControlStationCore.log);

  2343.             // inizializzo JMX/BYOK
  2344.             if(initForApi) {
  2345.                 initBYOK(ConfigurazioneNodiRuntime.getConfigurazioneNodiRuntime());
  2346.             }
  2347.             else {
  2348.                 this.initCoreJmxResources();
  2349.             }

  2350.             // inizializza l'AuditManager
  2351.             ControlStationCore.initializeAuditManager(this.tipoDB);

  2352.             // inizializzo Core SICAContext
  2353.             //this.contextSICA = new SICAtoOpenSPCoopContext("SICA");

  2354.             this.idAccordoFactory = IDAccordoFactory.getInstance();
  2355.             this.idAccordoCooperazioneFactory = IDAccordoCooperazioneFactory.getInstance();
  2356.             this.idServizioFactory = IDServizioFactory.getInstance();

  2357.             ConfigurazionePdD configPdD = new ConfigurazionePdD();
  2358.             configPdD.setLog(ControlStationCore.log);
  2359.             configPdD.setLoader(org.openspcoop2.utils.resources.Loader.getInstance());
  2360.             if(!initForApi) {
  2361.                 configPdD.setConfigurationDir(ConsoleProperties.getInstance().getConfDirectory());
  2362.             }
  2363.             else {
  2364.                 configPdD.setConfigurationDir(confDir);
  2365.             }
  2366.             configPdD.setAttesaAttivaJDBC(this.jdbcSerializableAttesaAttiva);
  2367.             configPdD.setCheckIntervalJDBC(this.jdbcSerializableCheck);
  2368.             configPdD.setTipoDatabase(TipiDatabase.toEnumConstant(DatasourceProperties.getInstance().getTipoDatabase()));
  2369.             ProtocolFactoryManager.initialize(ControlStationCore.log, configPdD, this.protocolloDefault);
  2370.             this.protocolFactoryManager = ProtocolFactoryManager.getInstance();
  2371.             if(initForApi) {
  2372.                 this.protocolloDefault = protocolloDefault;
  2373.             }
  2374.             if(this.protocolloDefault==null){
  2375.                 this.protocolloDefault = this.protocolFactoryManager.getDefaultProtocolFactory().getProtocol();
  2376.             }

  2377.             // Leggo configurazione multitenant
  2378.             ConfigurazioneMultitenant confMultitenant = this.getConfigurazioneGenerale().getMultitenant();
  2379.             if(confMultitenant!=null) {
  2380.                
  2381.                 this.multitenant = StatoFunzionalita.ABILITATO.equals(confMultitenant.getStato());
  2382.                
  2383.                 if(confMultitenant.getErogazioneSceltaSoggettiFruitori()!=null) {
  2384.                     switch (confMultitenant.getErogazioneSceltaSoggettiFruitori()) {
  2385.                     case SOGGETTI_ESTERNI:
  2386.                         this.multitenantSoggettiErogazioni = MultitenantSoggettiErogazioni.SOLO_SOGGETTI_ESTERNI;
  2387.                         break;
  2388.                     case ESCLUDI_SOGGETTO_EROGATORE:
  2389.                         this.multitenantSoggettiErogazioni = MultitenantSoggettiErogazioni.ESCLUDI_SOGGETTO_EROGATORE;
  2390.                         break;
  2391.                     case TUTTI:
  2392.                         this.multitenantSoggettiErogazioni = MultitenantSoggettiErogazioni.TUTTI;
  2393.                         break;
  2394.                     }
  2395.                 }
  2396.                 else {
  2397.                     this.multitenantSoggettiErogazioni = MultitenantSoggettiErogazioni.SOLO_SOGGETTI_ESTERNI; // default
  2398.                 }
  2399.                
  2400.                 if(confMultitenant.getFruizioneSceltaSoggettiErogatori()!=null) {
  2401.                     switch (confMultitenant.getFruizioneSceltaSoggettiErogatori()) {
  2402.                     case SOGGETTI_ESTERNI:
  2403.                         this.multitenantSoggettiFruizioni = MultitenantSoggettiFruizioni.SOLO_SOGGETTI_ESTERNI;
  2404.                         break;
  2405.                     case ESCLUDI_SOGGETTO_FRUITORE:
  2406.                         this.multitenantSoggettiFruizioni = MultitenantSoggettiFruizioni.ESCLUDI_SOGGETTO_FRUITORE;
  2407.                         break;
  2408.                     case TUTTI:
  2409.                         this.multitenantSoggettiFruizioni = MultitenantSoggettiFruizioni.TUTTI;
  2410.                         break;
  2411.                     }
  2412.                 }
  2413.                 else {
  2414.                     this.multitenantSoggettiFruizioni = MultitenantSoggettiFruizioni.SOLO_SOGGETTI_ESTERNI; // default
  2415.                 }
  2416.             }
  2417.            
  2418.             // Verifica Consistenza dei Protocolli
  2419.             verificaConsistenzaProtocolli(this);
  2420.            
  2421.             // Inizializzo password manager
  2422.             CryptConfig utenzeConfig = null;
  2423.             CryptConfig applicativiConfig = null;
  2424.             CryptConfig soggettiConfig = null;
  2425.             if(ControlStationCore.isAPIMode()) {
  2426.                 utenzeConfig = ControlStationCore.getUtenzePasswordEncryptEngineApiMode();
  2427.                 applicativiConfig = ControlStationCore.getApplicativiPasswordEncryptEngineApiMode();
  2428.                 soggettiConfig = ControlStationCore.getSoggettiPasswordEncryptEngineApiMode();
  2429.                
  2430.                 this.applicativiPwConfiguration = "APIMode";
  2431.                 this.applicativiPwEncryptEngine = applicativiConfig;
  2432.                 this.applicativiApiKeyLunghezzaPwGenerate = ControlStationCore.getApplicativiApiKeyPasswordGeneratedLengthApiMode();
  2433.                 this.applicativiPwVerifierEngine = ControlStationCore.getApplicativiPasswordVerifierEngineApiMode();
  2434.                 this.applicativiBasicPwEnableConstraints = (this.applicativiPwVerifierEngine!=null);
  2435.                
  2436.                 this.soggettiPwConfiguration = "APIMode";
  2437.                 this.soggettiPwEncryptEngine = soggettiConfig;
  2438.                 this.soggettiApiKeyLunghezzaPwGenerate = ControlStationCore.getSoggettiApiKeyPasswordGeneratedLengthApiMode();
  2439.                 this.soggettiPwVerifierEngine = ControlStationCore.getSoggettiPasswordVerifierEngineApiMode();
  2440.                 this.soggettiBasicPwEnableConstraints = (this.soggettiPwVerifierEngine!=null);
  2441.             }
  2442.             else {
  2443.                 utenzeConfig = this.getUtenzePasswordEncrypt();
  2444.                 applicativiConfig = this.getApplicativiPasswordEncrypt();
  2445.                 soggettiConfig = this.getSoggettiPasswordEncrypt();
  2446.             }
  2447.             this.utenzePasswordManager = CryptFactory.getCrypt(log, utenzeConfig);
  2448.             if(utenzeConfig.isBackwardCompatibility()) {
  2449.                 this.utenzePasswordManagerBackwardCompatibility = CryptFactory.getOldMD5Crypt(log);
  2450.             }
  2451.             this.applicativiPwManager = CryptFactory.getCrypt(log, applicativiConfig);
  2452.             this.soggettiPwManager = CryptFactory.getCrypt(log, soggettiConfig);
  2453.            
  2454.             if(initForApi) {
  2455.                 this.singlePdD = true;
  2456.             }

  2457.         }catch(Exception e){
  2458.             ControlStationCore.logError("Errore di inizializzazione: "+e.getMessage(), e);
  2459.             throw new DriverControlStationException(e.getMessage(),e);
  2460.         }
  2461.     }

  2462.     public ControlStationCore(ControlStationCore core) throws DriverControlStationException {

  2463.         /** Impostazioni grafiche */
  2464.         this.consoleNomeSintesi = core.consoleNomeSintesi;
  2465.         this.consoleNomeEsteso = core.consoleNomeEsteso;
  2466.         this.consoleCSS = core.consoleCSS;
  2467.         this.consoleLanguage = core.consoleLanguage;
  2468.         this.consoleLunghezzaLabel = core.consoleLunghezzaLabel;
  2469.         this.logoHeaderImage = core.logoHeaderImage;
  2470.         this.logoHeaderLink = core.logoHeaderLink;
  2471.         this.logoHeaderTitolo = core.logoHeaderTitolo;
  2472.         this.visualizzaLinkHomeHeader = core.visualizzaLinkHomeHeader;
  2473.         this.defaultFont = core.defaultFont;
  2474.         this.affineTransform = core.affineTransform;
  2475.         this.fontRenderContext = core.fontRenderContext;

  2476.         /** Tipo del Database */
  2477.         this.tipoDB = core.tipoDB;

  2478.         /** Accesso alle code JMS: Smistatore */
  2479.         this.smistatoreQueue = core.smistatoreQueue;
  2480.         this.cfName = core.cfName;
  2481.         this.cfProp = core.cfProp;

  2482.         /** IDFactory */
  2483.         this.idAccordoFactory = core.idAccordoFactory;
  2484.         this.idAccordoCooperazioneFactory = core.idAccordoCooperazioneFactory;
  2485.         this.idServizioFactory = core.idServizioFactory;

  2486.         /** Protocollo */
  2487.         this.protocolloDefault = core.protocolloDefault;
  2488.         this.jdbcSerializableAttesaAttiva = core.jdbcSerializableAttesaAttiva;
  2489.         this.jdbcSerializableCheck = core.jdbcSerializableCheck;
  2490.         this.protocolFactoryManager = core.protocolFactoryManager;

  2491.         /** Visione oggetti globale o per utenti */
  2492.         this.visioneOggettiGlobale = core.visioneOggettiGlobale;
  2493.         this.utentiConVisioneGlobale = core.utentiConVisioneGlobale;

  2494.         /** Tracciamento */
  2495.         this.tracceShowConfigurazioneCustomAppender = core.tracceShowConfigurazioneCustomAppender;
  2496.         this.tracceSameDBWebUI = core.tracceSameDBWebUI;
  2497.         this.tracceShowSorgentiDatiDatabase = core.tracceShowSorgentiDatiDatabase;
  2498.         this.tracceDatasource = core.tracceDatasource;
  2499.         this.tracceTipoDatabase = core.tracceTipoDatabase;
  2500.         this.tracceCtxDatasource = core.tracceCtxDatasource;
  2501.         this.driverTracciamento = core.driverTracciamento;

  2502.         /** MsgDiagnostici */
  2503.         this.msgDiagnosticiShowConfigurazioneCustomAppender = core.msgDiagnosticiShowConfigurazioneCustomAppender;
  2504.         this.msgDiagnosticiSameDBWebUI = core.msgDiagnosticiSameDBWebUI;
  2505.         this.msgDiagnosticiShowSorgentiDatiDatabase = core.msgDiagnosticiShowSorgentiDatiDatabase;
  2506.         this.msgDiagnosticiDatasource = core.msgDiagnosticiDatasource;
  2507.         this.msgDiagnosticiTipoDatabase = core.msgDiagnosticiTipoDatabase;
  2508.         this.msgDiagnosticiCtxDatasource = core.msgDiagnosticiCtxDatasource;
  2509.         this.driverMSGDiagnostici = core.driverMSGDiagnostici;
  2510.        
  2511.         /** Dump */
  2512.         this.dumpShowConfigurazioneCustomAppender = core.dumpShowConfigurazioneCustomAppender;
  2513.         this.dumpShowConfigurazioneDumpRealtime = core.dumpShowConfigurazioneDumpRealtime;

  2514.         /** Gestione Pdd Abilitata */
  2515.         this.gestionePddAbilitata = core.gestionePddAbilitata;
  2516.        
  2517.         /** Registro Servizi locale/remoto */
  2518.         this.registroServiziLocale = core.registroServiziLocale;

  2519.         /** Modalita' Single PdD */
  2520.         this.singlePdD = core.singlePdD;

  2521.         /** J2EE Ambiente */
  2522.         this.showJ2eeOptions = core.showJ2eeOptions;

  2523.         /** Utenze Console */
  2524.         this.utenzePasswordConfiguration = core.utenzePasswordConfiguration;
  2525.         this.utenzeLunghezzaPasswordGenerate = core.utenzeLunghezzaPasswordGenerate;
  2526.        
  2527.         /** Utenze Console */
  2528.         this.utenzePasswordConfiguration = core.utenzePasswordConfiguration;
  2529.         this.utenzeLunghezzaPasswordGenerate = core.utenzeLunghezzaPasswordGenerate;
  2530.         this.utenzePasswordVerifierEngine = core.utenzePasswordVerifierEngine;
  2531.         this.utenzePasswordEncryptEngine = core.utenzePasswordEncryptEngine;
  2532.         this.utenzePasswordManager = core.utenzePasswordManager;
  2533.         this.utenzePasswordManagerBackwardCompatibility = core.utenzePasswordManagerBackwardCompatibility;
  2534.         this.utenzeModificaProfiloUtenteDaFormAggiornaSessione = core.utenzeModificaProfiloUtenteDaFormAggiornaSessione;
  2535.         this.utenzeModificaProfiloUtenteDaLinkAggiornaDB = core.utenzeModificaProfiloUtenteDaLinkAggiornaDB;
  2536.        
  2537.         /** Login */
  2538.         this.loginApplication = core.loginApplication;
  2539.         this.loginErroreInternoRedirectUrl = core.loginErroreInternoRedirectUrl;
  2540.         this.loginProperties = core.loginProperties;
  2541.         this.loginSessioneScadutaRedirectUrl = core.loginSessioneScadutaRedirectUrl;
  2542.         this.loginTipo = core.loginTipo;
  2543.         this.loginUtenteNonAutorizzatoRedirectUrl = core.loginUtenteNonAutorizzatoRedirectUrl;
  2544.         this.loginUtenteNonValidoRedirectUrl = core.loginUtenteNonValidoRedirectUrl;
  2545.         this.logoutMostraButton = core.logoutMostraButton;
  2546.         this.logoutUrlDestinazione = core.logoutUrlDestinazione;
  2547.        
  2548.         /** Applicativi Console */
  2549.         this.applicativiPwConfiguration = core.applicativiPwConfiguration;
  2550.         this.applicativiBasicPwEnableConstraints = core.applicativiBasicPwEnableConstraints;
  2551.         this.applicativiBasicLunghezzaPwGenerate = core.applicativiBasicLunghezzaPwGenerate;
  2552.         this.applicativiApiKeyLunghezzaPwGenerate = core.applicativiApiKeyLunghezzaPwGenerate;
  2553.         this.applicativiPwVerifierEngine = core.applicativiPwVerifierEngine;
  2554.         this.applicativiPwEncryptEngine = core.applicativiPwEncryptEngine;
  2555.         this.applicativiPwManager = core.applicativiPwManager;
  2556.        
  2557.         /** Soggetti Console */
  2558.         this.soggettiPwConfiguration = core.soggettiPwConfiguration;
  2559.         this.soggettiBasicPwEnableConstraints = core.soggettiBasicPwEnableConstraints;
  2560.         this.soggettiBasicLunghezzaPwGenerate = core.soggettiBasicLunghezzaPwGenerate;
  2561.         this.soggettiApiKeyLunghezzaPwGenerate = core.soggettiApiKeyLunghezzaPwGenerate;
  2562.         this.soggettiPwVerifierEngine = core.soggettiPwVerifierEngine;
  2563.         this.soggettiPwEncryptEngine = core.soggettiPwEncryptEngine;
  2564.         this.soggettiPwManager = core.soggettiPwManager;
  2565.        
  2566.         /** MessageSecurity PropertiesSourceConfiguration */
  2567.         this.messageSecurityPropertiesSourceConfiguration = core.messageSecurityPropertiesSourceConfiguration;
  2568.        
  2569.         /** PolicyGestioneToken PropertiesSourceConfiguration */
  2570.         this.policyGestioneTokenPropertiesSourceConfiguration = core.policyGestioneTokenPropertiesSourceConfiguration;
  2571.         this.isPolicyGestioneTokenVerificaCertificati = core.isPolicyGestioneTokenVerificaCertificati;
  2572.         this.policyGestioneTokenPDND = core.policyGestioneTokenPDND;
  2573.        
  2574.         /** AttributeAuthority PropertiesSourceConfiguration */
  2575.         this.attributeAuthorityPropertiesSourceConfiguration = core.attributeAuthorityPropertiesSourceConfiguration;
  2576.         this.isAttributeAuthorityVerificaCertificati = core.isAttributeAuthorityVerificaCertificati;
  2577.        
  2578.         /** ControlloTraffico */
  2579.         this.isControlloTrafficoPolicyGlobaleGroupByApi = core.isControlloTrafficoPolicyGlobaleGroupByApi;
  2580.         this.isControlloTrafficoPolicyGlobaleFiltroApi = core.isControlloTrafficoPolicyGlobaleFiltroApi;
  2581.         this.isControlloTrafficoPolicyGlobaleFiltroApiSoggettoErogatore = core.isControlloTrafficoPolicyGlobaleFiltroApiSoggettoErogatore;
  2582.         this.controlloTrafficoPolicyRateLimitingTipiGestori = core.controlloTrafficoPolicyRateLimitingTipiGestori;
  2583.        
  2584.         /** Auditing */
  2585.         this.isAuditingRegistrazioneElementiBinari = core.isAuditingRegistrazioneElementiBinari;
  2586.        
  2587.         /** IntegrationManager */
  2588.         this.isIntegrationManagerEnabled = core.isIntegrationManagerEnabled;
  2589.         this.isIntegrationManagerTraceMessageBoxOperationEnabled = core.isIntegrationManagerTraceMessageBoxOperationEnabled;
  2590.        
  2591.         /** Soggetti */
  2592.         this.soggettiNomeMaxLength = core.soggettiNomeMaxLength;
  2593.         this.isSoggettiVerificaCertificati = core.isSoggettiVerificaCertificati;
  2594.        
  2595.         /** Applicativi */
  2596.         this.isApplicativiVerificaCertificati = core.isApplicativiVerificaCertificati;
  2597.        
  2598.         /** API */
  2599.         this.isApiResourcePathValidatorEnabled = core.isApiResourcePathValidatorEnabled;
  2600.         this.isApiResourceHttpMethodAndPathQualsiasiEnabled = core.isApiResourceHttpMethodAndPathQualsiasiEnabled;
  2601.         this.getApiResourcePathQualsiasiSpecialChar = core.getApiResourcePathQualsiasiSpecialChar;
  2602.         this.isApiOpenAPIValidateUriReferenceAsUrl = core.isApiOpenAPIValidateUriReferenceAsUrl;
  2603.         this.isApiRestResourceRepresentationMessageTypeOverride = core.isApiRestResourceRepresentationMessageTypeOverride;
  2604.         this.isApiDescriptionTruncate255 = core.isApiDescriptionTruncate255;
  2605.         this.isApiDescriptionTruncate4000 = core.isApiDescriptionTruncate4000;
  2606.        
  2607.         /** Accordi di Cooperazione */
  2608.         this.isAccordiCooperazioneEnabled = core.isAccordiCooperazioneEnabled;
  2609.        
  2610.         /** API Impl */
  2611.         this.isErogazioniVerificaCertificati = core.isErogazioniVerificaCertificati;
  2612.         this.isFruizioniVerificaCertificati = core.isFruizioniVerificaCertificati;
  2613.        
  2614.         /** Message Engine */
  2615.         this.messageEngines = core.messageEngines;
  2616.        
  2617.         /** Credenziali Basic */
  2618.         this.isSoggettiCredenzialiBasicCheckUniqueUsePassword = core.isSoggettiCredenzialiBasicCheckUniqueUsePassword;
  2619.         this.isApplicativiCredenzialiBasicCheckUniqueUsePassword = core.isApplicativiCredenzialiBasicCheckUniqueUsePassword;
  2620.         this.isSoggettiApplicativiCredenzialiBasicPermitSameCredentials = core.isSoggettiApplicativiCredenzialiBasicPermitSameCredentials;
  2621.        
  2622.         /** Credenziali Ssl */
  2623.         this.isSoggettiApplicativiCredenzialiSslPermitSameCredentials = core.isSoggettiApplicativiCredenzialiSslPermitSameCredentials;
  2624.        
  2625.         /** Credenziali Principal */
  2626.         this.isSoggettiApplicativiCredenzialiPrincipalPermitSameCredentials = core.isSoggettiApplicativiCredenzialiPrincipalPermitSameCredentials;

  2627.         /** Connettori */
  2628.         this.isConnettoriAllTypesEnabled = core.isConnettoriAllTypesEnabled;
  2629.        
  2630.         /** Connettori Multipli */
  2631.         this.isConnettoriMultipliEnabled = core.isConnettoriMultipliEnabled;
  2632.         this.isConnettoriMultipliConsegnaCondizionaleStessFiltroPermesso = core.isConnettoriMultipliConsegnaCondizionaleStessFiltroPermesso;
  2633.         this.isConnettoriMultipliConsegnaMultiplaEnabled = core.isConnettoriMultipliConsegnaMultiplaEnabled;
  2634.        
  2635.         /** Applicativi Server */
  2636.         this.isApplicativiServerEnabled = core.isApplicativiServerEnabled;      
  2637.        
  2638.         /** Gestione Consegne Asincrone */
  2639.         this.consegnaNotificaCode = core.consegnaNotificaCode;
  2640.         this.consegnaNotificaCodaLabel = core.consegnaNotificaCodaLabel;
  2641.         this.consegnaNotificaPriorita = core.consegnaNotificaPriorita;
  2642.         this.consegnaNotificaConfigurazionePriorita = core.consegnaNotificaConfigurazionePriorita;
  2643.        
  2644.         /** ModI */
  2645.         this.isModipaErogazioniVerificaCertificati = core.isModipaErogazioniVerificaCertificati;
  2646.         this.isModipaFruizioniVerificaCertificati = core.isModipaFruizioniVerificaCertificati;
  2647.         this.isModipaFruizioniConnettoreCheckHttps = core.isModipaFruizioniConnettoreCheckHttps;
  2648.         this.isModipaFiltroRicercaProfiloQualsiasiVisualizzaDatiModi = core.isModipaFiltroRicercaProfiloQualsiasiVisualizzaDatiModi;
  2649.        
  2650.         /** Plugins */
  2651.         this.configurazionePluginsEnabled = core.configurazionePluginsEnabled;
  2652.         this.configurazionePluginsSeconds = core.configurazionePluginsSeconds;
  2653.        
  2654.         /** Handlers */
  2655.         this.configurazioneHandlersEnabled = core.configurazioneHandlersEnabled;
  2656.        
  2657.         /** Configurazione Allarmi */
  2658.         this.configurazioneAllarmiEnabled = core.configurazioneAllarmiEnabled;
  2659.         this.countPluginsAllarmi = core.countPluginsAllarmi;
  2660.         this.allarmiConfig = core.allarmiConfig;
  2661.         this.showAllarmiIdentificativoRuntime = core.showAllarmiIdentificativoRuntime;
  2662.         this.showAllarmiFormNomeSuggeritoCreazione = core.showAllarmiFormNomeSuggeritoCreazione;
  2663.         this.showAllarmiFormStatoAllarme = core.showAllarmiFormStatoAllarme;
  2664.         this.showAllarmiFormStatoAllarmeHistory = core.showAllarmiFormStatoAllarmeHistory;
  2665.         this.showAllarmiSearchStatiAllarmi = core.showAllarmiSearchStatiAllarmi;
  2666.         this.showAllarmiElenchiStatiAllarmi = core.showAllarmiElenchiStatiAllarmi;
  2667.        
  2668.         /** Registrazione Messaggi */
  2669.         this.isRegistrazioneMessaggiMultipartPayloadParsingEnabled = core.isRegistrazioneMessaggiMultipartPayloadParsingEnabled;
  2670.        
  2671.         /** Cluster dinamico */
  2672.         this.isClusterDinamicoEnabled = core.isClusterDinamicoEnabled;
  2673.        
  2674.         /** BYOK **/
  2675.         this.visualizzaInformazioniCifrate = core.visualizzaInformazioniCifrate;
  2676.         this.byokWarningMessage = core.byokWarningMessage;
  2677.         this.notaInformativaInformazioneMemorizzataInChiaro = core.notaInformativaInformazioneMemorizzataInChiaro;
  2678.         this.notaInformativaInformazioneCifrataSecurityPolicyDifferente = core.notaInformativaInformazioneCifrataSecurityPolicyDifferente;
  2679.         this.visualizzaCampiPasswordComeLock = core.visualizzaCampiPasswordComeLock;
  2680.        
  2681.         /** OCSP */
  2682.         this.isOCSPPolicyChoiceConnettoreHTTPSVerificaServerDisabilitata = core.isOCSPPolicyChoiceConnettoreHTTPSVerificaServerDisabilitata;
  2683.        
  2684.         /** Certificati */
  2685.         this.verificaCertificatiWarningExpirationDays = core.verificaCertificatiWarningExpirationDays;
  2686.         this.verificaCertificatiSceltaClusterId = core.verificaCertificatiSceltaClusterId;
  2687.        
  2688.         /** Cluster */
  2689.         this.isClusterAsyncUpdate = core.isClusterAsyncUpdate;
  2690.         this.clusterAsyncUpdateCheckInterval = core.clusterAsyncUpdateCheckInterval;
  2691.        
  2692.         /** Tracciamento */
  2693.         this.isTracciamentoDatabaseRispostaConsegnataSelectEnabled = core.isTracciamentoDatabaseRispostaConsegnataSelectEnabled;
  2694.        
  2695.         /** Keystore */
  2696.         this.isKeystoreJksPasswordRequired = core.isKeystoreJksPasswordRequired;
  2697.         this.isKeystoreJksKeyPasswordRequired = core.isKeystoreJksKeyPasswordRequired;
  2698.         this.isKeystorePkcs12PasswordRequired = core.isKeystorePkcs12PasswordRequired;
  2699.         this.isKeystorePkcs12KeyPasswordRequired = core.isKeystorePkcs12KeyPasswordRequired;
  2700.         this.isTruststoreJksPasswordRequired = core.isTruststoreJksPasswordRequired;
  2701.         this.isTruststorePkcs12PasswordRequired = core.isTruststorePkcs12PasswordRequired;
  2702.         this.isLoadCertificateWizardJksPasswordRequiredRequired = core.isLoadCertificateWizardJksPasswordRequiredRequired;
  2703.         this.isLoadCertificateWizardPkcs12PasswordRequiredRequired = core.isLoadCertificateWizardPkcs12PasswordRequiredRequired;
  2704.        
  2705.         /** Parametri pdd */
  2706.         this.portaPubblica = core.portaPubblica;
  2707.         this.portaGestione = core.portaGestione;
  2708.         this.indirizzoPubblico = core.indirizzoPubblico;
  2709.         this.indirizzoGestione = core.indirizzoGestione;
  2710.        
  2711.         /** Opzioni di visualizzazione */
  2712.         this.showCorrelazioneAsincronaInAccordi = core.showCorrelazioneAsincronaInAccordi;
  2713.         this.showFlagPrivato = core.showFlagPrivato;
  2714.         this.showAllConnettori = core.showAllConnettori;
  2715.         this.showDebugOptionConnettore = core.showDebugOptionConnettore;
  2716.         this.showPulsantiImportExport = core.showPulsantiImportExport;
  2717.         this.elenchiMenuIdentificativiLunghezzaMassima = core.elenchiMenuIdentificativiLunghezzaMassima;
  2718.         this.showCountElementInLinkList = core.showCountElementInLinkList;
  2719.         this.conservaRisultatiRicerca = core.conservaRisultatiRicerca;
  2720.         this.showAccordiColonnaAzioni = core.showAccordiColonnaAzioni;
  2721.         this.showAccordiInformazioniProtocollo = core.showAccordiInformazioniProtocollo;
  2722.         this.showConfigurazioniPersonalizzate = core.showConfigurazioniPersonalizzate;
  2723.         this.showGestioneSoggettiRouter = core.showGestioneSoggettiRouter;
  2724.         this.showGestioneSoggettiVirtuali = core.showGestioneSoggettiVirtuali;
  2725.         this.showGestioneWorkflowStatoDocumenti = core.showGestioneWorkflowStatoDocumenti;
  2726.         this.gestioneWorkflowStatoDocumentiVisualizzaStatoLista = core.gestioneWorkflowStatoDocumentiVisualizzaStatoLista;
  2727.         this.gestioneWorkflowStatoDocumentiRipristinoStatoOperativoDaFinale = core.gestioneWorkflowStatoDocumentiRipristinoStatoOperativoDaFinale;
  2728.         this.showInterfacceAPI = core.showInterfacceAPI;
  2729.         this.showAllegati = core.showAllegati;
  2730.         this.enableAutoMappingWsdlIntoAccordo = core.enableAutoMappingWsdlIntoAccordo;
  2731.         this.enableAutoMappingWsdlIntoAccordoEstrazioneSchemiInWsdlTypes = core.enableAutoMappingWsdlIntoAccordoEstrazioneSchemiInWsdlTypes;
  2732.         this.showMTOMVisualizzazioneCompleta = core.showMTOMVisualizzazioneCompleta;
  2733.         this.portaCorrelazioneApplicativaMaxLength = core.portaCorrelazioneApplicativaMaxLength;
  2734.         this.showPortaDelegataLocalForward = core.showPortaDelegataLocalForward;
  2735.         this.isProprietaErogazioniShowModalitaStandard = core.isProprietaErogazioniShowModalitaStandard;
  2736.         this.isProprietaFruizioniShowModalitaStandard = core.isProprietaFruizioniShowModalitaStandard;
  2737.         this.isPortTypeObbligatorioImplementazioniSOAP = core.isPortTypeObbligatorioImplementazioniSOAP;
  2738.         this.isElenchiSAAsincroniNonSupportatiVisualizzaRispostaAsincrona = core.isElenchiSAAsincroniNonSupportatiVisualizzaRispostaAsincrona;
  2739.         this.isVisualizzazioneConfigurazioneDiagnosticaLog4J = core.isVisualizzazioneConfigurazioneDiagnosticaLog4J;
  2740.         this.tokenPolicyForceId = core.tokenPolicyForceId;
  2741.         this.tokenPolicyForceIdEnabled = core.tokenPolicyForceIdEnabled;
  2742.         this.tokenPolicyTipologia = core.tokenPolicyTipologia;
  2743.         this.attributeAuthorityForceId = core.attributeAuthorityForceId;
  2744.         this.attributeAuthorityForceIdEnabled = core.attributeAuthorityForceIdEnabled;
  2745.         this.attributeAuthorityTipologia = core.attributeAuthorityTipologia;
  2746.         this.showServiziVisualizzaModalitaElenco = core.showServiziVisualizzaModalitaElenco;
  2747.         this.selectListSoggettiOperativiNumeroMassimoSoggetti = core.selectListSoggettiOperativiNumeroMassimoSoggetti;
  2748.         this.selectListSoggettiOperativiDimensioneMassimaLabel = core.selectListSoggettiOperativiDimensioneMassimaLabel;
  2749.         this.viewLunghezzaMassimaInformazione = core.viewLunghezzaMassimaInformazione;
  2750.         this.isSetSearchAfterAdd = core.isSetSearchAfterAdd;
  2751.         this.elenchiVisualizzaComandoResetCacheSingoloElemento = core.elenchiVisualizzaComandoResetCacheSingoloElemento;
  2752.         this.validitaTokenCsrf = core.validitaTokenCsrf;
  2753.         this.cspHeaderValue = core.cspHeaderValue;

  2754.         /** Motori di Sincronizzazione */
  2755.         this.sincronizzazionePddEngineEnabled = core.sincronizzazionePddEngineEnabled;
  2756.         this.sincronizzazionePddEngineEnabled_prefissoNomeCodaConfigurazionePdd = core.sincronizzazionePddEngineEnabled_prefissoNomeCodaConfigurazionePdd;
  2757.         this.sincronizzazionePddEngineEnabled_scriptShell_Path = core.sincronizzazionePddEngineEnabled_scriptShell_Path;
  2758.         this.sincronizzazionePddEngineEnabled_scriptShell_Args = core.sincronizzazionePddEngineEnabled_scriptShell_Args;
  2759.         this.sincronizzazioneRegistroEngineEnabled = core.sincronizzazioneRegistroEngineEnabled;
  2760.         this.sincronizzazioneGEEngineEnabled = core.sincronizzazioneGEEngineEnabled;
  2761.         this.sincronizzazioneGE_TipoSoggetto = core.sincronizzazioneGE_TipoSoggetto;
  2762.         this.sincronizzazioneGE_NomeSoggetto = core.sincronizzazioneGE_NomeSoggetto;
  2763.         this.sincronizzazioneGE_NomeServizioApplicativo = core.sincronizzazioneGE_NomeServizioApplicativo;

  2764.         /** Opzioni di importazione/esportazione Archivi */
  2765.         this.importArchivi_tipoPdD = core.importArchivi_tipoPdD;
  2766.         this.exportArchive_configurazione_soloDumpCompleto = core.exportArchive_configurazione_soloDumpCompleto;
  2767.         this.exportArchive_servizi_standard = core.exportArchive_servizi_standard;
  2768.        
  2769.         /** Multitenant */
  2770.         this.multitenant = core.multitenant;
  2771.         this.multitenantSoggettiErogazioni = core.multitenantSoggettiErogazioni;
  2772.         this.multitenantSoggettiFruizioni = core.multitenantSoggettiFruizioni;
  2773.        
  2774.         /** Altro */
  2775.         this.suffissoConnettoreAutomatico = core.suffissoConnettoreAutomatico;
  2776.         this.enabledToken_generazioneAutomaticaPorteDelegate = core.enabledToken_generazioneAutomaticaPorteDelegate;
  2777.         this.enabledAutenticazione_generazioneAutomaticaPorteDelegate = core.enabledAutenticazione_generazioneAutomaticaPorteDelegate;
  2778.         this.autenticazione_generazioneAutomaticaPorteDelegate = core.autenticazione_generazioneAutomaticaPorteDelegate;
  2779.         this.enabledAutorizzazione_generazioneAutomaticaPorteDelegate = core.enabledAutorizzazione_generazioneAutomaticaPorteDelegate;
  2780.         this.autorizzazione_generazioneAutomaticaPorteDelegate = core.autorizzazione_generazioneAutomaticaPorteDelegate;        
  2781.         this.enabledToken_generazioneAutomaticaPorteApplicative = core.enabledToken_generazioneAutomaticaPorteApplicative;
  2782.         this.enabledAutenticazione_generazioneAutomaticaPorteApplicative = core.enabledAutenticazione_generazioneAutomaticaPorteApplicative;
  2783.         this.autenticazione_generazioneAutomaticaPorteApplicative = core.autenticazione_generazioneAutomaticaPorteApplicative;
  2784.         this.enabledAutorizzazione_generazioneAutomaticaPorteApplicative = core.enabledAutorizzazione_generazioneAutomaticaPorteApplicative;
  2785.         this.autorizzazione_generazioneAutomaticaPorteApplicative = core.autorizzazione_generazioneAutomaticaPorteApplicative;      
  2786.         this.isAbilitatoControlloUnicitaImplementazioneAccordoPerSoggetto = core.isAbilitatoControlloUnicitaImplementazioneAccordoPerSoggetto;
  2787.         this.isAbilitatoControlloUnicitaImplementazionePortTypePerSoggetto = core.isAbilitatoControlloUnicitaImplementazionePortTypePerSoggetto;
  2788.        
  2789.         /** Opzioni per Plugins */
  2790.         this.pluginMenu = core.pluginMenu;
  2791.         this.pluginConfigurazione = core.pluginConfigurazione;
  2792.         this.pluginConfigurazioneList = core.pluginConfigurazioneList;
  2793.         this.pluginConnettore = core.pluginConnettore;
  2794.         this.pluginPortaDelegata = core.pluginPortaDelegata;
  2795.         this.pluginPortaApplicativa = core.pluginPortaApplicativa;
  2796.        
  2797.         /** Opzioni Accesso JMX della PdD */
  2798.         this.invoker = core.invoker;
  2799.         this.configurazioneNodiRuntime = core.configurazioneNodiRuntime;
  2800.         this.driverBYOKUtilities = core.driverBYOKUtilities;
  2801.         this.lockUtilities = core.lockUtilities;
  2802.         this.isVisualizzaLinkClearAllCachesRemoteCheckCacheStatus = core.isVisualizzaLinkClearAllCachesRemoteCheckCacheStatus;
  2803.         this.jmxPdDAliases = core.jmxPdDAliases;
  2804.         this.jmxPdDGruppiAliases = core.jmxPdDGruppiAliases;
  2805.         this.jmxPdDDescrizioni = core.jmxPdDDescrizioni;
  2806.         this.jmxPdDCertificateChecker = core.jmxPdDCertificateChecker;
  2807.         this.jmxPdDConfigurazioneSistemaType = core.jmxPdDConfigurazioneSistemaType;
  2808.         this.jmxPdDConfigurazioneSistemaNomeRisorsa = core.jmxPdDConfigurazioneSistemaNomeRisorsa;
  2809.         this.jmxPdDConfigurazioneSistemaNomeMetodoVersionePdD = core.jmxPdDConfigurazioneSistemaNomeMetodoVersionePdD;
  2810.         this.jmxPdDConfigurazioneSistemaNomeMetodoVersioneBaseDati = core.jmxPdDConfigurazioneSistemaNomeMetodoVersioneBaseDati;
  2811.         this.jmxPdDConfigurazioneSistemaNomeMetodoVersioneJava = core.jmxPdDConfigurazioneSistemaNomeMetodoVersioneJava;
  2812.         this.jmxPdDConfigurazioneSistemaNomeMetodoVendorJava = core.jmxPdDConfigurazioneSistemaNomeMetodoVendorJava;
  2813.         this.jmxPdDConfigurazioneSistemaNomeMetodoTipoDatabase = core.jmxPdDConfigurazioneSistemaNomeMetodoTipoDatabase;
  2814.         this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniDatabase = core.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniDatabase;
  2815.         this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniSSL = core.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniSSL;
  2816.         this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteSSL = core.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteSSL;
  2817.         this.jmxPdDConfigurazioneSistemaShowInformazioniCryptographyKeyLength = core.jmxPdDConfigurazioneSistemaShowInformazioniCryptographyKeyLength;
  2818.         this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCryptographyKeyLength = core.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCryptographyKeyLength;
  2819.         this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCharset = core.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCharset;
  2820.         this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniInternazionalizzazione = core.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniInternazionalizzazione;
  2821.         this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteInternazionalizzazione = core.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteInternazionalizzazione;
  2822.         this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniTimeZone = core.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniTimeZone;
  2823.         this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteTimeZone = core.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteTimeZone;
  2824.         this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaJavaNetworking = core.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaJavaNetworking;
  2825.         this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteProprietaJavaNetworking = core.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteProprietaJavaNetworking;
  2826.         this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaJavaAltro = core.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaJavaAltro;
  2827.         this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaSistema = core.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaSistema;
  2828.         this.jmxPdDConfigurazioneSistemaNomeMetodoMessageFactory = core.jmxPdDConfigurazioneSistemaNomeMetodoMessageFactory;
  2829.         this.jmxPdDConfigurazioneSistemaNomeMetodoDirectoryConfigurazione = core.jmxPdDConfigurazioneSistemaNomeMetodoDirectoryConfigurazione;
  2830.         this.jmxPdDConfigurazioneSistemaNomeMetodoPluginProtocols = core.jmxPdDConfigurazioneSistemaNomeMetodoPluginProtocols;
  2831.         this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniInstallazione = core.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniInstallazione;
  2832.         this.jmxPdDConfigurazioneSistemaNomeMetodoGetFileTrace = core.jmxPdDConfigurazioneSistemaNomeMetodoGetFileTrace;
  2833.         this.jmxPdDConfigurazioneSistemaNomeMetodoUpdateFileTrace = core.jmxPdDConfigurazioneSistemaNomeMetodoUpdateFileTrace;
  2834.         this.jmxPdDConfigurazioneSistemaNomeMetodoUnwrapKey = core.jmxPdDConfigurazioneSistemaNomeMetodoUnwrapKey;
  2835.         this.jmxPdDConfigurazioneSistemaNomeMetodoWrapKey = core.jmxPdDConfigurazioneSistemaNomeMetodoWrapKey;
  2836.         this.jmxPdDConfigurazioneSistemaNomeRisorsaMonitoraggio = core.jmxPdDConfigurazioneSistemaNomeRisorsaMonitoraggio;
  2837.         this.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniDB = core.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniDB;
  2838.         this.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniJMS = core.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniJMS;
  2839.         this.jmxPdDConfigurazioneSistemaNomeMetodoIdTransazioniAttive = core.jmxPdDConfigurazioneSistemaNomeMetodoIdTransazioniAttive;
  2840.         this.jmxPdDConfigurazioneSistemaNomeMetodoIdProtocolloTransazioniAttive = core.jmxPdDConfigurazioneSistemaNomeMetodoIdProtocolloTransazioniAttive;
  2841.         this.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniPD = core.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniPD;
  2842.         this.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniPA = core.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniPA;
  2843.         this.jmxPdDConfigurazioneSistemaNomeRisorsaConfigurazionePdD = core.jmxPdDConfigurazioneSistemaNomeRisorsaConfigurazionePdD;
  2844.         this.jmxPdDConfigurazioneSistemaNomeAttributoSeveritaDiagnostici = core.jmxPdDConfigurazioneSistemaNomeAttributoSeveritaDiagnostici;
  2845.         this.jmxPdDConfigurazioneSistemaNomeAttributoSeveritaDiagnosticiLog4j = core.jmxPdDConfigurazioneSistemaNomeAttributoSeveritaDiagnosticiLog4j;
  2846.         this.jmxPdDConfigurazioneSistemaNomeAttributoTracciamento = core.jmxPdDConfigurazioneSistemaNomeAttributoTracciamento;
  2847.         this.jmxPdDConfigurazioneSistemaNomeAttributoDumpPD = core.jmxPdDConfigurazioneSistemaNomeAttributoDumpPD;
  2848.         this.jmxPdDConfigurazioneSistemaNomeAttributoDumpPA = core.jmxPdDConfigurazioneSistemaNomeAttributoDumpPA;
  2849.         this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jDiagnostica = core.jmxPdDConfigurazioneSistemaNomeAttributoLog4jDiagnostica;
  2850.         this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jOpenspcoop = core.jmxPdDConfigurazioneSistemaNomeAttributoLog4jOpenspcoop;
  2851.         this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jIntegrationManager = core.jmxPdDConfigurazioneSistemaNomeAttributoLog4jIntegrationManager;
  2852.         this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jTracciamento = core.jmxPdDConfigurazioneSistemaNomeAttributoLog4jTracciamento;
  2853.         this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jDump = core.jmxPdDConfigurazioneSistemaNomeAttributoLog4jDump;
  2854.         this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorStatusCode = core.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorStatusCode;
  2855.         this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorInstanceId = core.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorInstanceId;
  2856.         this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeBadResponse = core.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeBadResponse;
  2857.         this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalResponseError = core.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalResponseError;
  2858.         this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalRequestError = core.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalRequestError;
  2859.         this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalError = core.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalError;
  2860.         this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorDetails = core.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorDetails;
  2861.         this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorUseStatusCodeAsFaultCode = core.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorUseStatusCodeAsFaultCode;
  2862.         this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorGenerateHttpHeaderGovWayCode = core.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorGenerateHttpHeaderGovWayCode;
  2863.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerConsegnaContenutiApplicativi = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerConsegnaContenutiApplicativi;
  2864.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerEventi = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerEventi;
  2865.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerFileSystemRecovery = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerFileSystemRecovery;
  2866.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreBusteOnewayNonRiscontrate = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreBusteOnewayNonRiscontrate;
  2867.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreBusteAsincroneNonRiscontrate = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreBusteAsincroneNonRiscontrate;
  2868.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiEliminati = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiEliminati;
  2869.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiScaduti = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiScaduti;
  2870.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiNonGestiti = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiNonGestiti;
  2871.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaCorrelazioneApplicativa = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaCorrelazioneApplicativa;
  2872.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiVerificaConnessioniAttive = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiVerificaConnessioniAttive;
  2873.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestorePuliziaMessaggiAnomali = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestorePuliziaMessaggiAnomali;
  2874.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreRepositoryBuste = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreRepositoryBuste;
  2875.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerMonitoraggioRisorseThread = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerMonitoraggioRisorseThread;
  2876.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerRepositoryStatefulThread = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerRepositoryStatefulThread;
  2877.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheOrarie = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheOrarie;
  2878.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheGiornaliere = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheGiornaliere;
  2879.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheSettimanali = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheSettimanali;
  2880.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheMensili = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheMensili;
  2881.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerPdndTracciamentoGenerazione = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerPdndTracciamentoGenerazione;
  2882.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerPdndTracciamentoPubblicazione = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerPdndTracciamentoPubblicazione;
  2883.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreChiaviPDND = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreChiaviPDND;
  2884.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreCacheChiaviPDND = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreCacheChiaviPDND;
  2885.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreOperazioniRemote = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreOperazioniRemote;
  2886.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerSvecchiamentoOperazioniRemote = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerSvecchiamentoOperazioniRemote;
  2887.         this.jmxPdDConfigurazioneSistemaNomeAttributoTimerThresholdThread = core.jmxPdDConfigurazioneSistemaNomeAttributoTimerThresholdThread;
  2888.         this.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreById = core.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreById;
  2889.         this.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreById = core.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreById;
  2890.         this.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyValidazione = core.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyValidazione;
  2891.         this.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyNegoziazione = core.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyNegoziazione;
  2892.         this.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreAttributeAuthority = core.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreAttributeAuthority;
  2893.         this.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyValidazione = core.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyValidazione;
  2894.         this.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyNegoziazione = core.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyNegoziazione;
  2895.         this.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreAttributeAuthority = core.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreAttributeAuthority;
  2896.         this.jmxPdDConfigurazioneSistemaNomeMetodoEnablePortaDelegata = core.jmxPdDConfigurazioneSistemaNomeMetodoEnablePortaDelegata;
  2897.         this.jmxPdDConfigurazioneSistemaNomeMetodoDisablePortaDelegata = core.jmxPdDConfigurazioneSistemaNomeMetodoDisablePortaDelegata;
  2898.         this.jmxPdDConfigurazioneSistemaNomeMetodoEnablePortaApplicativa = core.jmxPdDConfigurazioneSistemaNomeMetodoEnablePortaApplicativa;
  2899.         this.jmxPdDConfigurazioneSistemaNomeMetodoDisablePortaApplicativa = core.jmxPdDConfigurazioneSistemaNomeMetodoDisablePortaApplicativa;
  2900.         this.jmxPdDConfigurazioneSistemaNomeMetodoEnableConnettoreMultiplo = core.jmxPdDConfigurazioneSistemaNomeMetodoEnableConnettoreMultiplo;
  2901.         this.jmxPdDConfigurazioneSistemaNomeMetodoDisableConnettoreMultiplo = core.jmxPdDConfigurazioneSistemaNomeMetodoDisableConnettoreMultiplo;
  2902.         this.jmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiplo = core.jmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiplo;
  2903.         this.jmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiplo = core.jmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiplo;
  2904.         this.jmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiploRuntimeRepository = core.jmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiploRuntimeRepository;
  2905.         this.jmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiploRuntimeRepository = core.jmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiploRuntimeRepository;
  2906.         this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAccordoCooperazione = core.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAccordoCooperazione;
  2907.         this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApi = core.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApi;
  2908.         this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheErogazione = core.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheErogazione;
  2909.         this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheFruizione = core.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheFruizione;
  2910.         this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheSoggetto = core.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheSoggetto;
  2911.         this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApplicativo = core.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApplicativo;
  2912.         this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheRuolo = core.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheRuolo;
  2913.         this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheScope = core.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheScope;
  2914.         this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyValidazione = core.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyValidazione;
  2915.         this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyNegoziazione = core.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyNegoziazione;
  2916.         this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAttributeAuthority = core.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAttributeAuthority;
  2917.         this.jmxPdDConfigurazioneSistemaNomeRisorsaAccessoRegistroServizi = core.jmxPdDConfigurazioneSistemaNomeRisorsaAccessoRegistroServizi;
  2918.         this.jmxPdDConfigurazioneSistemaNomeRisorsaStatoServiziPdD = core.jmxPdDConfigurazioneSistemaNomeRisorsaStatoServiziPdD;
  2919.         this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegata = core.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegata;
  2920.         this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataAbilitazioniPuntuali = core.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataAbilitazioniPuntuali;
  2921.         this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataDisabilitazioniPuntuali = core.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataDisabilitazioniPuntuali;
  2922.         this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativa = core.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativa;
  2923.         this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaAbilitazioniPuntuali = core.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaAbilitazioniPuntuali;
  2924.         this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaDisabilitazioniPuntuali = core.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaDisabilitazioniPuntuali;
  2925.         this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioIntegrationManager = core.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioIntegrationManager;
  2926.         this.jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaDelegata = core.jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaDelegata;
  2927.         this.jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaDelegata = core.jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaDelegata;
  2928.         this.jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaApplicativa = core.jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaApplicativa;
  2929.         this.jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaApplicativa = core.jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaApplicativa;
  2930.         this.jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioIntegrationManager = core.jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioIntegrationManager;
  2931.         this.jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioIntegrationManager = core.jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioIntegrationManager;
  2932.         this.jmxPdDConfigurazioneSistemaNomeRisorsaDatasourceGW = core.jmxPdDConfigurazioneSistemaNomeRisorsaDatasourceGW;
  2933.         this.jmxPdDConfigurazioneSistemaNomeAttributoNumeroDatasourceGW = core.jmxPdDConfigurazioneSistemaNomeAttributoNumeroDatasourceGW;
  2934.         this.jmxPdDConfigurazioneSistemaNomeMetodoGetDatasourcesGW = core.jmxPdDConfigurazioneSistemaNomeMetodoGetDatasourcesGW;
  2935.         this.jmxPdDConfigurazioneSistemaNomeMetodoGetUsedConnectionsDatasourcesGW = core.jmxPdDConfigurazioneSistemaNomeMetodoGetUsedConnectionsDatasourcesGW;
  2936.         this.jmxPdDConfigurazioneSistemaNomeMetodoGetInformazioniDatabaseDatasourcesGW = core.jmxPdDConfigurazioneSistemaNomeMetodoGetInformazioniDatabaseDatasourcesGW;
  2937.         this.jmxPdDConfigurazioneSistemaNomeRisorsaConsegnaContenutiApplicativi = core.jmxPdDConfigurazioneSistemaNomeRisorsaConsegnaContenutiApplicativi;
  2938.         this.jmxPdDConfigurazioneSistemaNomeMetodoGetThreadPoolStatus = core.jmxPdDConfigurazioneSistemaNomeMetodoGetThreadPoolStatus;
  2939.         this.jmxPdDConfigurazioneSistemaNomeMetodoGetQueueConfig = core.jmxPdDConfigurazioneSistemaNomeMetodoGetQueueConfig;
  2940.         this.jmxPdDConfigurazioneSistemaNomeMetodoGetApplicativiPrioritari = core.jmxPdDConfigurazioneSistemaNomeMetodoGetApplicativiPrioritari;
  2941.         this.jmxPdDConfigurazioneSistemaNomeMetodoGetConnettoriPrioritari = core.jmxPdDConfigurazioneSistemaNomeMetodoGetConnettoriPrioritari;
  2942.         this.jmxPdDConfigurazioneSistemaNomeMetodoUpdateConnettoriPrioritari = core.jmxPdDConfigurazioneSistemaNomeMetodoUpdateConnettoriPrioritari;
  2943.         this.jmxPdDConfigurazioneSistemaNomeMetodoResetConnettoriPrioritari = core.jmxPdDConfigurazioneSistemaNomeMetodoResetConnettoriPrioritari;
  2944.         this.jmxPdDConfigurazioneSistemaNomeRisorsaSystemPropertiesPdD = core.jmxPdDConfigurazioneSistemaNomeRisorsaSystemPropertiesPdD;
  2945.         this.jmxPdDConfigurazioneSistemaNomeMetodoRefreshPersistentConfiguration = core.jmxPdDConfigurazioneSistemaNomeMetodoRefreshPersistentConfiguration;
  2946.         this.jmxPdDConfigurazioneSistemaNomeRisorsaDatiRichieste = core.jmxPdDConfigurazioneSistemaNomeRisorsaDatiRichieste;
  2947.         this.jmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingGlobalConfigCache = core.jmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingGlobalConfigCache;
  2948.         this.jmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingAPIConfigCache = core.jmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingAPIConfigCache;
  2949.         this.jmxPdDCaches = core.jmxPdDCaches;
  2950.         this.jmxPdDCachesPrefill = core.jmxPdDCachesPrefill;
  2951.         this.jmxPdDCacheType = core.jmxPdDCacheType;
  2952.         this.jmxPdDCacheNomeAttributoCacheAbilitata = core.jmxPdDCacheNomeAttributoCacheAbilitata;
  2953.         this.jmxPdDCacheNomeMetodoStatoCache = core.jmxPdDCacheNomeMetodoStatoCache;
  2954.         this.jmxPdDCacheNomeMetodoResetCache = core.jmxPdDCacheNomeMetodoResetCache;
  2955.         this.jmxPdDCacheNomeMetodoPrefillCache = core.jmxPdDCacheNomeMetodoPrefillCache;
  2956.     }




  2957.     /* --- INIT METHOD --- */

  2958.     /**
  2959.      * Prova ad ottenere una istanza del DBManager per utilizzare le connessioni
  2960.      * del pool
  2961.      *
  2962.      * @throws DriverControlStationException
  2963.      */
  2964.     private void initConnections() throws ControlStationCoreException {

  2965.         // Connessione al DB
  2966.         DatasourceProperties datasourceProperties = null;
  2967.         String jndiName = null;
  2968.         Properties jndiProp = null;
  2969.         try {
  2970.             datasourceProperties = DatasourceProperties.getInstance();
  2971.            
  2972.             jndiName = datasourceProperties.getDataSource();
  2973.             jndiProp = datasourceProperties.getDataSourceContext();
  2974.            
  2975.             this.tipoDB = datasourceProperties.getTipoDatabase();
  2976.            
  2977.             if(this.singlePdD){
  2978.                 this.tracceSameDBWebUI = datasourceProperties.isSinglePddTracceStessoDBConsole();
  2979.                 if(!this.tracceSameDBWebUI){
  2980.                     this.tracceDatasource = datasourceProperties.getSinglePddTracceDataSource();
  2981.                     this.tracceCtxDatasource = datasourceProperties.getSinglePddTracceDataSourceContext();
  2982.                     this.tracceTipoDatabase = datasourceProperties.getSinglePddTracceTipoDatabase();
  2983.                 }
  2984.                
  2985.                 this.msgDiagnosticiSameDBWebUI = datasourceProperties.isSinglePddMessaggiDiagnosticiStessoDBConsole();
  2986.                 if(!this.msgDiagnosticiSameDBWebUI){
  2987.                     this.msgDiagnosticiDatasource = datasourceProperties.getSinglePddMessaggiDiagnosticiDataSource();
  2988.                     this.msgDiagnosticiCtxDatasource = datasourceProperties.getSinglePddMessaggiDiagnosticiDataSourceContext();
  2989.                     this.msgDiagnosticiTipoDatabase = datasourceProperties.getSinglePddMessaggiDiagnosticiTipoDatabase();
  2990.                 }
  2991.             }
  2992.            
  2993.         } catch (java.lang.Exception e) {
  2994.             ControlStationCore.logError("[ControlStationCore::initConnections] Impossibile leggere i dati dal file console.datasource.properties[" + e.toString() + "]",e);
  2995.             throw new ControlStationCoreException("Impossibile leggere i dati dal file console.datasource.properties: " + e.getMessage(),e);
  2996.         }

  2997.         if (!DBManager.isInitialized()) {
  2998.             int i = 0;
  2999.             while (!DBManager.isInitialized() && (i < 6)) {

  3000.                 try {
  3001.                     ControlStationCore.logDebug("jndiName=" + jndiName);
  3002.                     ControlStationCore.logDebug("jndiProp=" + jndiProp.toString());
  3003.                     DBManager.initialize(jndiName, jndiProp);
  3004.                     ControlStationCore.logInfo("Inizializzazione DBManager Effettuata.");
  3005.                 } catch (Exception e) {
  3006.                     ControlStationCore.logError("Inizializzazione DBManager fallita.", e);
  3007.                     ControlStationCore.logInfo("Ritento inizializzazione ...");
  3008.                 }

  3009.                 i++;
  3010.             }
  3011.         }

  3012.         if (!DBManager.isInitialized()) {
  3013.             throw new ControlStationCoreException("Inizializzazione DBManager fallita ripetutamente.");
  3014.         }

  3015.         ControlStationCore.dbM = DBManager.getInstance();

  3016.     }

  3017.     private void initCore() throws ControlStationCoreException {
  3018.         this.tipoDB = "";

  3019.         this.smistatoreQueue = "";
  3020.         this.cfName = "";
  3021.         this.cfProp = new Properties();

  3022.            
  3023.         // Leggo le informazioni da console.properties
  3024.         ConsoleProperties consoleProperties = null;
  3025.         try {
  3026.             consoleProperties = ConsoleProperties.getInstance();
  3027.            
  3028.             // Funzionalitร  Generiche
  3029.             this.protocolloDefault = consoleProperties.getProtocolloDefault();
  3030.             this.jdbcSerializableAttesaAttiva = consoleProperties.getGestioneSerializableDBattesaAttiva();
  3031.             this.jdbcSerializableCheck = consoleProperties.getGestioneSerializableDBcheckInterval();
  3032.             this.singlePdD = consoleProperties.isSinglePdD();
  3033.             this.enabledToken_generazioneAutomaticaPorteDelegate = consoleProperties.isTokenGenerazioneAutomaticaPorteDelegateEnabled();
  3034.             this.enabledAutenticazione_generazioneAutomaticaPorteDelegate = consoleProperties.isAutenticazioneGenerazioneAutomaticaPorteDelegateEnabled();
  3035.             this.autenticazione_generazioneAutomaticaPorteDelegate = consoleProperties.getAutenticazioneGenerazioneAutomaticaPorteDelegate();
  3036.             this.enabledAutorizzazione_generazioneAutomaticaPorteDelegate = consoleProperties.isAutorizzazioneGenerazioneAutomaticaPorteDelegateEnabled();
  3037.             this.autorizzazione_generazioneAutomaticaPorteDelegate = consoleProperties.getAutorizzazioneGenerazioneAutomaticaPorteDelegate();      
  3038.             this.enabledToken_generazioneAutomaticaPorteApplicative = consoleProperties.isTokenGenerazioneAutomaticaPorteApplicativeEnabled();
  3039.             this.enabledAutenticazione_generazioneAutomaticaPorteApplicative = consoleProperties.isAutenticazioneGenerazioneAutomaticaPorteApplicativeEnabled();
  3040.             this.autenticazione_generazioneAutomaticaPorteApplicative = consoleProperties.getAutenticazioneGenerazioneAutomaticaPorteApplicative();
  3041.             this.enabledAutorizzazione_generazioneAutomaticaPorteApplicative = consoleProperties.isAutorizzazioneGenerazioneAutomaticaPorteApplicativeEnabled();
  3042.             this.autorizzazione_generazioneAutomaticaPorteApplicative = consoleProperties.getAutorizzazioneGenerazioneAutomaticaPorteApplicative();
  3043.             this.isAbilitatoControlloUnicitaImplementazioneAccordoPerSoggetto = consoleProperties.isAbilitatoControlloUnicitaImplementazioneAccordoPerSoggetto();
  3044.             this.isAbilitatoControlloUnicitaImplementazionePortTypePerSoggetto = consoleProperties.isAbilitatoControlloUnicitaImplementazionePortTypePerSoggetto();
  3045.             this.utenzePasswordConfiguration = consoleProperties.getConsoleUtenzePassword();
  3046.             this.utenzeLunghezzaPasswordGenerate = consoleProperties.getConsoleUtenzeLunghezzaPasswordGenerate();
  3047.             this.utenzeModificaProfiloUtenteDaFormAggiornaSessione = consoleProperties.isConsoleUtenzeModificaProfiloUtenteDaFormAggiornaSessione();
  3048.             this.utenzeModificaProfiloUtenteDaLinkAggiornaDB = consoleProperties.isConsoleUtenzeModificaProfiloUtenteDaLinkAggiornaDB();
  3049.             this.applicativiPwConfiguration = consoleProperties.getConsoleApplicativiPassword();
  3050.             this.applicativiBasicPwEnableConstraints = consoleProperties.isConsoleApplicativiBasicPasswordEnableConstraints();
  3051.             this.applicativiBasicLunghezzaPwGenerate = consoleProperties.getConsoleApplicativiBasicLunghezzaPasswordGenerate();
  3052.             this.applicativiApiKeyLunghezzaPwGenerate = consoleProperties.getConsoleApplicativiApiKeyLunghezzaPasswordGenerate();
  3053.             this.soggettiPwConfiguration = consoleProperties.getConsoleSoggettiPassword();
  3054.             this.soggettiBasicPwEnableConstraints = consoleProperties.isConsoleSoggettiBasicPasswordEnableConstraints();
  3055.             this.soggettiBasicLunghezzaPwGenerate = consoleProperties.getConsoleSoggettiBasicLunghezzaPasswordGenerate();
  3056.             this.soggettiApiKeyLunghezzaPwGenerate = consoleProperties.getConsoleSoggettiApiKeyLunghezzaPasswordGenerate();        
  3057.             this.messageSecurityPropertiesSourceConfiguration = consoleProperties.getMessageSecurityPropertiesSourceConfiguration();
  3058.             this.policyGestioneTokenPropertiesSourceConfiguration = consoleProperties.getPolicyGestioneTokenPropertiesSourceConfiguration();
  3059.             this.isPolicyGestioneTokenVerificaCertificati = consoleProperties.isPolicyGestioneTokenVerificaCertificati();
  3060.             this.policyGestioneTokenPDND = consoleProperties.getPolicyGestioneTokenPDND();
  3061.             if(consoleProperties.isPolicyGestioneTokenUseAllPDNDStoresAsPolicyPDND() && isProfiloModIPAEnabled()) {
  3062.                 initPolicyGestioneTokenPDND();
  3063.             }
  3064.             this.attributeAuthorityPropertiesSourceConfiguration = consoleProperties.getAttributeAuthorityPropertiesSourceConfiguration();
  3065.             this.isAttributeAuthorityVerificaCertificati = consoleProperties.isAttributeAuthorityVerificaCertificati();
  3066.             this.isControlloTrafficoPolicyGlobaleGroupByApi = consoleProperties.isControlloTrafficoPolicyGlobaleGroupByApi();
  3067.             this.isControlloTrafficoPolicyGlobaleFiltroApi = consoleProperties.isControlloTrafficoPolicyGlobaleFiltroApi();
  3068.             this.isControlloTrafficoPolicyGlobaleFiltroApiSoggettoErogatore = consoleProperties.isControlloTrafficoPolicyGlobaleFiltroApiSoggettoErogatore();
  3069.             this.controlloTrafficoPolicyRateLimitingTipiGestori = consoleProperties.getControlloTrafficoPolicyRateLimitingTipiGestori();
  3070.             this.isAuditingRegistrazioneElementiBinari = consoleProperties.isAuditingRegistrazioneElementiBinari();
  3071.             this.isIntegrationManagerEnabled = consoleProperties.isIntegrationManagerEnabled();
  3072.             this.isIntegrationManagerTraceMessageBoxOperationEnabled = consoleProperties.isIntegrationManagerTraceMessageBoxOperationEnabled();
  3073.             this.soggettiNomeMaxLength = consoleProperties.getSoggettiNomeMaxLength();
  3074.             this.isSoggettiVerificaCertificati = consoleProperties.isSoggettiVerificaCertificati();
  3075.             this.isApplicativiVerificaCertificati = consoleProperties.isApplicativiVerificaCertificati();
  3076.             this.isApiResourcePathValidatorEnabled = consoleProperties.isApiResourcePathValidatorEnabled();
  3077.             this.isApiResourceHttpMethodAndPathQualsiasiEnabled = consoleProperties.isApiResourceHttpMethodAndPathQualsiasiEnabled();
  3078.             this.getApiResourcePathQualsiasiSpecialChar = consoleProperties.getApiResourcePathQualsiasiSpecialChar();
  3079.             this.isApiOpenAPIValidateUriReferenceAsUrl = consoleProperties.isApiOpenAPIValidateUriReferenceAsUrl();
  3080.             this.isApiRestResourceRepresentationMessageTypeOverride = consoleProperties.isApiRestResourceRepresentationMessageTypeOverride();
  3081.             this.isApiDescriptionTruncate255 = consoleProperties.isApiDescriptionTruncate255();
  3082.             this.isApiDescriptionTruncate4000 = consoleProperties.isApiDescriptionTruncate4000();
  3083.             this.isAccordiCooperazioneEnabled = consoleProperties.isAccordiCooperazioneEnabled();
  3084.             this.isErogazioniVerificaCertificati = consoleProperties.isErogazioniVerificaCertificati();
  3085.             this.isFruizioniVerificaCertificati = consoleProperties.isFruizioniVerificaCertificati();
  3086.             this.messageEngines = consoleProperties.getMessageEngines();
  3087.             this.isSoggettiCredenzialiBasicCheckUniqueUsePassword = consoleProperties.isSoggettiCredenzialiBasicCheckUniqueUsePassword();
  3088.             this.isApplicativiCredenzialiBasicCheckUniqueUsePassword = consoleProperties.isApplicativiCredenzialiBasicCheckUniqueUsePassword();
  3089.             this.isSoggettiApplicativiCredenzialiBasicPermitSameCredentials = consoleProperties.isSoggettiApplicativiCredenzialiBasicPermitSameCredentials();
  3090.             this.isSoggettiApplicativiCredenzialiSslPermitSameCredentials = consoleProperties.isSoggettiApplicativiCredenzialiSslPermitSameCredentials();
  3091.             this.isSoggettiApplicativiCredenzialiPrincipalPermitSameCredentials = consoleProperties.isSoggettiApplicativiCredenzialiPrincipalPermitSameCredentials();
  3092.             this.isConnettoriAllTypesEnabled = consoleProperties.isConnettoriAllTypesEnabled();
  3093.             this.isConnettoriMultipliEnabled = consoleProperties.isConnettoriMultipliEnabled();
  3094.             this.isConnettoriMultipliConsegnaCondizionaleStessFiltroPermesso = consoleProperties.isConnettoriMultipliConsegnaCondizionaleStessFiltroPermesso();
  3095.             this.isConnettoriMultipliConsegnaMultiplaEnabled = consoleProperties.isConnettoriMultipliConsegnaMultiplaEnabled();
  3096.             this.isApplicativiServerEnabled = consoleProperties.isApplicativiServerEnabled();
  3097.             this.consegnaNotificaCode = consoleProperties.getConsegnaNotificaCode();
  3098.             for (String coda : this.consegnaNotificaCode) {
  3099.                 this.consegnaNotificaCodaLabel.put(coda, consoleProperties.getConsegnaNotificaCodaLabel(coda));
  3100.             }
  3101.             this.consegnaNotificaPriorita = consoleProperties.getConsegnaNotificaPriorita();
  3102.             for (String priorita : this.consegnaNotificaPriorita) {
  3103.                 this.consegnaNotificaConfigurazionePriorita.put(priorita, consoleProperties.getConsegnaNotificaConfigurazionePriorita(priorita));
  3104.             }
  3105.             this.isModipaErogazioniVerificaCertificati = consoleProperties.isModipaErogazioniVerificaCertificati();
  3106.             this.isModipaFruizioniVerificaCertificati = consoleProperties.isModipaFruizioniVerificaCertificati();
  3107.             this.isModipaFruizioniConnettoreCheckHttps = consoleProperties.isModipaFruizioniConnettoreCheckHttps();
  3108.             this.isModipaFiltroRicercaProfiloQualsiasiVisualizzaDatiModi = consoleProperties.isModipaFiltroRicercaProfiloQualsiasiVisualizzaDatiModi();
  3109.             this.configurazionePluginsEnabled = consoleProperties.isConfigurazionePluginsEnabled();
  3110.             this.configurazionePluginsSeconds = consoleProperties.getPluginsSeconds();
  3111.             this.configurazioneHandlersEnabled = consoleProperties.isConfigurazioneHandlersEnabled();
  3112.             this.configurazioneAllarmiEnabled = consoleProperties.isConfigurazioneAllarmiEnabled();
  3113.             if(this.configurazioneAllarmiEnabled) {
  3114.                 this.allarmiConfig = AlarmConfigProperties.getAlarmConfiguration(ControlStationCore.getLog(), consoleProperties.getAllarmiConfigurazione(), consoleProperties.getConfDirectory());
  3115.                 this.showAllarmiIdentificativoRuntime = consoleProperties.isShowAllarmiIdentificativoRuntime();
  3116.                 this.showAllarmiFormNomeSuggeritoCreazione = consoleProperties.isShowAllarmiFormNomeSuggeritoCreazione();
  3117.                 this.showAllarmiFormStatoAllarme = consoleProperties.isShowAllarmiFormStatoAllarme();
  3118.                 this.showAllarmiFormStatoAllarmeHistory = consoleProperties.isShowAllarmiFormStatoAllarmeHistory();
  3119.                 this.showAllarmiSearchStatiAllarmi = consoleProperties.isShowAllarmiSearchStatiAllarmi();
  3120.                 this.showAllarmiElenchiStatiAllarmi = consoleProperties.isShowAllarmiElenchiStatiAllarmi();
  3121.             }
  3122.             this.isRegistrazioneMessaggiMultipartPayloadParsingEnabled = consoleProperties.isRegistrazioneMessaggiMultipartPayloadParsingEnabled();
  3123.             this.isClusterDinamicoEnabled = consoleProperties.isClusterDinamicoEnabled();
  3124.             this.visualizzaInformazioniCifrate = consoleProperties.isVisualizzaInformazioniCifrate();
  3125.             this.byokWarningMessage = consoleProperties.getVisualizzaInformazioniCifrateWarningMessage();
  3126.             this.notaInformativaInformazioneMemorizzataInChiaro = consoleProperties.getNotaInformativaInformazioneMemorizzataInChiaro();
  3127.             this.notaInformativaInformazioneCifrataSecurityPolicyDifferente = consoleProperties.getNotaInformativaInformazioneCifrataSecurityPolicyDifferente();
  3128.             this.visualizzaCampiPasswordComeLock = consoleProperties.isVisualizzaCampiPasswordComeLock();
  3129.             this.isOCSPPolicyChoiceConnettoreHTTPSVerificaServerDisabilitata = consoleProperties.isOCSPPolicyChoiceConnettoreHTTPSVerificaServerDisabilitata();
  3130.             this.verificaCertificatiWarningExpirationDays = consoleProperties.getVerificaCertificatiWarningExpirationDays();
  3131.             this.verificaCertificatiSceltaClusterId = consoleProperties.isVerificaCertificatiSceltaClusterId();
  3132.             this.isClusterAsyncUpdate = consoleProperties.isClusterAsyncUpdate();
  3133.             this.clusterAsyncUpdateCheckInterval = consoleProperties.getClusterAsyncUpdateCheckInterval();
  3134.             this.isTracciamentoDatabaseRispostaConsegnataSelectEnabled = consoleProperties.isTracciamentoDatabaseRispostaConsegnataSelectEnabled();
  3135.             this.isKeystoreJksPasswordRequired = consoleProperties.isKeystoreJksPasswordRequired();
  3136.             this.isKeystoreJksKeyPasswordRequired = consoleProperties.isKeystoreJksKeyPasswordRequired();
  3137.             this.isKeystorePkcs12PasswordRequired = consoleProperties.isKeystorePkcs12PasswordRequired();
  3138.             this.isKeystorePkcs12KeyPasswordRequired = consoleProperties.isKeystorePkcs12KeyPasswordRequired();
  3139.             this.isTruststoreJksPasswordRequired = consoleProperties.isTruststoreJksPasswordRequired();
  3140.             this.isTruststorePkcs12PasswordRequired = consoleProperties.isTruststorePkcs12PasswordRequired();
  3141.             this.isLoadCertificateWizardJksPasswordRequiredRequired = consoleProperties.isLoadCertificateWizardJksPasswordRequiredRequired();
  3142.             this.isLoadCertificateWizardPkcs12PasswordRequiredRequired = consoleProperties.isLoadCertificateWizardPkcs12PasswordRequiredRequired();
  3143.        
  3144.             // Impostazioni grafiche
  3145.             this.consoleNomeSintesi = consoleProperties.getConsoleNomeSintesi();
  3146.             this.consoleNomeEsteso = consoleProperties.getConsoleNomeEsteso();
  3147.             this.consoleCSS = consoleProperties.getConsoleCSS();
  3148.             this.consoleLanguage = consoleProperties.getConsoleLanguage();
  3149.             this.consoleLunghezzaLabel = consoleProperties.getConsoleLunghezzaLabel();
  3150.             this.logoHeaderImage = consoleProperties.getLogoHeaderImage();
  3151.             this.logoHeaderLink = consoleProperties.getLogoHeaderLink();
  3152.             this.logoHeaderTitolo = consoleProperties.getLogoHeaderTitolo();
  3153.             this.visualizzaLinkHomeHeader = consoleProperties.isVisualizzaLinkHomeHeader();
  3154.             String fontName = consoleProperties.getConsoleFontFamilyName();
  3155.             int fontStyle = consoleProperties.getConsoleFontStyle();
  3156.             this.defaultFont = new Font(fontName,fontStyle, 14);
  3157.            
  3158.             /** Login */
  3159.             this.loginApplication = consoleProperties.isLoginApplication();
  3160.             this.loginErroreInternoRedirectUrl = consoleProperties.getLoginErroreInternoRedirectUrl();
  3161.             this.loginProperties = consoleProperties.getLoginProperties();
  3162.             this.loginSessioneScadutaRedirectUrl = consoleProperties.getLoginSessioneScadutaRedirectUrl();
  3163.             this.loginTipo = consoleProperties.getLoginTipo();
  3164.             this.loginUtenteNonAutorizzatoRedirectUrl = consoleProperties.getLoginUtenteNonAutorizzatoRedirectUrl();
  3165.             this.loginUtenteNonValidoRedirectUrl = consoleProperties.getLoginUtenteNonValidoRedirectUrl();
  3166.             this.logoutMostraButton = consoleProperties.isMostraButtonLogout();
  3167.             this.logoutUrlDestinazione = consoleProperties.getLogoutUrlDestinazione();
  3168.            
  3169.             // Opzioni di Visualizzazione
  3170.             this.showJ2eeOptions = consoleProperties.isShowJ2eeOptions();
  3171.             this.showConfigurazioniPersonalizzate = consoleProperties.isConsoleConfigurazioniPersonalizzate();
  3172.             this.showGestioneSoggettiRouter = consoleProperties.isConsoleGestioneSoggettiRouter();
  3173.             this.showGestioneSoggettiVirtuali = consoleProperties.isConsoleGestioneSoggettiVirtuali();
  3174.             this.showGestioneWorkflowStatoDocumenti = consoleProperties.isConsoleGestioneWorkflowStatoDocumenti();
  3175.             this.gestioneWorkflowStatoDocumentiVisualizzaStatoLista = consoleProperties.isConsoleGestioneWorkflowStatoDocumentiVisualizzaStatoLista();
  3176.             this.gestioneWorkflowStatoDocumentiRipristinoStatoOperativoDaFinale = consoleProperties.isConsoleGestioneWorkflowStatoDocumentiRipristinoStatoOperativoDaFinale();
  3177.             this.showInterfacceAPI = consoleProperties.isConsoleInterfacceAPIVisualizza();
  3178.             this.showAllegati = consoleProperties.isConsoleAllegatiVisualizza();
  3179.             this.showFlagPrivato = consoleProperties.isMenuVisualizzaFlagPrivato();
  3180.             this.showAllConnettori = consoleProperties.isMenuVisualizzaListaCompletaConnettori();
  3181.             this.showDebugOptionConnettore = consoleProperties.isMenuVisualizzaOpzioneDebugConnettore();
  3182.             this.showCorrelazioneAsincronaInAccordi = consoleProperties.isMenuAccordiVisualizzaCorrelazioneAsincrona();
  3183.             this.showAccordiInformazioniProtocollo = consoleProperties.isMenuAccordiVisualizzazioneGestioneInformazioniProtocollo();
  3184.             this.showCountElementInLinkList = consoleProperties.isElenchiVisualizzaCountElementi();
  3185.             this.conservaRisultatiRicerca = consoleProperties.isElenchiRicercaConservaCriteri();
  3186.             if(conservaRisultatiRicercaStaticInfoRead==null) {
  3187.                 conservaRisultatiRicercaStaticInfoRead = true;
  3188.                 conservaRisultatiRicercaStaticInfo = this.conservaRisultatiRicerca;
  3189.             }
  3190.             this.showAccordiColonnaAzioni = consoleProperties.isElenchiAccordiVisualizzaColonnaAzioni();
  3191.             this.showPulsantiImportExport = consoleProperties.isElenchiMenuVisualizzazionePulsantiImportExportPackage();
  3192.             this.elenchiMenuIdentificativiLunghezzaMassima = consoleProperties.getElenchiMenuIdentificativiLunghezzaMassima();
  3193.             this.enableAutoMappingWsdlIntoAccordo = consoleProperties.isEnableAutoMappingWsdlIntoAccordo();
  3194.             this.enableAutoMappingWsdlIntoAccordoEstrazioneSchemiInWsdlTypes = consoleProperties.isEnableAutoMappingWsdlIntoAccordoEstrazioneSchemiInWsdlTypes();
  3195.             this.showMTOMVisualizzazioneCompleta = consoleProperties.isMenuMTOMVisualizzazioneCompleta();
  3196.             this.portaCorrelazioneApplicativaMaxLength = consoleProperties.getPortaCorrelazioneApplicativaMaxLength();
  3197.             this.showPortaDelegataLocalForward = consoleProperties.isMenuPortaDelegataLocalForward();
  3198.             this.isProprietaErogazioniShowModalitaStandard = consoleProperties.isProprietaErogazioniShowModalitaStandard();
  3199.             this.isProprietaFruizioniShowModalitaStandard = consoleProperties.isProprietaFruizioniShowModalitaStandard();
  3200.             this.isPortTypeObbligatorioImplementazioniSOAP = consoleProperties.isPortTypeObbligatorioImplementazioniSOAP();
  3201.             this.isElenchiSAAsincroniNonSupportatiVisualizzaRispostaAsincrona = consoleProperties.isElenchiSAAsincroniNonSupportatiVisualizzaRispostaAsincrona();
  3202.             this.isVisualizzazioneConfigurazioneDiagnosticaLog4J = consoleProperties.isVisualizzazioneConfigurazioneDiagnosticaLog4J();
  3203.             this.tokenPolicyForceId = consoleProperties.getTokenPolicyForceId();
  3204.             this.tokenPolicyForceIdEnabled = StringUtils.isNotEmpty(this.tokenPolicyForceId);
  3205.             this.tokenPolicyTipologia = consoleProperties.getTokenPolicyTipologia();
  3206.             this.attributeAuthorityForceId = consoleProperties.getAttributeAuthorityForceId();
  3207.             this.attributeAuthorityForceIdEnabled = StringUtils.isNotEmpty(this.attributeAuthorityForceId);
  3208.             this.attributeAuthorityTipologia = consoleProperties.getAttributeAuthorityTipologia();
  3209.             this.showServiziVisualizzaModalitaElenco = consoleProperties.isEnableServiziVisualizzaModalitaElenco();
  3210.             this.selectListSoggettiOperativiNumeroMassimoSoggetti = consoleProperties.getNumeroMassimoSoggettiOperativiMenuUtente();
  3211.             this.selectListSoggettiOperativiDimensioneMassimaLabel = consoleProperties.getLunghezzaMassimaLabelSoggettiOperativiMenuUtente();
  3212.             this.viewLunghezzaMassimaInformazione = consoleProperties.getLunghezzaMassimaInformazioneView();
  3213.             this.isSetSearchAfterAdd = consoleProperties.isSetSearchAfterAdd();
  3214.             this.elenchiVisualizzaComandoResetCacheSingoloElemento = consoleProperties.isElenchiAbilitaResetCacheSingoloElemento();
  3215.             this.validitaTokenCsrf = consoleProperties.getValiditaTokenCsrf();
  3216.             this.cspHeaderValue = consoleProperties.getCSPHeaderValue();
  3217.            
  3218.             // Gestione govwayConsole centralizzata
  3219.             if(!this.singlePdD){
  3220.                 this.sincronizzazionePddEngineEnabled = consoleProperties.isGestioneCentralizzataSincronizzazionePdd();
  3221.                 this.sincronizzazionePddEngineEnabled_prefissoNomeCodaConfigurazionePdd = consoleProperties.getGestioneCentralizzataPrefissoNomeCodaConfigurazionePdd();
  3222.                 this.sincronizzazionePddEngineEnabled_scriptShell_Path = consoleProperties.getGestioneCentralizzataGestorePddScriptShellPath();
  3223.                 this.sincronizzazionePddEngineEnabled_scriptShell_Args = consoleProperties.getGestioneCentralizzataGestorePddScriptShellArgs();
  3224.                 this.sincronizzazioneRegistroEngineEnabled = consoleProperties.isGestioneCentralizzataSincronizzazioneRegistro();
  3225.                 this.sincronizzazioneGEEngineEnabled = consoleProperties.isGestioneCentralizzataSincronizzazioneGestoreEventi();
  3226.                
  3227.                 this.smistatoreQueue = consoleProperties.getGestioneCentralizzataNomeCodaSmistatore();
  3228.                
  3229.                 this.sincronizzazioneGE_TipoSoggetto = consoleProperties.getGestioneCentralizzataGestoreEventiTipoSoggetto();
  3230.                 this.sincronizzazioneGE_NomeSoggetto = consoleProperties.getGestioneCentralizzataGestoreEventiNomeSoggetto();
  3231.                 this.sincronizzazioneGE_NomeServizioApplicativo = consoleProperties.getGestioneCentralizzataGestoreEventiNomeServizioApplicativo();
  3232.                
  3233.                 this.suffissoConnettoreAutomatico = consoleProperties.getGestioneCentralizzataURLContextCreazioneAutomaticaSoggetto();
  3234.                
  3235.                 this.indirizzoPubblico = consoleProperties.getGestioneCentralizzataPddIndirizzoIpPubblico();
  3236.                 this.portaPubblica = consoleProperties.getGestioneCentralizzataPddPortaPubblica();
  3237.                 this.indirizzoGestione = consoleProperties.getGestioneCentralizzataPddIndirizzoIpGestione();
  3238.                 this.portaGestione = consoleProperties.getGestioneCentralizzataPddPortaGestione();
  3239.             }
  3240.            
  3241.             // Gestione govwayConsole locale
  3242.             if(this.singlePdD){
  3243.                 this.gestionePddAbilitata = consoleProperties.isSinglePddGestionePdd();
  3244.                
  3245.                 this.registroServiziLocale = consoleProperties.isSinglePddRegistroServiziLocale();
  3246.                
  3247.                 this.tracceShowConfigurazioneCustomAppender = consoleProperties.isSinglePddTracceConfigurazioneCustomAppender();
  3248.                 this.tracceShowSorgentiDatiDatabase = consoleProperties.isSinglePddTracceGestioneSorgentiDatiPrelevataDaDatabase();
  3249.                
  3250.                 this.msgDiagnosticiShowConfigurazioneCustomAppender = consoleProperties.isSinglePddMessaggiDiagnosticiConfigurazioneCustomAppender();
  3251.                 this.msgDiagnosticiShowSorgentiDatiDatabase = consoleProperties.isSinglePddMessaggiDiagnosticiGestioneSorgentiDatiPrelevataDaDatabase();
  3252.                
  3253.                 this.dumpShowConfigurazioneCustomAppender = consoleProperties.isSinglePddDumpConfigurazioneCustomAppender();
  3254.                 this.dumpShowConfigurazioneDumpRealtime = consoleProperties.isSinglePddDumpConfigurazioneRealtime();
  3255.             }
  3256.            
  3257.             // Opzioni di importazione/esportazione Archivi
  3258.             this.importArchivi_tipoPdD = consoleProperties.getImportArchiveTipoPdD();
  3259.             this.exportArchive_configurazione_soloDumpCompleto = consoleProperties.isExportArchiveConfigurazioneSoloDumpCompleto();
  3260.             this.exportArchive_servizi_standard = consoleProperties.isExportArchiveServiziStandard();
  3261.            
  3262.             // Multitenant
  3263.             // Inizializzato dopo aver attivato il Database, per leggere la configurazione su DB
  3264.            
  3265.             // Gestione Visibilitร  utenti
  3266.             this.visioneOggettiGlobale = consoleProperties.isVisibilitaOggettiGlobale();
  3267.             this.utentiConVisioneGlobale.addAll(consoleProperties.getUtentiConVisibilitaGlobale());

  3268.             /// Opzioni per Plugins
  3269.             this.pluginMenu = this.newIExtendedMenu(consoleProperties.getPluginsMenu());
  3270.             this.pluginConfigurazione = this.newIExtendedFormServlet(consoleProperties.getPluginsConfigurazione());
  3271.             if(this.pluginConfigurazione!=null){
  3272.                 for (IExtendedFormServlet formPluginConfigurazione : this.pluginConfigurazione) {
  3273.                     IExtendedListServlet listPluginConfigurazione = formPluginConfigurazione.getExtendedInternalList();
  3274.                     if(listPluginConfigurazione!=null){
  3275.                         this.pluginConfigurazioneList.put(formPluginConfigurazione.getUniqueID(), listPluginConfigurazione);
  3276.                     }
  3277.                 }
  3278.             }
  3279.             this.pluginConnettore = this.newIExtendedConnettore(consoleProperties.getPluginsConnettore());
  3280.             this.pluginPortaDelegata = this.newIExtendedListServlet(consoleProperties.getPluginsPortaDelegata());
  3281.             this.pluginPortaApplicativa = this.newIExtendedListServlet(consoleProperties.getPluginsPortaApplicativa());

  3282.         } catch (java.lang.Exception e) {
  3283.             ControlStationCore.logError("[ControlStationCore::initCore] Impossibile leggere i dati dal file console.properties:" + e.toString(),e);
  3284.             throw new ControlStationCoreException("[ControlStationCore::initCore] Impossibile leggere i dati dal file console.properties:" + e.toString(),e);
  3285.         }
  3286.        
  3287.        
  3288.        
  3289.         // Leggo le informazioni da queue.properties
  3290.         QueueProperties queueProperties = null;
  3291.         if(this.singlePdD==false){
  3292.             try {
  3293.    
  3294.                 queueProperties = QueueProperties.getInstance();
  3295.                
  3296.                 this.cfName = queueProperties.getConnectionFactory();
  3297.                 this.cfProp = queueProperties.getConnectionFactoryContext();
  3298.                
  3299.             } catch (java.lang.Exception e) {
  3300.                 ControlStationCore.logError("[ControlStationCore::initCore] Impossibile leggere i dati dal file queue.properties[" + e.toString() + "]", e);
  3301.                 throw new ControlStationCoreException("ControlStationCore: Impossibile leggere i dati dal file queue.properties[" + e.toString() + "]",e);
  3302.             }
  3303.         }
  3304.     }

  3305.     private void initBYOK(ConfigurazioneNodiRuntime configurazioneNodiRuntime) {
  3306.         this.configurazioneNodiRuntime = configurazioneNodiRuntime;
  3307.         this.invoker = new InvokerNodiRuntime(log, this.configurazioneNodiRuntime);
  3308.        
  3309.         this.driverBYOKUtilities = new DriverBYOKUtilities(false, log, this.configurazioneNodiRuntime);
  3310.        
  3311.         this.lockUtilities = new LockUtilities(this.driverBYOKUtilities,
  3312.                 this.isVisualizzaInformazioniCifrate(), this.getByokWarningMessage(), UtilsCostanti.SERVLET_NAME_SECRET_DECODER,
  3313.                 this.getNotaInformativaInformazioneMemorizzataInChiaro(), this.getNotaInformativaInformazioneCifrataSecurityPolicyDifferente(), this.isVisualizzaCampiPasswordComeLock());
  3314.        
  3315.     }
  3316.    
  3317.     private void initCoreJmxResources() throws ControlStationCoreException {

  3318.         // Leggo le informazioni da console.properties
  3319.         ConsoleProperties consoleProperties = null;
  3320.         try {
  3321.             consoleProperties = ConsoleProperties.getInstance();
  3322.                    
  3323.             // Opzioni Accesso JMX della PdD
  3324.            
  3325.             initBYOK(consoleProperties.getConfigurazioneNodiRuntime());
  3326.            
  3327.             this.isVisualizzaLinkClearAllCachesRemoteCheckCacheStatus = consoleProperties.isVisualizzaLinkClearAllCachesRemoteCheckCacheStatus();
  3328.             this.jmxPdDAliases = consoleProperties.getJmxPdDAliases();
  3329.             if(!this.singlePdD &&
  3330.                 // se esistono degli alias allora assegno poi come alias i nomi delle pdd operative
  3331.                 this.jmxPdDAliases!=null && !this.jmxPdDAliases.isEmpty()){
  3332.                 this.jmxPdDAliases = new ArrayList<>();
  3333.                 PddCore pddCore = new PddCore(this);
  3334.                 try{
  3335.                     List<PdDControlStation> pddList = pddCore.pddList(null, new ConsoleSearch(true));
  3336.                     for (PdDControlStation pddControlStation : pddList) {
  3337.                         if(PddTipologia.OPERATIVO.toString().equals(pddControlStation.getTipo())){
  3338.                             this.jmxPdDAliases.add(pddControlStation.getNome());
  3339.                         }
  3340.                     }
  3341.                 }catch(Exception e){
  3342.                     // ignore
  3343.                 }
  3344.             }
  3345.            
  3346.             this.jmxPdDConfigurazioneSistemaShowInformazioniCryptographyKeyLength = consoleProperties.isJmxPdDConfigurazioneSistemaShowInformazioniCryptographyKeyLength();
  3347.            
  3348.             if(this.jmxPdDAliases!=null){
  3349.                
  3350.                 this.jmxPdDCertificateChecker = new CertificateChecker(log, this.invoker, this.configurazioneNodiRuntime, this.jmxPdDAliases, consoleProperties);
  3351.                                
  3352.                 for (String alias : this.jmxPdDAliases) {
  3353.                     String descrizione = consoleProperties.getJmxPdDDescrizione(alias);
  3354.                     if(descrizione!=null)
  3355.                         this.jmxPdDDescrizioni.put(alias,descrizione);
  3356.                    
  3357.                     if(!this.singlePdD){
  3358.                         String url = this.configurazioneNodiRuntime.getResourceUrl(alias);
  3359.                         // replace con url del nodo
  3360.                         PddCore pddCore = new PddCore(this);
  3361.                         PdDControlStation pdd = pddCore.getPdDControlStation(alias); // esiste per forza
  3362.                         url = url.replace(CostantiControlStation.PLACEHOLDER_INFORMAZIONI_PDD_IP_GESTIONE, pdd.getIpGestione());
  3363.                         url = url.replace(CostantiControlStation.PLACEHOLDER_INFORMAZIONI_PDD_PORTA_GESTIONE, pdd.getPortaGestione()+"");
  3364.                         url = url.replace(CostantiControlStation.PLACEHOLDER_INFORMAZIONI_PDD_PROTOCOLLO_GESTIONE, pdd.getProtocolloGestione());
  3365.                         url = url.replace(CostantiControlStation.PLACEHOLDER_INFORMAZIONI_PDD_IP_PUBBLICO, pdd.getIp());
  3366.                         url = url.replace(CostantiControlStation.PLACEHOLDER_INFORMAZIONI_PDD_PORTA_PUBBLICA, pdd.getPorta()+"");
  3367.                         url = url.replace(CostantiControlStation.PLACEHOLDER_INFORMAZIONI_PDD_PROTOCOLLO_PUBBLICO, pdd.getProtocollo());
  3368.                         this.configurazioneNodiRuntime.addForceResourceUrl(alias, url);
  3369.                     }
  3370.                    
  3371.                     this.jmxPdDConfigurazioneSistemaType.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaType(alias));
  3372.                     this.jmxPdDConfigurazioneSistemaNomeRisorsa.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeRisorsa(alias));
  3373.                     this.jmxPdDConfigurazioneSistemaNomeMetodoVersionePdD.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoVersionePdD(alias));
  3374.                     this.jmxPdDConfigurazioneSistemaNomeMetodoVersioneBaseDati.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoVersioneBaseDati(alias));
  3375.                     this.jmxPdDConfigurazioneSistemaNomeMetodoVersioneJava.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoVersioneJava(alias));
  3376.                     this.jmxPdDConfigurazioneSistemaNomeMetodoVendorJava.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoVendorJava(alias));
  3377.                     this.jmxPdDConfigurazioneSistemaNomeMetodoTipoDatabase.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoTipoDatabase(alias));
  3378.                     this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniDatabase.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniDatabase(alias));
  3379.                     this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniSSL.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniSSL(alias));
  3380.                     this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteSSL.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteSSL(alias));
  3381.                     this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCryptographyKeyLength.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniCryptographyKeyLength(alias));
  3382.                     this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCharset.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniCharset(alias));
  3383.                     this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniInternazionalizzazione.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniInternazionalizzazione(alias));
  3384.                     this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteInternazionalizzazione.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteInternazionalizzazione(alias));
  3385.                     this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniTimeZone.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniTimeZone(alias));
  3386.                     this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteTimeZone.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteTimeZone(alias));
  3387.                     this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaJavaNetworking.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaJavaNetworking(alias));
  3388.                     this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteProprietaJavaNetworking.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteProprietaJavaNetworking(alias));
  3389.                     this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaJavaAltro.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaJavaAltro(alias));
  3390.                     this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaSistema.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaSistema(alias));
  3391.                     this.jmxPdDConfigurazioneSistemaNomeMetodoMessageFactory.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoMessageFactory(alias));
  3392.                     this.jmxPdDConfigurazioneSistemaNomeMetodoDirectoryConfigurazione.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoDirectoryConfigurazione(alias));
  3393.                     this.jmxPdDConfigurazioneSistemaNomeMetodoPluginProtocols.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoPluginProtocols(alias));
  3394.                     this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniInstallazione.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniInstallazione(alias));
  3395.                     this.jmxPdDConfigurazioneSistemaNomeMetodoGetFileTrace.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoGetFileTrace(alias));
  3396.                     this.jmxPdDConfigurazioneSistemaNomeMetodoUpdateFileTrace.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoUpdateFileTrace(alias));
  3397.                     this.jmxPdDConfigurazioneSistemaNomeMetodoUnwrapKey.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoUnwrapKey(alias));
  3398.                     this.jmxPdDConfigurazioneSistemaNomeMetodoWrapKey.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoWrapKey(alias));
  3399.                     this.jmxPdDConfigurazioneSistemaNomeRisorsaMonitoraggio.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeRisorsaMonitoraggio(alias));
  3400.                     this.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniDB.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoConnessioniDB(alias));
  3401.                     this.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniJMS.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoConnessioniJMS(alias));
  3402.                     this.jmxPdDConfigurazioneSistemaNomeMetodoIdTransazioniAttive.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoIdTransazioniAttive(alias));
  3403.                     this.jmxPdDConfigurazioneSistemaNomeMetodoIdProtocolloTransazioniAttive.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoIdProtocolloTransazioniAttive(alias));
  3404.                     this.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniPD.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoConnessioniPD(alias));
  3405.                     this.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniPA.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoConnessioniPA(alias));
  3406.                     this.jmxPdDConfigurazioneSistemaNomeRisorsaConfigurazionePdD.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeRisorsaConfigurazionePdD(alias));
  3407.                     this.jmxPdDConfigurazioneSistemaNomeAttributoSeveritaDiagnostici.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoSeveritaDiagnostici(alias));
  3408.                     this.jmxPdDConfigurazioneSistemaNomeAttributoSeveritaDiagnosticiLog4j.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoSeveritaDiagnosticiLog4j(alias));
  3409.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTracciamento.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTracciamento(alias));
  3410.                     this.jmxPdDConfigurazioneSistemaNomeAttributoDumpPD.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoDumpPD(alias));
  3411.                     this.jmxPdDConfigurazioneSistemaNomeAttributoDumpPA.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoDumpPA(alias));
  3412.                     this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jDiagnostica.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoLog4jDiagnostica(alias));
  3413.                     this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jOpenspcoop.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoLog4jOpenspcoop(alias));
  3414.                     this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jIntegrationManager.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoLog4jIntegrationManager(alias));
  3415.                     this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jTracciamento.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoLog4jTracciamento(alias));
  3416.                     this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jDump.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoLog4jDump(alias));
  3417.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorStatusCode.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorStatusCode(alias));
  3418.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorInstanceId.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorInstanceId(alias));
  3419.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeBadResponse.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeBadResponse(alias));
  3420.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalResponseError.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalResponseError(alias));
  3421.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalRequestError.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalRequestError(alias));
  3422.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalError.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalError(alias));
  3423.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorDetails.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorDetails(alias));
  3424.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorUseStatusCodeAsFaultCode.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorUseStatusCodeAsFaultCode(alias));
  3425.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorGenerateHttpHeaderGovWayCode.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorGenerateHttpHeaderGovWayCode(alias));
  3426.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerConsegnaContenutiApplicativi.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerConsegnaContenutiApplicativi(alias));
  3427.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerEventi.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerEventi(alias));
  3428.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerFileSystemRecovery.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerFileSystemRecovery(alias));
  3429.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreBusteOnewayNonRiscontrate.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreBusteOnewayNonRiscontrate(alias));
  3430.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreBusteAsincroneNonRiscontrate.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreBusteAsincroneNonRiscontrate(alias));
  3431.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiEliminati.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiEliminati(alias));
  3432.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiScaduti.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiScaduti(alias));
  3433.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiNonGestiti.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiNonGestiti(alias));
  3434.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaCorrelazioneApplicativa.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaCorrelazioneApplicativa(alias));
  3435.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiVerificaConnessioniAttive.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiVerificaConnessioniAttive(alias));
  3436.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestorePuliziaMessaggiAnomali.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestorePuliziaMessaggiAnomali(alias));
  3437.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreRepositoryBuste.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreRepositoryBuste(alias));
  3438.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerMonitoraggioRisorseThread.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerMonitoraggioRisorseThread(alias));
  3439.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerRepositoryStatefulThread.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerRepositoryStatefulThread(alias));
  3440.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheOrarie.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheOrarie(alias));
  3441.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheGiornaliere.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheGiornaliere(alias));
  3442.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheSettimanali.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheSettimanali(alias));
  3443.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheMensili.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheMensili(alias));
  3444.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerPdndTracciamentoGenerazione.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerPdndTracciamentoGenerazione(alias));
  3445.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerPdndTracciamentoPubblicazione.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerPdndTracciamentoPubblicazione(alias));
  3446.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheMensili.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheMensili(alias));
  3447.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreChiaviPDND.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreChiaviPDND(alias));
  3448.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreCacheChiaviPDND.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreCacheChiaviPDND(alias));
  3449.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreOperazioniRemote.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreOperazioniRemote(alias));
  3450.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerSvecchiamentoOperazioniRemote.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerSvecchiamentoOperazioniRemote(alias));
  3451.                     this.jmxPdDConfigurazioneSistemaNomeAttributoTimerThresholdThread.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoTimerThresholdThread(alias));  
  3452.                     this.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreById.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreById(alias));
  3453.                     this.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreById.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreById(alias));
  3454.                     this.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyValidazione.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyValidazione(alias));
  3455.                     this.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyNegoziazione.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyNegoziazione(alias));
  3456.                     this.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreAttributeAuthority.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreAttributeAuthority(alias));
  3457.                     this.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyValidazione.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyValidazione(alias));
  3458.                     this.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyNegoziazione.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyNegoziazione(alias));
  3459.                     this.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreAttributeAuthority.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreAttributeAuthority(alias));
  3460.                     this.jmxPdDConfigurazioneSistemaNomeMetodoEnablePortaDelegata.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoEnablePortaDelegata(alias));
  3461.                     this.jmxPdDConfigurazioneSistemaNomeMetodoDisablePortaDelegata.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoDisablePortaDelegata(alias));
  3462.                     this.jmxPdDConfigurazioneSistemaNomeMetodoEnablePortaApplicativa.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoEnablePortaApplicativa(alias));
  3463.                     this.jmxPdDConfigurazioneSistemaNomeMetodoDisablePortaApplicativa.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoDisablePortaApplicativa(alias));
  3464.                     this.jmxPdDConfigurazioneSistemaNomeMetodoEnableConnettoreMultiplo.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoEnableConnettoreMultiplo(alias));
  3465.                     this.jmxPdDConfigurazioneSistemaNomeMetodoDisableConnettoreMultiplo.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoDisableConnettoreMultiplo(alias));
  3466.                     this.jmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiplo.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiplo(alias));
  3467.                     this.jmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiplo.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiplo(alias));
  3468.                     this.jmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiploRuntimeRepository.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiploRuntimeRepository(alias));
  3469.                     this.jmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiploRuntimeRepository.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiploRuntimeRepository(alias));
  3470.                     this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAccordoCooperazione.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAccordoCooperazione(alias));
  3471.                     this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApi.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApi(alias));
  3472.                     this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheErogazione.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheErogazione(alias));
  3473.                     this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheFruizione.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheFruizione(alias));
  3474.                     this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheSoggetto.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheSoggetto(alias));
  3475.                     this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApplicativo.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApplicativo(alias));
  3476.                     this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheRuolo.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheRuolo(alias));
  3477.                     this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheScope.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheScope(alias));
  3478.                     this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyValidazione.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyValidazione(alias));
  3479.                     this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyNegoziazione.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyNegoziazione(alias));
  3480.                     this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAttributeAuthority.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAttributeAuthority(alias));
  3481.                     this.jmxPdDConfigurazioneSistemaNomeRisorsaAccessoRegistroServizi.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeRisorsaAccessoRegistroServizi(alias));
  3482.                     this.jmxPdDConfigurazioneSistemaNomeRisorsaStatoServiziPdD.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeRisorsaStatoServiziPdD(alias));
  3483.                     this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegata.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegata(alias));
  3484.                     this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataAbilitazioniPuntuali.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataAbilitazioniPuntuali(alias));
  3485.                     this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataDisabilitazioniPuntuali.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataDisabilitazioniPuntuali(alias));
  3486.                     this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativa.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativa(alias));
  3487.                     this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaAbilitazioniPuntuali.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaAbilitazioniPuntuali(alias));
  3488.                     this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaDisabilitazioniPuntuali.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaDisabilitazioniPuntuali(alias));
  3489.                     this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioIntegrationManager.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioIntegrationManager(alias));
  3490.                     this.jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaDelegata.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaDelegata(alias));
  3491.                     this.jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaDelegata.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaDelegata(alias));
  3492.                     this.jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaApplicativa.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaApplicativa(alias));
  3493.                     this.jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaApplicativa.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaApplicativa(alias));
  3494.                     this.jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioIntegrationManager.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioIntegrationManager(alias));
  3495.                     this.jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioIntegrationManager.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioIntegrationManager(alias));
  3496.                     this.jmxPdDConfigurazioneSistemaNomeRisorsaDatasourceGW.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeRisorsaDatasourceGW(alias));
  3497.                     this.jmxPdDConfigurazioneSistemaNomeAttributoNumeroDatasourceGW.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeAttributoNumeroDatasourceGW(alias));
  3498.                     this.jmxPdDConfigurazioneSistemaNomeMetodoGetDatasourcesGW.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoGetDatasourcesGW(alias));
  3499.                     this.jmxPdDConfigurazioneSistemaNomeMetodoGetUsedConnectionsDatasourcesGW.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoGetUsedConnectionsDatasourcesGW(alias));
  3500.                     this.jmxPdDConfigurazioneSistemaNomeMetodoGetInformazioniDatabaseDatasourcesGW.put(alias,consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoGetInformazioniDatabaseDatasourcesGW(alias));
  3501.                     this.jmxPdDConfigurazioneSistemaNomeRisorsaConsegnaContenutiApplicativi.put(alias, consoleProperties.getJmxPdDConfigurazioneSistemaNomeRisorsaGestioneConsegnaApplicativi(alias));
  3502.                     this.jmxPdDConfigurazioneSistemaNomeMetodoGetThreadPoolStatus.put(alias, consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoGetThreadPoolStatus(alias));
  3503.                     this.jmxPdDConfigurazioneSistemaNomeMetodoGetQueueConfig.put(alias, consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoGetQueueConfig(alias));
  3504.                     this.jmxPdDConfigurazioneSistemaNomeMetodoGetApplicativiPrioritari.put(alias, consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoGetApplicativiPrioritari(alias));
  3505.                     this.jmxPdDConfigurazioneSistemaNomeMetodoGetConnettoriPrioritari.put(alias, consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoGetConnettoriPrioritari(alias));
  3506.                     this.jmxPdDConfigurazioneSistemaNomeMetodoUpdateConnettoriPrioritari.put(alias, consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoUpdateConnettoriPrioritari(alias));
  3507.                     this.jmxPdDConfigurazioneSistemaNomeMetodoResetConnettoriPrioritari.put(alias, consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoResetConnettoriPrioritari(alias));
  3508.                     this.jmxPdDConfigurazioneSistemaNomeRisorsaSystemPropertiesPdD.put(alias, consoleProperties.getJmxPdDConfigurazioneSistemaNomeRisorsaSystemPropertiesPdD(alias));
  3509.                     this.jmxPdDConfigurazioneSistemaNomeMetodoRefreshPersistentConfiguration.put(alias, consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoRefreshPersistentConfiguration(alias));
  3510.                     this.jmxPdDConfigurazioneSistemaNomeRisorsaDatiRichieste.put(alias, consoleProperties.getJmxPdDConfigurazioneSistemaNomeRisorsaDatiRichieste(alias));
  3511.                     this.jmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingGlobalConfigCache.put(alias, consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingGlobalConfigCache(alias));
  3512.                     this.jmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingAPIConfigCache.put(alias, consoleProperties.getJmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingAPIConfigCache(alias));
  3513.                     this.jmxPdDCaches.put(alias, consoleProperties.getJmxPdDCaches(alias));
  3514.                     this.jmxPdDCachesPrefill.put(alias, consoleProperties.getJmxPdDCachesPrefill(alias));
  3515.                     this.jmxPdDCacheType.put(alias, consoleProperties.getJmxPdDCacheType(alias));
  3516.                     this.jmxPdDCacheNomeAttributoCacheAbilitata.put(alias, consoleProperties.getJmxPdDCacheNomeAttributoCacheAbilitata(alias));
  3517.                     this.jmxPdDCacheNomeMetodoStatoCache.put(alias, consoleProperties.getJmxPdDCacheNomeMetodoStatoCache(alias));
  3518.                     this.jmxPdDCacheNomeMetodoResetCache.put(alias, consoleProperties.getJmxPdDCacheNomeMetodoResetCache(alias));
  3519.                     if(!this.jmxPdDCachesPrefill.get(alias).isEmpty()){
  3520.                         this.jmxPdDCacheNomeMetodoPrefillCache.put(alias, consoleProperties.getJmxPdDCacheNomeMetodoPrefillCache(alias));
  3521.                     }
  3522.                 }
  3523.             }
  3524.            
  3525.             this.jmxPdDGruppiAliases = consoleProperties.getJmxPdDGruppiAliases();
  3526.            
  3527.         } catch (java.lang.Exception e) {
  3528.             ControlStationCore.logError("[ControlStationCore::initCoreJmxResources] Impossibile leggere i dati dal file console.properties:" + e.toString(),e);
  3529.             throw new ControlStationCoreException("[ControlStationCore::initCoreJmxResources] Impossibile leggere i dati dal file console.properties:" + e.toString(),e);
  3530.         }
  3531.     }
  3532.    

  3533.     /**
  3534.      * Inizializza il driver di tracciamento.
  3535.      *
  3536.      * @throws DriverControlStationException
  3537.      */
  3538.     private synchronized void initDriverTracciamento(String nomeDs, boolean forceChange) throws DriverControlStationException {
  3539.         if (this.driverTracciamento == null || forceChange) {
  3540.             try {
  3541.                 if (nomeDs == null || nomeDs.equals("") || nomeDs.equals(CostantiControlStation.DEFAULT_VALUE_NON_SELEZIONATO)) {
  3542.                     if(this.tracceSameDBWebUI){
  3543.                         this.driverTracciamento = new DriverTracciamento(ControlStationCore.dbM.getDataSourceName(),this.tipoDB,ControlStationCore.dbM.getDataSourceContext(),ControlStationCore.log);
  3544.                     }
  3545.                     else{
  3546.                         this.driverTracciamento = new DriverTracciamento(this.tracceDatasource, this.tracceTipoDatabase, this.tracceCtxDatasource,ControlStationCore.log);
  3547.                     }
  3548.                 } else {

  3549.                     Configurazione newConfigurazione = this.getConfigurazioneGenerale();
  3550.                     Tracciamento t = newConfigurazione.getTracciamento();
  3551.                     List<OpenspcoopSorgenteDati> lista = t.getOpenspcoopSorgenteDatiList();
  3552.                     OpenspcoopSorgenteDati od = null;
  3553.                     for (int j = 0; j < t.sizeOpenspcoopSorgenteDatiList(); j++) {
  3554.                         od = lista.get(j);
  3555.                         if (od!=null && nomeDs!=null && nomeDs.equals(od.getNome())) {
  3556.                             break;
  3557.                         }
  3558.                     }
  3559.                    
  3560.                     if(od==null) {
  3561.                         throw new Exception("Sorgente Dati non trovata");
  3562.                     }

  3563.                     //proprieta
  3564.                     Properties prop = new Properties();

  3565.                     if(od.getPropertyList()!=null && od.sizePropertyList()>0){
  3566.                         for (Property p : od.getPropertyList()) {
  3567.                             prop.put(p.getNome(), p.getValore());
  3568.                         }
  3569.                     }

  3570.                     this.driverTracciamento = new DriverTracciamento(
  3571.                             od.getNomeJndi(),
  3572.                             od.getTipoDatabase(),
  3573.                             prop,
  3574.                             ControlStationCore.log);
  3575.                 }
  3576.             } catch (java.lang.Exception e) {
  3577.                 ControlStationCore.logError("[pdd] Inizializzazione DriverTracciamento non riuscita : " + e.getMessage(),e);
  3578.                 throw new DriverControlStationException("[pdd] Inizializzazione DriverTracciamento non riuscita : " + e.getMessage(),e);
  3579.             }

  3580.         }

  3581.     }

  3582.     /**
  3583.      * Inizializza il driver della diagnostica.
  3584.      *
  3585.      * @throws DriverControlStationException
  3586.      */
  3587.     private synchronized void initDriverMSGDiagnostici(String nomeDs, boolean forceChange) throws DriverControlStationException {
  3588.         if (this.driverMSGDiagnostici == null || forceChange) {
  3589.             try {
  3590.                 if (nomeDs == null || nomeDs.equals("") || nomeDs.equals(CostantiControlStation.DEFAULT_VALUE_NON_SELEZIONATO)) {
  3591.                     if(this.msgDiagnosticiSameDBWebUI){
  3592.                         this.driverMSGDiagnostici = new DriverMsgDiagnostici(ControlStationCore.dbM.getDataSourceName(),this.tipoDB,ControlStationCore.dbM.getDataSourceContext(),ControlStationCore.log);
  3593.                     }
  3594.                     else{
  3595.                         this.driverMSGDiagnostici = new DriverMsgDiagnostici(this.msgDiagnosticiDatasource, this.msgDiagnosticiTipoDatabase, this.msgDiagnosticiCtxDatasource,ControlStationCore.log);
  3596.                     }
  3597.                 } else {

  3598.                     Configurazione newConfigurazione = this.getConfigurazioneGenerale();
  3599.                     MessaggiDiagnostici md = newConfigurazione.getMessaggiDiagnostici();
  3600.                     List<OpenspcoopSorgenteDati> lista = md.getOpenspcoopSorgenteDatiList();
  3601.                     OpenspcoopSorgenteDati od = null;
  3602.                     for (int j = 0; j < md.sizeOpenspcoopSorgenteDatiList(); j++) {
  3603.                         od = lista.get(j);
  3604.                         if (od!=null && nomeDs!=null && nomeDs.equals(od.getNome())) {
  3605.                             break;
  3606.                         }
  3607.                     }
  3608.                    
  3609.                     if(od==null) {
  3610.                         throw new DriverControlStationException("Sorgente Dati non trovata");
  3611.                     }
  3612.                    
  3613.                     //proprieta
  3614.                     Properties prop = new Properties();

  3615.                     if(od.getPropertyList()!=null && od.sizePropertyList()>0){
  3616.                         for (Property p : od.getPropertyList()) {
  3617.                             prop.put(p.getNome(), p.getValore());
  3618.                         }
  3619.                     }

  3620.                     this.driverMSGDiagnostici = new DriverMsgDiagnostici(
  3621.                             od.getNomeJndi(),
  3622.                             od.getTipoDatabase(),
  3623.                             prop,
  3624.                             ControlStationCore.log);
  3625.                 }
  3626.             } catch (java.lang.Exception e) {
  3627.                 ControlStationCore.logError("[pdd] Inizializzazione DriverMSGDiagnostici non riuscita : " + e.getMessage(),e);
  3628.                 throw new DriverControlStationException("[pdd] Inizializzazione DriverMSGDiagnostici non riuscita : " + e.getMessage(),e);
  3629.             }

  3630.         }

  3631.     }






  3632.     /* ----- SMISTAMENTO OPERAZIONE ------ */

  3633.     /**
  3634.      * Effettua transazionalmente le operazioni utilizzando il driver Ogni
  3635.      * oggetto passato ha un corrispondente tipo di operazione che deve essere
  3636.      * effettuato su di esso in modo tale da poter effettuare diverse operazioni
  3637.      * su diversi oggetti in maniera transazionale
  3638.      *
  3639.      * @param <Type>
  3640.      * @param operationType
  3641.      * @param superUser
  3642.      * @param oggetti
  3643.      * @throws DriverConfigurazioneException
  3644.      * @throws DriverControlStationException
  3645.      * @throws DriverRegistroServiziException
  3646.      * @throws ControlStationCoreException
  3647.      */
  3648.     private void performOperation(int[] operationTypes, String superUser, boolean smista, Object... oggetti) throws DriverConfigurazioneNotFound, DriverRegistroServiziNotFound, DriverConfigurazioneException, DriverControlStationException, DriverRegistroServiziException, ControlStationCoreException {
  3649.         Connection con = null;
  3650.         DriverControlStationDB driver = null;
  3651.         boolean doSetDati = false;
  3652.         List<OperazioneDaSmistare> operazioneDaSmistareList = null;
  3653.         OperazioneDaSmistare operazioneDaSmistare = null;

  3654.         try {

  3655.             operazioneDaSmistareList = new ArrayList<>();
  3656.             con = ControlStationCore.dbM.getConnection();
  3657.             if(con==null) {
  3658.                 throw new ControlStationCoreException("Connection is null");
  3659.             }

  3660.             // le operazioni da eseguire devono essere transazionali quindi
  3661.             // disabilito l'autocommit
  3662.             // e lo riabilito solo dopo aver terminato le operazioni
  3663.             con.setAutoCommit(false);
  3664.             PdDControlStation pddGestore = null;
  3665.             int pddGestoreTipoOperazione = -1;

  3666.             // creo il driver
  3667.             driver = new DriverControlStationDB(con, null, this.tipoDB);
  3668.            
  3669.             // BYOK
  3670.             activeBYOK(driver, true, false);
  3671.            
  3672.             SoggettiCore soggettiCore = new SoggettiCore(this);

  3673.             for (int i = 0; i < oggetti.length; i++) {
  3674.                 // prendo il tipo di operazione da effettuare su questo oggetto
  3675.                 int operationType = operationTypes[i];
  3676.                 Object oggetto = oggetti[i];
  3677.                
  3678.                 IExtendedBean extendedBean = null;
  3679.                 IExtendedCoreServlet extendedServlet = null;
  3680.                 if(oggetto instanceof WrapperExtendedBean){
  3681.                     WrapperExtendedBean w = (WrapperExtendedBean) oggetto;
  3682.                     if(w.isManageOriginalBean()){
  3683.                         oggetto = w.getOriginalBean();  
  3684.                     }
  3685.                     extendedBean = w.getExtendedBean();
  3686.                     extendedServlet = w.getExtendedServlet();
  3687.                 }
  3688.                
  3689.                
  3690.                 switch (operationType) {
  3691.                 case CostantiControlStation.PERFORM_OPERATION_CREATE:

  3692.                     // Performing CREATE operations
  3693.                     /* Eseguo l'operazione sull'oggetto */
  3694.                     /**
  3695.                      * Operazioni su ctrlstat
  3696.                      */
  3697.                     if (oggetto instanceof PdDControlStation) {
  3698.                         PdDControlStation pdd = (PdDControlStation) oggetto;
  3699.                         driver.createPdDControlStation(pdd);

  3700.                         // Una volta creata la PdD avvio il thread di
  3701.                         // gestione (a meno che non sia esterna)
  3702.                         pddGestore = pdd;
  3703.                         pddGestoreTipoOperazione = operationType;

  3704.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3705.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3706.                         operazioneDaSmistare.setIDTable(pdd.getId());
  3707.                         operazioneDaSmistare.setSuperuser(superUser);
  3708.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pdd);
  3709.                         operazioneDaSmistare.addParameter(OperationsParameter.PORTA_DOMINIO, pdd.getNome());

  3710.                         doSetDati = true;
  3711.                     }

  3712.                     if (oggetto instanceof MappingFruizionePortaDelegata) {
  3713.                         MappingFruizionePortaDelegata mapping = (MappingFruizionePortaDelegata) oggetto;
  3714.                         driver.createMappingFruizionePortaDelegata(mapping);
  3715.                        
  3716.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3717.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3718.                         operazioneDaSmistare.setIDTable(Integer.parseInt("" + mapping.getTableId()));
  3719.                         operazioneDaSmistare.setSuperuser(superUser);
  3720.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.mappingFruizionePD);

  3721.                         doSetDati = false;

  3722.                     }
  3723.                    
  3724.                     if (oggetto instanceof MappingErogazionePortaApplicativa) {
  3725.                         MappingErogazionePortaApplicativa mapping = (MappingErogazionePortaApplicativa) oggetto;
  3726.                         driver.createMappingErogazionePortaApplicativa(mapping);
  3727.                        
  3728.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3729.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3730.                         operazioneDaSmistare.setIDTable(Integer.parseInt("" + mapping.getTableId()));
  3731.                         operazioneDaSmistare.setSuperuser(superUser);
  3732.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.mappingErogazionePA);

  3733.                         doSetDati = false;

  3734.                     }

  3735.                     /***********************************************************
  3736.                      * Caso Speciale dei Soggetti *
  3737.                      **********************************************************/

  3738.                     // soggetto config/reg
  3739.                     if (oggetto instanceof SoggettoCtrlStat) {
  3740.                         SoggettoCtrlStat soggetto = (SoggettoCtrlStat) oggetto;
  3741.                         Soggetto sogConf = soggetto.getSoggettoConf();
  3742.                         if(this.registroServiziLocale){
  3743.                             driver.getDriverRegistroServiziDB().createSoggetto(soggetto.getSoggettoReg());

  3744.                             sogConf.setId(soggetto.getSoggettoReg().getId());
  3745.                             IDSoggetto oldIDSoggettoForUpdate = new IDSoggetto(sogConf.getTipo(), sogConf.getNome());
  3746.                             sogConf.setOldIDSoggettoForUpdate(oldIDSoggettoForUpdate);
  3747.                             driver.getDriverConfigurazioneDB().updateSoggetto(sogConf);
  3748.                         }
  3749.                         else{
  3750.                             driver.getDriverConfigurazioneDB().createSoggetto(sogConf);
  3751.                         }

  3752.                         // Chiedo la setDati
  3753.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3754.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3755.                         operazioneDaSmistare.setIDTable(sogConf.getId());
  3756.                         operazioneDaSmistare.setSuperuser(superUser);
  3757.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.soggetto);
  3758.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, soggetto.getTipo());
  3759.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, soggetto.getNome());

  3760.                         if(soggetto.getSoggettoReg()!=null){
  3761.                             operazioneDaSmistare.setPdd(soggetto.getSoggettoReg().getPortaDominio());
  3762.                         }

  3763.                         doSetDati = true;

  3764.                     }
  3765.                    
  3766.                     // soggetto config
  3767.                     if (oggetto instanceof org.openspcoop2.core.config.Soggetto) {
  3768.                        
  3769.                         org.openspcoop2.core.config.Soggetto sogConf = (org.openspcoop2.core.config.Soggetto) oggetto;
  3770.                         // anche se e' stato chiesta una create. Puo' darsi che serva una update essendomi arrivata una informazione puntuale su di un tipo di soggetto
  3771.                         IDSoggetto idSoggetto = new IDSoggetto(sogConf.getTipo(),sogConf.getNome());
  3772.                         if(driver.getDriverConfigurazioneDB().existsSoggetto(idSoggetto)){
  3773.                             IDSoggetto oldIDSoggettoForUpdate = new IDSoggetto(sogConf.getTipo(), sogConf.getNome());
  3774.                             sogConf.setOldIDSoggettoForUpdate(oldIDSoggettoForUpdate);
  3775.                             driver.getDriverConfigurazioneDB().updateSoggetto(sogConf);
  3776.                         }
  3777.                         else{
  3778.                             // lancio una eccezione.
  3779.                             // Anche nel caso di gestione singola degli oggetti deve comunque essere prima creato il soggetto sul registro.
  3780.                             throw new ControlStationCoreException("Impossibile gestire la richiesta di creazione di un soggetto ("+idSoggetto+") di tipo [org.openspcoop2.core.config.Soggetto] se il soggetto non esiste sulla base dati. La creazione e' permessa solo per il tipo org.openspcoop2.core.registry.Soggetto, mentre il config puo' essere chiamato per aggiornarne delle informazioni");
  3781.                         }
  3782.                        

  3783.                         // Chiedo la setDati
  3784.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3785.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3786.                         operazioneDaSmistare.setIDTable(sogConf.getId());
  3787.                         operazioneDaSmistare.setSuperuser(superUser);
  3788.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.soggetto);
  3789.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, sogConf.getTipo());
  3790.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, sogConf.getNome());

  3791.                         doSetDati = true;

  3792.                     }
  3793.                    
  3794.                     // soggetto reg
  3795.                     if (oggetto instanceof org.openspcoop2.core.registry.Soggetto) {
  3796.                        
  3797.                         org.openspcoop2.core.registry.Soggetto sogReg = (org.openspcoop2.core.registry.Soggetto) oggetto;
  3798.                         if(this.registroServiziLocale){
  3799.                             driver.getDriverRegistroServiziDB().createSoggetto(sogReg);
  3800.                         }

  3801.                         // Chiedo la setDati
  3802.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3803.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3804.                         operazioneDaSmistare.setIDTable(sogReg.getId());
  3805.                         operazioneDaSmistare.setSuperuser(superUser);
  3806.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.soggetto);
  3807.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, sogReg.getTipo());
  3808.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, sogReg.getNome());

  3809.                         operazioneDaSmistare.setPdd(sogReg.getPortaDominio());
  3810.                        
  3811.                         doSetDati = true;

  3812.                     }

  3813.                    
  3814.                     /***********************************************************
  3815.                      * Operazioni su ConfigurazioneDB *
  3816.                      **********************************************************/
  3817.                    
  3818.                     // ServizioApplicativo
  3819.                     if (oggetto instanceof ServizioApplicativo) {
  3820.                         ServizioApplicativo sa = (ServizioApplicativo) oggetto;
  3821.                        
  3822.                         driver.getDriverConfigurazioneDB().createServizioApplicativo(sa);
  3823.                         if (sa.getIdSoggetto() == null || sa.getIdSoggetto() < 0) {
  3824.                             sa.setIdSoggetto(DBUtils.getIdSoggetto(sa.getNomeSoggettoProprietario(), sa.getTipoSoggettoProprietario(), con, this.tipoDB, CostantiDB.SOGGETTI));
  3825.                         }

  3826.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3827.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3828.                         operazioneDaSmistare.setIDTable(sa.getId());
  3829.                         operazioneDaSmistare.setSuperuser(superUser);
  3830.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.servizioApplicativo);
  3831.                         if(this.isRegistroServiziLocale()){
  3832.                             org.openspcoop2.core.registry.Soggetto sog = driver.getDriverRegistroServiziDB().getSoggetto(sa.getIdSoggetto());
  3833.                             operazioneDaSmistare.setPdd(sog.getPortaDominio());
  3834.                         }
  3835.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SERVIZIO_APPLICATIVO, sa.getNome());
  3836.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, sa.getTipoSoggettoProprietario());
  3837.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, sa.getNomeSoggettoProprietario());

  3838.                         doSetDati = true;
  3839.                     }
  3840.                     // PortaDelegata
  3841.                     if (oggetto instanceof PortaDelegata) {
  3842.                         PortaDelegata pd = (PortaDelegata) oggetto;
  3843.                         if (pd.getIdSoggetto() == null || pd.getIdSoggetto() < 0) {
  3844.                             pd.setIdSoggetto(DBUtils.getIdSoggetto(pd.getNomeSoggettoProprietario(), pd.getTipoSoggettoProprietario(), con, this.tipoDB, CostantiDB.SOGGETTI));
  3845.                         }
  3846.                         driver.getDriverConfigurazioneDB().createPortaDelegata(pd);
  3847.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3848.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3849.                         operazioneDaSmistare.setIDTable(pd.getId());
  3850.                         operazioneDaSmistare.setSuperuser(superUser);
  3851.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pd);
  3852.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_PD, pd.getNome());
  3853.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, pd.getTipoSoggettoProprietario());
  3854.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, pd.getNomeSoggettoProprietario());
  3855.                         if(this.isRegistroServiziLocale()){
  3856.                             org.openspcoop2.core.registry.Soggetto sogg = driver.getDriverRegistroServiziDB().getSoggetto(pd.getIdSoggetto());
  3857.                             String server = sogg.getPortaDominio();
  3858.                             operazioneDaSmistare.setPdd(server);
  3859.                         }
  3860.                         doSetDati = true;
  3861.                     }
  3862.                     // PortaApplicativa
  3863.                     if (oggetto instanceof PortaApplicativa) {
  3864.                         PortaApplicativa pa = (PortaApplicativa) oggetto;
  3865.                         if (pa.getIdSoggetto() == null || pa.getIdSoggetto() < 0) {
  3866.                             pa.setIdSoggetto(DBUtils.getIdSoggetto(pa.getNomeSoggettoProprietario(), pa.getTipoSoggettoProprietario(), con, this.tipoDB, CostantiDB.SOGGETTI));
  3867.                         }

  3868.                         if(this.isRegistroServiziLocale()){
  3869.                             // fix id_servizio = -1
  3870.                             PortaApplicativaServizio paSE = pa.getServizio();
  3871.                             // controllo solo se id < 0
  3872.                             if (paSE != null && paSE.getId() <= 0) {
  3873.                                 String nomeSoggetto = pa.getNomeSoggettoProprietario();
  3874.                                 String tipoSoggetto = pa.getTipoSoggettoProprietario();
  3875.                                 String nomeServizio = paSE.getNome();
  3876.                                 String tipoServizio = paSE.getTipo();
  3877.                                 Integer versioneServizio = paSE.getVersione();

  3878.                                 // controllo presenza soggetto virtuale
  3879.                                 // se presente soggetto virtuale override di
  3880.                                 // tipoSoggetto e nomeSoggetto
  3881.                                 PortaApplicativaSoggettoVirtuale paSoggVirt = pa.getSoggettoVirtuale();
  3882.                                 if (paSoggVirt != null) {
  3883.                                     long idSoggettoVirt = paSoggVirt != null ? paSoggVirt.getId() : -1;

  3884.                                     if (idSoggettoVirt <= 0) {
  3885.                                         nomeSoggetto = paSoggVirt.getNome();
  3886.                                         tipoSoggetto = paSoggVirt.getTipo();
  3887.                                     } else {
  3888.                                         org.openspcoop2.core.registry.Soggetto soggVirt = driver.getDriverRegistroServiziDB().getSoggetto(idSoggettoVirt);
  3889.                                         nomeSoggetto = soggVirt.getNome();
  3890.                                         tipoSoggetto = soggVirt.getTipo();
  3891.                                     }
  3892.                                 }

  3893.                                 // recupero informazioni su servizio
  3894.                                 long idServizio = DBUtils.getIdServizio(nomeServizio, tipoServizio, versioneServizio, nomeSoggetto, tipoSoggetto, con, this.tipoDB, CostantiDB.SOGGETTI);

  3895.                                 paSE.setId(idServizio);
  3896.                                 pa.setServizio(paSE);
  3897.                             }
  3898.                         }

  3899.                         driver.getDriverConfigurazioneDB().createPortaApplicativa(pa);
  3900.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3901.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3902.                         operazioneDaSmistare.setIDTable(pa.getId());
  3903.                         operazioneDaSmistare.setSuperuser(superUser);
  3904.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pa);
  3905.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_PA, pa.getNome());
  3906.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, pa.getTipoSoggettoProprietario());
  3907.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, pa.getNomeSoggettoProprietario());
  3908.                         if(this.isRegistroServiziLocale()){
  3909.                             org.openspcoop2.core.registry.Soggetto sogg = driver.getDriverRegistroServiziDB().getSoggetto(pa.getIdSoggetto());
  3910.                             String server = sogg.getPortaDominio();
  3911.                             operazioneDaSmistare.setPdd(server);
  3912.                         }
  3913.                         doSetDati = true;
  3914.                     }
  3915.                     // RoutingTable
  3916.                     if (oggetto instanceof RoutingTable) {
  3917.                         RoutingTable rt = (RoutingTable) oggetto;
  3918.                         driver.getDriverConfigurazioneDB().createRoutingTable(rt);
  3919.                         ControlStationCore.invalidateConfigurazioneGenerale();
  3920.                         doSetDati = false;
  3921.                     }
  3922.                     // GestioneErrore
  3923.                     if (oggetto instanceof GestioneErrore) {
  3924.                         GestioneErrore gestErrore = (GestioneErrore) oggetto;
  3925.                         driver.getDriverConfigurazioneDB().createGestioneErroreComponenteCooperazione(gestErrore);
  3926.                         ControlStationCore.invalidateConfigurazioneGenerale();

  3927.                         doSetDati = false;
  3928.                     }
  3929.                     // Configurazione
  3930.                     if (oggetto instanceof Configurazione) {
  3931.                         Configurazione conf = (Configurazione) oggetto;
  3932.                         driver.getDriverConfigurazioneDB().createConfigurazione(conf);
  3933.                         ControlStationCore.invalidateConfigurazioneGenerale();

  3934.                         doSetDati = false;
  3935.                     }
  3936.                     // ConfigurazioneAccessoRegistro
  3937.                     if (oggetto instanceof AccessoRegistro) {
  3938.                         AccessoRegistro cfgAccessoRegistro = (AccessoRegistro) oggetto;
  3939.                         driver.getDriverConfigurazioneDB().createAccessoRegistro(cfgAccessoRegistro);
  3940.                         ControlStationCore.invalidateConfigurazioneGenerale();

  3941.                         doSetDati = false;
  3942.                     }
  3943.                     // ConfigurazioneAccessoRegistroRegistro
  3944.                     if (oggetto instanceof AccessoRegistroRegistro) {
  3945.                         AccessoRegistroRegistro carr = (AccessoRegistroRegistro) oggetto;
  3946.                         driver.getDriverConfigurazioneDB().createAccessoRegistro(carr);
  3947.                         ControlStationCore.invalidateConfigurazioneGenerale();

  3948.                         doSetDati = false;
  3949.                     }
  3950.                     // ConfigurazioneAccessoConfigurazione
  3951.                     if (oggetto instanceof AccessoConfigurazione) {
  3952.                         AccessoConfigurazione accesso = (AccessoConfigurazione) oggetto;
  3953.                         driver.getDriverConfigurazioneDB().createAccessoConfigurazione(accesso);
  3954.                         ControlStationCore.invalidateConfigurazioneGenerale();

  3955.                         doSetDati = false;
  3956.                     }
  3957.                     // ConfigurazioneAccessoDatiAutorizzazione
  3958.                     if (oggetto instanceof AccessoDatiAutorizzazione) {
  3959.                         AccessoDatiAutorizzazione accesso = (AccessoDatiAutorizzazione) oggetto;
  3960.                         driver.getDriverConfigurazioneDB().createAccessoDatiAutorizzazione(accesso);
  3961.                         ControlStationCore.invalidateConfigurazioneGenerale();

  3962.                         doSetDati = false;
  3963.                     }
  3964.                     // ConfigurazioneSystemProperty
  3965.                     if (oggetto instanceof SystemProperties) {
  3966.                         SystemProperties sps = (SystemProperties) oggetto;
  3967.                         driver.getDriverConfigurazioneDB().createSystemPropertiesPdD(sps);
  3968.                         ControlStationCore.invalidateConfigurazioneGenerale();

  3969.                         doSetDati = false;
  3970.                     }
  3971.                     // ConfigurazioneUrlInvocazioneRegola
  3972.                     if (oggetto instanceof ConfigurazioneUrlInvocazioneRegola) {
  3973.                         ConfigurazioneUrlInvocazioneRegola regola = (ConfigurazioneUrlInvocazioneRegola) oggetto;
  3974.                         driver.getDriverConfigurazioneDB().createUrlInvocazioneRegola(regola);
  3975.                         ControlStationCore.invalidateConfigurazioneGenerale();
  3976.    
  3977.                         doSetDati = false;
  3978.                     }

  3979.                     /***********************************************************
  3980.                      * Operazioni su Registro *
  3981.                      **********************************************************/
  3982.                     // PortaDominio
  3983.                     if (oggetto instanceof PortaDominio && !(oggetto instanceof PdDControlStation)) {
  3984.                         PortaDominio pdd = (PortaDominio) oggetto;
  3985.                         driver.getDriverRegistroServiziDB().createPortaDominio(pdd);

  3986.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3987.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3988.                         operazioneDaSmistare.setIDTable(pdd.getId());
  3989.                         operazioneDaSmistare.setSuperuser(superUser);
  3990.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pdd);
  3991.                         operazioneDaSmistare.addParameter(OperationsParameter.PORTA_DOMINIO, pdd.getNome());

  3992.                         doSetDati = true;
  3993.                     }
  3994.                    
  3995.                     // Gruppo
  3996.                     if (oggetto instanceof Gruppo) {
  3997.                         Gruppo gruppo = (Gruppo) oggetto;
  3998.                         driver.getDriverRegistroServiziDB().createGruppo(gruppo);

  3999.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4000.                         operazioneDaSmistare.setOperazione(Operazione.add);
  4001.                         operazioneDaSmistare.setIDTable(gruppo.getId());
  4002.                         operazioneDaSmistare.setSuperuser(superUser);
  4003.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.gruppo);
  4004.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_GRUPPO, gruppo.getNome());

  4005.                         doSetDati = true;
  4006.                     }
  4007.                    
  4008.                     // Ruolo
  4009.                     if (oggetto instanceof Ruolo) {
  4010.                         Ruolo ruolo = (Ruolo) oggetto;
  4011.                         driver.getDriverRegistroServiziDB().createRuolo(ruolo);

  4012.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4013.                         operazioneDaSmistare.setOperazione(Operazione.add);
  4014.                         operazioneDaSmistare.setIDTable(ruolo.getId());
  4015.                         operazioneDaSmistare.setSuperuser(superUser);
  4016.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.ruolo);
  4017.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_RUOLO, ruolo.getNome());

  4018.                         doSetDati = true;
  4019.                     }
  4020.                    
  4021.                     // Scope
  4022.                     if (oggetto instanceof Scope) {
  4023.                         Scope scope = (Scope) oggetto;
  4024.                         driver.getDriverRegistroServiziDB().createScope(scope);

  4025.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4026.                         operazioneDaSmistare.setOperazione(Operazione.add);
  4027.                         operazioneDaSmistare.setIDTable(scope.getId());
  4028.                         operazioneDaSmistare.setSuperuser(superUser);
  4029.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.scope);
  4030.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SCOPE, scope.getNome());

  4031.                         doSetDati = true;
  4032.                     }

  4033.                     // AccordoServizio
  4034.                     if (oggetto instanceof AccordoServizioParteComune) {
  4035.                         AccordoServizioParteComune as = (AccordoServizioParteComune) oggetto;
  4036.                         driver.getDriverRegistroServiziDB().createAccordoServizioParteComune(as);

  4037.                         // voglio 2 operazioni in coda, 1 viene aggiunta
  4038.                         // alla
  4039.                         // fine dello switch e
  4040.                         // l altra viene aggiunta subito

  4041.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4042.                         operazioneDaSmistare.setOperazione(Operazione.add);
  4043.                         operazioneDaSmistare.setIDTable(as.getId());
  4044.                         operazioneDaSmistare.setSuperuser(superUser);
  4045.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordo);
  4046.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, as.getNome());
  4047.                         if(as.getVersione()!=null){
  4048.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, as.getVersione().intValue()+"");
  4049.                         }
  4050.                         if(as.getSoggettoReferente()!=null){
  4051.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, as.getSoggettoReferente().getTipo());
  4052.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, as.getSoggettoReferente().getNome());
  4053.                         }
  4054.                         // inserisco in lista l'operazione
  4055.                         operazioneDaSmistareList.add(operazioneDaSmistare);

  4056.                         // OPERAZIONI PER RepositoryAutorizzazioni
  4057.                         // preparo operazione da smistare
  4058.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4059.                         operazioneDaSmistare.setOperazione(Operazione.add);
  4060.                         operazioneDaSmistare.setIDTable(as.getId());
  4061.                         operazioneDaSmistare.setSuperuser(superUser);
  4062.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordoRuolo);
  4063.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, as.getNome());
  4064.                         if(as.getVersione()!=null){
  4065.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, as.getVersione().intValue()+"");
  4066.                         }
  4067.                         if(as.getSoggettoReferente()!=null){
  4068.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, as.getSoggettoReferente().getTipo());
  4069.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, as.getSoggettoReferente().getNome());
  4070.                         }
  4071.                         // inserisco in lista l'operazione
  4072.                         operazioneDaSmistareList.add(operazioneDaSmistare);

  4073.                         // preparo l'altra operazione da aggiungere
  4074.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4075.                         operazioneDaSmistare.setOperazione(Operazione.add);
  4076.                         operazioneDaSmistare.setIDTable(as.getId());
  4077.                         operazioneDaSmistare.setSuperuser(superUser);
  4078.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordoRuolo);
  4079.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, as.getNome() + "Correlato");
  4080.                         if(as.getVersione()!=null){
  4081.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, as.getVersione().intValue()+"");
  4082.                         }
  4083.                         if(as.getSoggettoReferente()!=null){
  4084.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, as.getSoggettoReferente().getTipo());
  4085.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, as.getSoggettoReferente().getNome());
  4086.                         }
  4087.                         doSetDati = true;

  4088.                     }

  4089.                     // AccordoCooperazione
  4090.                     if (oggetto instanceof AccordoCooperazione) {
  4091.                         AccordoCooperazione ac = (AccordoCooperazione) oggetto;
  4092.                         driver.getDriverRegistroServiziDB().createAccordoCooperazione(ac);

  4093.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4094.                         operazioneDaSmistare.setOperazione(Operazione.add);
  4095.                         operazioneDaSmistare.setIDTable(ac.getId());
  4096.                         operazioneDaSmistare.setSuperuser(superUser);
  4097.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordoCooperazione);
  4098.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, ac.getNome());
  4099.                         if(ac.getSoggettoReferente()!=null){
  4100.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, ac.getSoggettoReferente().getTipo());
  4101.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, ac.getSoggettoReferente().getNome());
  4102.                         }
  4103.                         if(ac.getVersione()!=null){
  4104.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, ac.getVersione().intValue()+"");
  4105.                         }

  4106.                         doSetDati = true;
  4107.                     }

  4108.                     // Servizio
  4109.                     // Servizio Correlato
  4110.                     if (oggetto instanceof AccordoServizioParteSpecifica) {
  4111.                         AccordoServizioParteSpecifica asps = (AccordoServizioParteSpecifica) oggetto;

  4112.                         driver.getDriverRegistroServiziDB().createAccordoServizioParteSpecifica(asps);

  4113.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4114.                         operazioneDaSmistare.setOperazione(Operazione.add);
  4115.                         operazioneDaSmistare.setIDTable(asps.getId());
  4116.                         operazioneDaSmistare.setSuperuser(superUser);
  4117.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.servizio);
  4118.                        
  4119.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, asps.getTipoSoggettoErogatore());
  4120.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, asps.getNomeSoggettoErogatore());
  4121.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SERVIZIO, asps.getTipo());
  4122.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SERVIZIO, asps.getNome());
  4123.                         if(asps.getVersione()!=null){
  4124.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, asps.getVersione().intValue()+"");
  4125.                         }

  4126.                         doSetDati = true;
  4127.                     }

  4128.                     /***********************************************************
  4129.                      * Operazioni su Users *
  4130.                      **********************************************************/
  4131.                     // User
  4132.                     if (oggetto instanceof User) {
  4133.                         User user = (User) oggetto;
  4134.                         driver.getDriverUsersDB().createUser(user);
  4135.                         doSetDati = false;
  4136.                     }

  4137.                     /***********************************************************
  4138.                      * Operazioni su Audit *
  4139.                      **********************************************************/
  4140.                     // Filtro
  4141.                     if (oggetto instanceof Filtro) {
  4142.                         Filtro filtro = (Filtro) oggetto;
  4143.                         driver.getDriverAuditDB().createFiltro(filtro);
  4144.                         doSetDati = false;
  4145.                     }
  4146.                    
  4147.                     /***********************************************************
  4148.                      * Operazioni su Controllo Traffico *
  4149.                      **********************************************************/
  4150.                     // Configurazione Policy
  4151.                     if(oggetto instanceof ConfigurazionePolicy) {
  4152.                         ConfigurazionePolicy policy = (ConfigurazionePolicy) oggetto;
  4153.                         driver.createConfigurazionePolicy(policy);
  4154.                         doSetDati = false;
  4155.                     }
  4156.                    
  4157.                     // Attivazione Policy
  4158.                     if(oggetto instanceof AttivazionePolicy) {
  4159.                         AttivazionePolicy policy = (AttivazionePolicy) oggetto;
  4160.                         driver.createAttivazionePolicy(policy);
  4161.                         doSetDati = false;
  4162.                        
  4163.                         updateProprietaOggettoPorta(policy, superUser, driver);
  4164.                     }
  4165.                    
  4166.                     /***********************************************************
  4167.                      * Operazioni su Generic Properties *
  4168.                      **********************************************************/
  4169.                     // Generic Propertie
  4170.                     if(oggetto instanceof GenericProperties) {
  4171.                         GenericProperties genericProperties = (GenericProperties) oggetto;
  4172.                         driver.getDriverConfigurazioneDB().createGenericProperties(genericProperties);
  4173.                         doSetDati = false;
  4174.                     }
  4175.                    
  4176.                     /***********************************************************
  4177.                      * Operazioni su Registro Plugin *
  4178.                      **********************************************************/
  4179.                     // Registro Plugin
  4180.                     if(oggetto instanceof RegistroPlugin) {
  4181.                         RegistroPlugin registroPlugin = (RegistroPlugin) oggetto;
  4182.                         driver.getDriverConfigurazioneDB().createRegistroPlugin(registroPlugin);
  4183.                         doSetDati = false;
  4184.                     }
  4185.                    
  4186.                     // Registro Plugin Archivio
  4187.                     if(oggetto instanceof RegistroPluginArchivio) {
  4188.                         RegistroPluginArchivio registroPlugin = (RegistroPluginArchivio) oggetto;
  4189.                         driver.getDriverConfigurazioneDB().createRegistroPluginArchivio(registroPlugin.getNomePlugin(), registroPlugin);
  4190.                         doSetDati = false;
  4191.                     }
  4192.                    
  4193.                     // Plugin Classi
  4194.                     if(oggetto instanceof Plugin) {
  4195.                         Plugin plugin = (Plugin) oggetto;
  4196.                         driver.createPluginClassi(plugin);
  4197.                         doSetDati = false;
  4198.                     }
  4199.                    
  4200.                     /***********************************************************
  4201.                      * Operazioni su Allarmi *
  4202.                      **********************************************************/
  4203.                     // Allarmi
  4204.                     if(oggetto instanceof Allarme) {
  4205.                         Allarme allarme = (Allarme) oggetto;
  4206.                         driver.createAllarme(allarme);
  4207.                         doSetDati = false;
  4208.                        
  4209.                         updateProprietaOggettoPorta(allarme, superUser, driver);
  4210.                     }
  4211.                     // Allarmi History
  4212.                     if(oggetto instanceof AllarmeHistory) {
  4213.                         AllarmeHistory allarme = (AllarmeHistory) oggetto;
  4214.                         driver.createHistoryAllarme(allarme);
  4215.                         doSetDati = false;
  4216.                     }
  4217.                    
  4218.                     /***********************************************************
  4219.                      * Extended *
  4220.                      **********************************************************/
  4221.                     if(extendedBean!=null && extendedServlet!=null){
  4222.                         extendedServlet.performCreate(con, oggetto, extendedBean);
  4223.                     }
  4224.                    
  4225.                     break;

  4226.                 case CostantiControlStation.PERFORM_OPERATION_UPDATE:
  4227.                     // Performing UPDATE operations

  4228.                     /**
  4229.                      * Operazioni su ctrlstat
  4230.                      */
  4231.                     if (oggetto instanceof PdDControlStation) {
  4232.                         PdDControlStation pdd = (PdDControlStation) oggetto;
  4233.                         driver.updatePdDControlStation(pdd);

  4234.                         // Una volta modificata la PdD avvio il thread di
  4235.                         // gestione (a meno che non sia esterna)
  4236.                         pddGestore = pdd;
  4237.                         pddGestoreTipoOperazione = operationType;
  4238.                                                
  4239.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4240.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4241.                         operazioneDaSmistare.setIDTable(pdd.getId());
  4242.                         operazioneDaSmistare.setSuperuser(superUser);
  4243.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pdd);
  4244.                         operazioneDaSmistare.addParameter(OperationsParameter.PORTA_DOMINIO, pdd.getNome());
  4245.                         doSetDati = true;
  4246.                     }

  4247.                    
  4248.                     /***********************************************************
  4249.                      * Caso Speciale di update di proprieta oggetto *
  4250.                      **********************************************************/
  4251.                     if (oggetto instanceof UpdateProprietaOggetto) {
  4252.                         UpdateProprietaOggetto update = (UpdateProprietaOggetto) oggetto;
  4253.                        
  4254.                         if(update.getIdPortaApplicativa()!=null) {
  4255.                             driver.getDriverConfigurazioneDB().updateProprietaOggetto(update.getIdPortaApplicativa(), superUser);
  4256.                         }
  4257.                         else if(update.getIdPortaDelegata()!=null) {
  4258.                             driver.getDriverConfigurazioneDB().updateProprietaOggetto(update.getIdPortaDelegata(), superUser);
  4259.                         }
  4260.                         else if(update.getIdServizioApplicativo()!=null) {
  4261.                             driver.getDriverConfigurazioneDB().updateProprietaOggetto(update.getIdServizioApplicativo(), superUser);
  4262.                         }
  4263.                     }
  4264.                    

  4265.                     /***********************************************************
  4266.                      * Caso Speciale dei Soggetti *
  4267.                      **********************************************************/
  4268.                     // soggetto ctrlstat
  4269.                     if (oggetto instanceof SoggettoCtrlStat) {
  4270.                         SoggettoCtrlStat soggetto = (SoggettoCtrlStat) oggetto;
  4271.                        
  4272.                         // prima chiamo il driver registro in quanto la
  4273.                         // modifica
  4274.                         // del soggetto riflette
  4275.                         // i cambiamenti sui connettori
  4276.                         if(this.registroServiziLocale){
  4277.                             driver.getDriverRegistroServiziDB().updateSoggetto(soggetto.getSoggettoReg());
  4278.                         }

  4279.                         Soggetto sogConf = soggetto.getSoggettoConf();
  4280.                         // imposto i valori old del soggetto configurazione
  4281.                         // con
  4282.                         // i nuovi valori
  4283.                         // in quanto sono stati gia' modificati dalla
  4284.                         // updateSoggetto (config) precedente
  4285.                         if(this.registroServiziLocale){
  4286.                             sogConf.setOldIDSoggettoForUpdate(new IDSoggetto(soggetto.getTipo(), soggetto.getNome()));
  4287.                         }
  4288.                         driver.getDriverConfigurazioneDB().updateSoggetto(sogConf);

  4289.                         // Chiedo la setDati
  4290.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4291.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4292.                         operazioneDaSmistare.setIDTable(soggetto.getId());
  4293.                         operazioneDaSmistare.setSuperuser(superUser);
  4294.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.soggetto);
  4295.                         if(this.registroServiziLocale){
  4296.                             operazioneDaSmistare.setPdd(soggetto.getSoggettoReg().getPortaDominio());
  4297.                         }

  4298.                         operazioneDaSmistare.addParameter(OperationsParameter.OLD_TIPO_SOGGETTO, soggetto.getOldTipoForUpdate());
  4299.                         operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_SOGGETTO, soggetto.getOldNomeForUpdate());
  4300.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, soggetto.getTipo());
  4301.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, soggetto.getNome());

  4302.                         doSetDati = true;
  4303.                     }
  4304.                    
  4305.                    
  4306.                     // soggetto config
  4307.                     if (oggetto instanceof org.openspcoop2.core.config.Soggetto) {
  4308.                        
  4309.                         org.openspcoop2.core.config.Soggetto sogConf = (org.openspcoop2.core.config.Soggetto) oggetto;
  4310.                         driver.getDriverConfigurazioneDB().updateSoggetto(sogConf);

  4311.                         // Chiedo la setDati
  4312.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4313.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4314.                         operazioneDaSmistare.setIDTable(sogConf.getId());
  4315.                         operazioneDaSmistare.setSuperuser(superUser);
  4316.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.soggetto);
  4317.                         if(sogConf.getOldIDSoggettoForUpdate()!=null){
  4318.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_TIPO_SOGGETTO, sogConf.getOldIDSoggettoForUpdate().getTipo());
  4319.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_SOGGETTO, sogConf.getOldIDSoggettoForUpdate().getNome());
  4320.                         }
  4321.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, sogConf.getTipo());
  4322.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, sogConf.getNome());

  4323.                         doSetDati = true;

  4324.                     }
  4325.                    
  4326.                     // soggetto reg
  4327.                     if (oggetto instanceof org.openspcoop2.core.registry.Soggetto) {
  4328.                        
  4329.                         org.openspcoop2.core.registry.Soggetto sogReg = (org.openspcoop2.core.registry.Soggetto) oggetto;

  4330.                         if(this.registroServiziLocale){
  4331.                             driver.getDriverRegistroServiziDB().updateSoggetto(sogReg);
  4332.                         }

  4333.                         // Chiedo la setDati
  4334.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4335.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4336.                         operazioneDaSmistare.setIDTable(sogReg.getId());
  4337.                         operazioneDaSmistare.setSuperuser(superUser);
  4338.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.soggetto);
  4339.                         if(sogReg.getOldIDSoggettoForUpdate()!=null){
  4340.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_TIPO_SOGGETTO, sogReg.getOldIDSoggettoForUpdate().getTipo());
  4341.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_SOGGETTO, sogReg.getOldIDSoggettoForUpdate().getNome());
  4342.                         }
  4343.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, sogReg.getTipo());
  4344.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, sogReg.getNome());

  4345.                         operazioneDaSmistare.setPdd(sogReg.getPortaDominio());
  4346.                        
  4347.                         doSetDati = true;

  4348.                     }
  4349.                    
  4350.                     /***********************************************************
  4351.                      * Operazioni su ConfigurazioneDB *
  4352.                      **********************************************************/
  4353.                    
  4354.                     // ServizioApplicativo
  4355.                     if (oggetto instanceof ServizioApplicativo) {
  4356.                         ServizioApplicativo sa = (ServizioApplicativo) oggetto;
  4357.                        
  4358.                         driver.getDriverConfigurazioneDB().updateServizioApplicativo(sa);
  4359.                         if (sa.getIdSoggetto() == null || sa.getIdSoggetto() < 0) {
  4360.                             sa.setIdSoggetto(DBUtils.getIdSoggetto(sa.getNomeSoggettoProprietario(), sa.getTipoSoggettoProprietario(), con, this.tipoDB, CostantiDB.SOGGETTI));
  4361.                         }

  4362.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4363.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4364.                         operazioneDaSmistare.setIDTable(sa.getId());
  4365.                         operazioneDaSmistare.setSuperuser(superUser);
  4366.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.servizioApplicativo);
  4367.                        
  4368.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SERVIZIO_APPLICATIVO, sa.getNome());
  4369.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, sa.getTipoSoggettoProprietario());
  4370.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, sa.getNomeSoggettoProprietario());
  4371.                        
  4372.                         if(sa.getOldIDServizioApplicativoForUpdate()!=null){
  4373.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_SERVIZIO_APPLICATIVO, sa.getOldIDServizioApplicativoForUpdate().getNome());
  4374.                             if(sa.getOldIDServizioApplicativoForUpdate().getIdSoggettoProprietario()!=null){
  4375.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_TIPO_SOGGETTO, sa.getOldIDServizioApplicativoForUpdate().getIdSoggettoProprietario().getTipo());
  4376.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_SOGGETTO, sa.getOldIDServizioApplicativoForUpdate().getIdSoggettoProprietario().getNome());
  4377.                             }
  4378.                         }

  4379.                         if(this.isRegistroServiziLocale()){
  4380.                             org.openspcoop2.core.registry.Soggetto sogg = driver.getDriverRegistroServiziDB().getSoggetto(sa.getIdSoggetto());
  4381.                             operazioneDaSmistare.setPdd(sogg.getPortaDominio());
  4382.                         }

  4383.                         doSetDati = true;
  4384.                     }
  4385.                     // PortaDelegata
  4386.                     if (oggetto instanceof PortaDelegata) {
  4387.                         PortaDelegata pd = (PortaDelegata) oggetto;
  4388.                         driver.getDriverConfigurazioneDB().updatePortaDelegata(pd);
  4389.                         if (pd.getIdSoggetto() == null || pd.getIdSoggetto() < 0) {
  4390.                             pd.setIdSoggetto(DBUtils.getIdSoggetto(pd.getNomeSoggettoProprietario(), pd.getTipoSoggettoProprietario(), con, this.tipoDB, CostantiDB.SOGGETTI));
  4391.                         }
  4392.                         // Chiedo la setDati
  4393.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4394.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4395.                         operazioneDaSmistare.setIDTable(pd.getId());
  4396.                         operazioneDaSmistare.setSuperuser(superUser);
  4397.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pd);
  4398.                        
  4399.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_PD, pd.getNome());
  4400.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, pd.getNomeSoggettoProprietario());
  4401.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, pd.getTipoSoggettoProprietario());
  4402.                        
  4403.                         if(pd.getOldIDPortaDelegataForUpdate()!=null){
  4404.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_PD, pd.getOldIDPortaDelegataForUpdate().getNome());
  4405.                         }
  4406.                        
  4407.                         if(this.isRegistroServiziLocale()){
  4408.                             org.openspcoop2.core.registry.Soggetto sogg = driver.getDriverRegistroServiziDB().getSoggetto(pd.getIdSoggetto());
  4409.                             String server = sogg.getPortaDominio();
  4410.                             operazioneDaSmistare.setPdd(server);
  4411.                         }
  4412.                         doSetDati = true;
  4413.                     }
  4414.                     // PortaApplivativa
  4415.                     if (oggetto instanceof PortaApplicativa) {
  4416.                         PortaApplicativa pa = (PortaApplicativa) oggetto;
  4417.                         driver.getDriverConfigurazioneDB().updatePortaApplicativa(pa);
  4418.                         if (pa.getIdSoggetto() == null || pa.getIdSoggetto() < 0) {
  4419.                             pa.setIdSoggetto(DBUtils.getIdSoggetto(pa.getNomeSoggettoProprietario(), pa.getTipoSoggettoProprietario(), con, this.tipoDB, CostantiDB.SOGGETTI));
  4420.                         }
  4421.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4422.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4423.                         operazioneDaSmistare.setIDTable(pa.getId());
  4424.                         operazioneDaSmistare.setSuperuser(superUser);
  4425.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pa);
  4426.                        
  4427.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_PA, pa.getNome());
  4428.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, pa.getNomeSoggettoProprietario());
  4429.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, pa.getTipoSoggettoProprietario());
  4430.                        
  4431.                         if(pa.getOldIDPortaApplicativaForUpdate()!=null){
  4432.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_PA, pa.getOldIDPortaApplicativaForUpdate().getNome());
  4433.                         }
  4434.                        
  4435.                         if(this.isRegistroServiziLocale()){
  4436.                             org.openspcoop2.core.registry.Soggetto sogg = driver.getDriverRegistroServiziDB().getSoggetto(pa.getIdSoggetto());
  4437.                             String server = sogg.getPortaDominio();
  4438.                             operazioneDaSmistare.setPdd(server);
  4439.                         }

  4440.                         doSetDati = true;
  4441.                     }
  4442.                     // RoutingTable
  4443.                     if (oggetto instanceof RoutingTable) {
  4444.                         RoutingTable rt = (RoutingTable) oggetto;
  4445.                         driver.getDriverConfigurazioneDB().updateRoutingTable(rt);
  4446.                         ControlStationCore.invalidateConfigurazioneGenerale();
  4447.                         doSetDati = false;
  4448.                     }
  4449.                     // GestioneErrore
  4450.                     if (oggetto instanceof GestioneErrore) {
  4451.                         GestioneErrore gestErrore = (GestioneErrore) oggetto;
  4452.                         driver.getDriverConfigurazioneDB().updateGestioneErroreComponenteCooperazione(gestErrore);
  4453.                         ControlStationCore.invalidateConfigurazioneGenerale();
  4454.                         doSetDati = false;
  4455.                     }
  4456.                     // Configurazione
  4457.                     if (oggetto instanceof Configurazione) {
  4458.                         Configurazione conf = (Configurazione) oggetto;
  4459.                         driver.getDriverConfigurazioneDB().updateConfigurazione(conf);
  4460.                         ControlStationCore.invalidateConfigurazioneGenerale();
  4461.                         doSetDati = false;
  4462.                     }
  4463.                     // ConfigurazioneAccessoRegistro
  4464.                     if (oggetto instanceof AccessoRegistro) {
  4465.                         AccessoRegistro cfgAccessoRegistro = (AccessoRegistro) oggetto;
  4466.                         driver.getDriverConfigurazioneDB().updateAccessoRegistro(cfgAccessoRegistro);
  4467.                         ControlStationCore.invalidateConfigurazioneGenerale();
  4468.                         doSetDati = false;
  4469.                     }
  4470.                     // ConfigurazioneAccessoRegistroRegistro
  4471.                     if (oggetto instanceof AccessoRegistroRegistro) {
  4472.                         AccessoRegistroRegistro carr = (AccessoRegistroRegistro) oggetto;
  4473.                         driver.getDriverConfigurazioneDB().updateAccessoRegistro(carr);
  4474.                         ControlStationCore.invalidateConfigurazioneGenerale();
  4475.                         doSetDati = false;
  4476.                     }
  4477.                     // ConfigurazioneAccessoConfigurazione
  4478.                     if (oggetto instanceof AccessoConfigurazione) {
  4479.                         AccessoConfigurazione accesso = (AccessoConfigurazione) oggetto;
  4480.                         driver.getDriverConfigurazioneDB().updateAccessoConfigurazione(accesso);
  4481.                         ControlStationCore.invalidateConfigurazioneGenerale();
  4482.                         doSetDati = false;
  4483.                     }
  4484.                     // ConfigurazioneAccessoDatiAutorizzazione
  4485.                     if (oggetto instanceof AccessoDatiAutorizzazione) {
  4486.                         AccessoDatiAutorizzazione accesso = (AccessoDatiAutorizzazione) oggetto;
  4487.                         driver.getDriverConfigurazioneDB().updateAccessoDatiAutorizzazione(accesso);
  4488.                         ControlStationCore.invalidateConfigurazioneGenerale();
  4489.                         doSetDati = false;
  4490.                     }
  4491.                     // SystemProperties
  4492.                     if (oggetto instanceof SystemProperties) {
  4493.                         SystemProperties sps = (SystemProperties) oggetto;
  4494.                         driver.getDriverConfigurazioneDB().updateSystemPropertiesPdD(sps);
  4495.                         ControlStationCore.invalidateConfigurazioneGenerale();
  4496.                         doSetDati = false;
  4497.                     }
  4498.                     // ConfigurazioneUrlInvocazioneRegola
  4499.                     if (oggetto instanceof ConfigurazioneUrlInvocazioneRegola) {
  4500.                         ConfigurazioneUrlInvocazioneRegola regola = (ConfigurazioneUrlInvocazioneRegola) oggetto;
  4501.                         driver.getDriverConfigurazioneDB().updateUrlInvocazioneRegola(regola);
  4502.                         ControlStationCore.invalidateConfigurazioneGenerale();
  4503.                         doSetDati = false;
  4504.                     }
  4505.                     // ConfigurazioneUrlInvocazione
  4506.                     if (oggetto instanceof ConfigurazioneUrlInvocazione) {
  4507.                         ConfigurazioneUrlInvocazione confConfigurazioneUrlInvocazione = (ConfigurazioneUrlInvocazione) oggetto;
  4508.                        
  4509.                         Configurazione config = driver.getDriverConfigurazioneDB().getConfigurazioneGenerale();
  4510.                         if(config.getUrlInvocazione()==null) {
  4511.                             config.setUrlInvocazione(confConfigurazioneUrlInvocazione);
  4512.                         }
  4513.                         else {
  4514.                             config.getUrlInvocazione().setBaseUrl(confConfigurazioneUrlInvocazione.getBaseUrl());
  4515.                             config.getUrlInvocazione().setBaseUrlFruizione(confConfigurazioneUrlInvocazione.getBaseUrlFruizione());
  4516.                         }
  4517.                        
  4518.                         driver.getDriverConfigurazioneDB().updateConfigurazione(config);
  4519.                         ControlStationCore.invalidateConfigurazioneGenerale();
  4520.                         doSetDati = false;
  4521.                     }

  4522.                     /***********************************************************
  4523.                      * Operazioni su Registro *
  4524.                      **********************************************************/
  4525.                     // PortaDominio
  4526.                     if (oggetto instanceof PortaDominio && !(oggetto instanceof PdDControlStation)) {
  4527.                         PortaDominio pdd = (PortaDominio) oggetto;
  4528.                         driver.getDriverRegistroServiziDB().updatePortaDominio(pdd);

  4529.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4530.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4531.                         operazioneDaSmistare.setIDTable(pdd.getId());
  4532.                         operazioneDaSmistare.setSuperuser(superUser);
  4533.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pdd);
  4534.                         operazioneDaSmistare.addParameter(OperationsParameter.PORTA_DOMINIO, pdd.getNome());

  4535.                         doSetDati = true;
  4536.                     }
  4537.                    
  4538.                     // Gruppo
  4539.                     if (oggetto instanceof Gruppo) {
  4540.                         Gruppo gruppo = (Gruppo) oggetto;
  4541.                         driver.getDriverRegistroServiziDB().updateGruppo(gruppo);
  4542.                         // Chiedo la setDati
  4543.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4544.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4545.                         operazioneDaSmistare.setIDTable(gruppo.getId());
  4546.                         operazioneDaSmistare.setSuperuser(superUser);
  4547.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.gruppo);
  4548.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_GRUPPO, gruppo.getNome());
  4549.                         IDGruppo idGruppoOLD = gruppo.getOldIDGruppoForUpdate();
  4550.                         if(idGruppoOLD!=null){
  4551.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_GRUPPO, idGruppoOLD.getNome());
  4552.                         }
  4553.                         doSetDati = true;
  4554.                     }

  4555.                     // Ruolo
  4556.                     if (oggetto instanceof Ruolo) {
  4557.                         Ruolo ruolo = (Ruolo) oggetto;
  4558.                         driver.getDriverRegistroServiziDB().updateRuolo(ruolo);
  4559.                         // Chiedo la setDati
  4560.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4561.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4562.                         operazioneDaSmistare.setIDTable(ruolo.getId());
  4563.                         operazioneDaSmistare.setSuperuser(superUser);
  4564.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.ruolo);
  4565.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_RUOLO, ruolo.getNome());
  4566.                         IDRuolo idRuoloOLD = ruolo.getOldIDRuoloForUpdate();
  4567.                         if(idRuoloOLD!=null){
  4568.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_RUOLO, idRuoloOLD.getNome());
  4569.                         }
  4570.                         doSetDati = true;
  4571.                     }
  4572.                    
  4573.                     // Scope
  4574.                     if (oggetto instanceof Scope) {
  4575.                         Scope scope = (Scope) oggetto;
  4576.                         driver.getDriverRegistroServiziDB().updateScope(scope);
  4577.                         // Chiedo la setDati
  4578.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4579.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4580.                         operazioneDaSmistare.setIDTable(scope.getId());
  4581.                         operazioneDaSmistare.setSuperuser(superUser);
  4582.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.scope);
  4583.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SCOPE, scope.getNome());
  4584.                         IDScope idScopeOLD = scope.getOldIDScopeForUpdate();
  4585.                         if(idScopeOLD!=null){
  4586.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_SCOPE, idScopeOLD.getNome());
  4587.                         }
  4588.                         doSetDati = true;
  4589.                     }
  4590.                    
  4591.                     // AccordoServizio
  4592.                     if (oggetto instanceof AccordoServizioParteComune) {
  4593.                         AccordoServizioParteComune as = (AccordoServizioParteComune) oggetto;
  4594.                         driver.getDriverRegistroServiziDB().updateAccordoServizioParteComune(as);
  4595.                         // Chiedo la setDati
  4596.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4597.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4598.                         operazioneDaSmistare.setIDTable(as.getId());
  4599.                         operazioneDaSmistare.setSuperuser(superUser);
  4600.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordo);
  4601.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, as.getNome());
  4602.                         if(as.getVersione()!=null){
  4603.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, as.getVersione().intValue()+"");
  4604.                         }
  4605.                         if(as.getSoggettoReferente()!=null){
  4606.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, as.getSoggettoReferente().getTipo());
  4607.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, as.getSoggettoReferente().getNome());
  4608.                         }
  4609.                         IDAccordo idAccordoOLD = as.getOldIDAccordoForUpdate();
  4610.                         if(idAccordoOLD!=null){
  4611.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_ACCORDO, idAccordoOLD.getNome());
  4612.                             if(idAccordoOLD.getVersione()!=null){
  4613.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_VERSIONE_ACCORDO, idAccordoOLD.getVersione().intValue()+"");
  4614.                             }
  4615.                             if(idAccordoOLD.getSoggettoReferente()!=null){
  4616.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_TIPO_REFERENTE, idAccordoOLD.getSoggettoReferente().getTipo());
  4617.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_REFERENTE, idAccordoOLD.getSoggettoReferente().getNome());
  4618.                             }else{
  4619.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_TIPO_REFERENTE, null);
  4620.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_REFERENTE, null);
  4621.                             }
  4622.                         }
  4623.                         doSetDati = true;
  4624.                     }

  4625.                     // AccordoCooperazione
  4626.                     if (oggetto instanceof AccordoCooperazione) {
  4627.                         AccordoCooperazione ac = (AccordoCooperazione) oggetto;
  4628.                         driver.getDriverRegistroServiziDB().updateAccordoCooperazione(ac);

  4629.                         // Chiedo la setDati
  4630.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4631.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4632.                         operazioneDaSmistare.setIDTable(ac.getId());
  4633.                         operazioneDaSmistare.setSuperuser(superUser);
  4634.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordoCooperazione);
  4635.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, ac.getNome());
  4636.                         if(ac.getVersione()!=null){
  4637.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, ac.getVersione().intValue()+"");
  4638.                         }
  4639.                         if(ac.getSoggettoReferente()!=null){
  4640.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, ac.getSoggettoReferente().getTipo());
  4641.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, ac.getSoggettoReferente().getNome());
  4642.                         }

  4643.                         IDAccordoCooperazione idAccordoOLD = ac.getOldIDAccordoForUpdate();
  4644.                         if(idAccordoOLD!=null){
  4645.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_ACCORDO, idAccordoOLD.getNome());
  4646.                             if(idAccordoOLD.getVersione()!=null){
  4647.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_VERSIONE_ACCORDO, idAccordoOLD.getVersione().intValue()+"");
  4648.                             }
  4649.                             if(idAccordoOLD.getSoggettoReferente()!=null){
  4650.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_TIPO_REFERENTE, idAccordoOLD.getSoggettoReferente().getTipo());
  4651.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_REFERENTE, idAccordoOLD.getSoggettoReferente().getNome());
  4652.                             }else{
  4653.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_TIPO_REFERENTE, null);
  4654.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_REFERENTE, null);
  4655.                             }
  4656.                         }

  4657.                         doSetDati = true;
  4658.                     }

  4659.                     // Servizio
  4660.                     // Servizio Correlato
  4661.                     if (oggetto instanceof AccordoServizioParteSpecifica) {
  4662.                         AccordoServizioParteSpecifica asps = (AccordoServizioParteSpecifica) oggetto;

  4663.                         driver.getDriverRegistroServiziDB().updateAccordoServizioParteSpecifica(asps);

  4664.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4665.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4666.                         operazioneDaSmistare.setIDTable(asps.getId());
  4667.                         operazioneDaSmistare.setSuperuser(superUser);
  4668.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.servizio);
  4669.                        
  4670.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, asps.getTipoSoggettoErogatore());
  4671.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, asps.getNomeSoggettoErogatore());
  4672.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SERVIZIO, asps.getTipo());
  4673.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SERVIZIO, asps.getNome());
  4674.                         if(asps.getVersione()!=null){
  4675.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, asps.getVersione().intValue()+"");
  4676.                         }
  4677.                        
  4678.                         if(asps.getOldIDServizioForUpdate()!=null){
  4679.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_TIPO_SERVIZIO, asps.getOldIDServizioForUpdate().getTipo());
  4680.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_SERVIZIO, asps.getOldIDServizioForUpdate().getNome());
  4681.                             if(asps.getOldIDServizioForUpdate().getSoggettoErogatore()!=null){
  4682.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_TIPO_SOGGETTO, asps.getOldIDServizioForUpdate().getSoggettoErogatore().getTipo());
  4683.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_SOGGETTO, asps.getOldIDServizioForUpdate().getSoggettoErogatore().getNome());
  4684.                             }
  4685.                             if(asps.getOldIDServizioForUpdate().getVersione()!=null){
  4686.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_VERSIONE_ACCORDO, asps.getOldIDServizioForUpdate().getVersione().intValue()+"");
  4687.                             }
  4688.                         }

  4689.                         doSetDati = true;

  4690.                     }

  4691.                     // PortType
  4692.                     if (oggetto instanceof PortType) {
  4693.                         PortType pt = (PortType) oggetto;
  4694.                         driver.getDriverRegistroServiziDB().updatePortType(pt, superUser);

  4695.                         // Chiedo la setDati per l'accordo servizio
  4696.                         long idAcc = pt.getIdAccordo();
  4697.                         AccordoServizioParteComune as = driver.getDriverRegistroServiziDB().getAccordoServizioParteComune(idAcc);
  4698.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4699.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4700.                         operazioneDaSmistare.setIDTable(pt.getIdAccordo().intValue());
  4701.                         operazioneDaSmistare.setSuperuser(superUser);
  4702.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordo);
  4703.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, as.getNome());
  4704.                         if(as.getVersione()!=null){
  4705.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, as.getVersione().intValue()+"");
  4706.                         }
  4707.                         if(as.getSoggettoReferente()!=null){
  4708.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, as.getSoggettoReferente().getTipo());
  4709.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, as.getSoggettoReferente().getNome());
  4710.                         }

  4711.                         doSetDati = true;
  4712.                     }

  4713.                     /***********************************************************
  4714.                      * Operazioni su Users *
  4715.                      **********************************************************/
  4716.                     // User
  4717.                     if (oggetto instanceof User) {
  4718.                         User user = (User) oggetto;
  4719.                         driver.getDriverUsersDB().updateUser(user);
  4720.                         doSetDati = false;
  4721.                     }

  4722.                     /***********************************************************
  4723.                      * Operazioni su Audit *
  4724.                      **********************************************************/
  4725.                     // Configurazione
  4726.                     if (oggetto instanceof org.openspcoop2.web.lib.audit.dao.Configurazione) {
  4727.                         org.openspcoop2.web.lib.audit.dao.Configurazione confAudit =
  4728.                                 (org.openspcoop2.web.lib.audit.dao.Configurazione) oggetto;
  4729.                         driver.getDriverAuditDB().updateConfigurazione(confAudit);
  4730.                         doSetDati = false;
  4731.                     }

  4732.                     // Filtro
  4733.                     if (oggetto instanceof Filtro) {
  4734.                         Filtro filtro = (Filtro) oggetto;
  4735.                         driver.getDriverAuditDB().updateFiltro(filtro);
  4736.                         doSetDati = false;
  4737.                     }
  4738.                    
  4739.                     /***********************************************************
  4740.                      * Operazioni su Controllo Traffico *
  4741.                      **********************************************************/

  4742.                     // Configurazione Controllo Traffico
  4743.                     if(oggetto instanceof ConfigurazioneGenerale) {
  4744.                         ConfigurazioneGenerale configurazioneControlloTraffico = (ConfigurazioneGenerale) oggetto;
  4745.                         driver.updateConfigurazioneControlloTraffico(configurazioneControlloTraffico);
  4746.                         doSetDati = false;
  4747.                     }

  4748.                     // Configurazione Policy
  4749.                     if(oggetto instanceof ConfigurazionePolicy) {
  4750.                         ConfigurazionePolicy policy = (ConfigurazionePolicy) oggetto;
  4751.                         driver.updateConfigurazionePolicy(policy);
  4752.                         doSetDati = false;
  4753.                     }
  4754.                    
  4755.                     // Attivazione Policy
  4756.                     if(oggetto instanceof AttivazionePolicy) {
  4757.                         AttivazionePolicy policy = (AttivazionePolicy) oggetto;
  4758.                         driver.updateAttivazionePolicy(policy);
  4759.                         doSetDati = false;
  4760.                        
  4761.                         updateProprietaOggettoPorta(policy, superUser, driver);
  4762.                     }
  4763.                    
  4764.                     /***********************************************************
  4765.                      * Operazioni su Generic Properties *
  4766.                      **********************************************************/
  4767.                     // Generic Propertie
  4768.                     if(oggetto instanceof GenericProperties) {
  4769.                         GenericProperties genericProperties = (GenericProperties) oggetto;
  4770.                         driver.getDriverConfigurazioneDB().updateGenericProperties(genericProperties);
  4771.                         doSetDati = false;
  4772.                     }
  4773.                    
  4774.                     /***********************************************************
  4775.                      * Operazioni su Registro Plugin *
  4776.                      **********************************************************/
  4777.                     // Registro Plugin
  4778.                     if(oggetto instanceof RegistroPlugin) {
  4779.                         RegistroPlugin registroPlugin = (RegistroPlugin) oggetto;
  4780.                         String nome = registroPlugin.getNome();
  4781.                         if(registroPlugin.getOldNome()!=null) {
  4782.                             nome = registroPlugin.getOldNome();
  4783.                         }
  4784.                         driver.getDriverConfigurazioneDB().updateDatiRegistroPlugin(nome,registroPlugin);
  4785.                         doSetDati = false;
  4786.                     }
  4787.                    
  4788.                     // Registro Plugin Archivio
  4789.                     if(oggetto instanceof RegistroPluginArchivio) {
  4790.                         RegistroPluginArchivio registroPlugin = (RegistroPluginArchivio) oggetto;
  4791.                         driver.getDriverConfigurazioneDB().updateRegistroPluginArchivio(registroPlugin.getNomePlugin(),registroPlugin);
  4792.                         doSetDati = false;
  4793.                     }
  4794.                    
  4795.                     // Plugin Classi
  4796.                     if(oggetto instanceof Plugin) {
  4797.                         Plugin plugin = (Plugin) oggetto;
  4798.                         driver.updatePluginClassi(plugin);
  4799.                         doSetDati = false;
  4800.                     }
  4801.                    
  4802.                     /***********************************************************
  4803.                      * Operazioni su Allarmi *
  4804.                      **********************************************************/
  4805.                     // Allarmi
  4806.                     if(oggetto instanceof Allarme) {
  4807.                         Allarme allarme = (Allarme) oggetto;
  4808.                         driver.updateAllarme(allarme);
  4809.                         doSetDati = false;
  4810.                        
  4811.                         updateProprietaOggettoPorta(allarme, superUser, driver);
  4812.                     }
  4813.                    
  4814.                     /***********************************************************
  4815.                      * Extended *
  4816.                      **********************************************************/
  4817.                     if(extendedBean!=null && extendedServlet!=null){
  4818.                         extendedServlet.performUpdate(con, oggetto, extendedBean);
  4819.                     }
  4820.                    
  4821.                    
  4822.                     break;

  4823.                 case CostantiControlStation.PERFORM_OPERATION_DELETE:
  4824.                     // Performing DELETE operations

  4825.                     /**
  4826.                      * Operazioni su ctrlstat
  4827.                      */
  4828.                     if (oggetto instanceof PdDControlStation) {
  4829.                         PdDControlStation pdd = (PdDControlStation) oggetto;
  4830.                         driver.deletePdDControlStation(pdd);

  4831.                         // Una volta modificata la PdD avvio il thread di
  4832.                         // gestione (a meno che non sia esterna)
  4833.                         pddGestore = pdd;
  4834.                         pddGestoreTipoOperazione = operationType;
  4835.                        
  4836.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4837.                         operazioneDaSmistare.setOperazione(Operazione.del);
  4838.                         operazioneDaSmistare.setIDTable(pdd.getId());
  4839.                         operazioneDaSmistare.setSuperuser(superUser);
  4840.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pdd);
  4841.                         operazioneDaSmistare.addParameter(OperationsParameter.PORTA_DOMINIO, pdd.getNome());

  4842.                         doSetDati = true;
  4843.                     }

  4844.                     if (oggetto instanceof MappingFruizionePortaDelegata) {
  4845.                         MappingFruizionePortaDelegata mapping = (MappingFruizionePortaDelegata) oggetto;
  4846.                         driver.deleteMappingFruizionePortaDelegata(mapping);
  4847.                        
  4848.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4849.                         operazioneDaSmistare.setOperazione(Operazione.del);
  4850.                         operazioneDaSmistare.addParameter(OperationsParameter.MAPPING_ID_FRUITORE, "" + driver.getTableIdSoggetto(mapping.getIdFruitore()));
  4851.                         operazioneDaSmistare.addParameter(OperationsParameter.MAPPING_ID_SERVIZIO, "" + driver.getTableIdAccordoServizioParteSpecifica(mapping.getIdServizio()));
  4852.                         operazioneDaSmistare.addParameter(OperationsParameter.MAPPING_ID_PORTA_DELEGATA, "" + driver.getTableIdPortaDelegata(mapping.getIdPortaDelegata()));
  4853.                         operazioneDaSmistare.setSuperuser(superUser);
  4854.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.mappingFruizionePD);

  4855.                         if(mapping.getIdServizio()!=null && mapping.getIdFruitore()!=null) {
  4856.                             driver.updateProprietaOggettoFruizione(mapping.getIdServizio(), mapping.getIdFruitore() ,superUser ,false);
  4857.                         }
  4858.                        
  4859.                         doSetDati = false;

  4860.                     }
  4861.                    
  4862.                     if (oggetto instanceof MappingErogazionePortaApplicativa) {
  4863.                         MappingErogazionePortaApplicativa mapping = (MappingErogazionePortaApplicativa) oggetto;
  4864.                         driver.deleteMappingErogazionePortaApplicativa(mapping);
  4865.                        
  4866.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4867.                         operazioneDaSmistare.setOperazione(Operazione.del);
  4868.                         operazioneDaSmistare.addParameter(OperationsParameter.MAPPING_ID_SERVIZIO, "" + driver.getTableIdAccordoServizioParteSpecifica(mapping.getIdServizio()));
  4869.                         operazioneDaSmistare.addParameter(OperationsParameter.MAPPING_ID_PORTA_APPLICATIVA, "" + driver.getTableIdPortaApplicativa(mapping.getIdPortaApplicativa()));
  4870.                         operazioneDaSmistare.setSuperuser(superUser);
  4871.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.mappingErogazionePA);

  4872.                         if(mapping.getIdServizio()!=null) {
  4873.                             driver.updateProprietaOggettoErogazione(mapping.getIdServizio() ,superUser ,false);
  4874.                         }
  4875.                        
  4876.                         doSetDati = false;

  4877.                     }
  4878.                    
  4879.                    
  4880.                     /***********************************************************
  4881.                      * Caso Speciale dei Soggetti *
  4882.                      **********************************************************/
  4883.            
  4884.                     // soggetto ctrlstat
  4885.                     if (oggetto instanceof SoggettoCtrlStat) {
  4886.                         SoggettoCtrlStat soggetto = (SoggettoCtrlStat) oggetto;

  4887.                         // la delete basta farla solo una volta
  4888.                         if(this.registroServiziLocale){
  4889.                             driver.getDriverRegistroServiziDB().deleteSoggetto(soggetto.getSoggettoReg());
  4890.                         }
  4891.                         else{
  4892.                             driver.getDriverConfigurazioneDB().deleteSoggetto(soggetto.getSoggettoConf());
  4893.                         }

  4894.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4895.                         operazioneDaSmistare.setOperazione(Operazione.del);
  4896.                         operazioneDaSmistare.setIDTable(soggetto.getId());
  4897.                         operazioneDaSmistare.setSuperuser(superUser);
  4898.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.soggetto);
  4899.                         if(soggetto.getSoggettoReg()!=null){
  4900.                             operazioneDaSmistare.setPdd(soggetto.getSoggettoReg().getPortaDominio());
  4901.                         }

  4902.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, soggetto.getTipo());
  4903.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, soggetto.getNome());

  4904.                         doSetDati = true;
  4905.                     }
  4906.                    
  4907.                     // soggetto config
  4908.                     if (oggetto instanceof org.openspcoop2.core.config.Soggetto) {
  4909.                        
  4910.                         org.openspcoop2.core.config.Soggetto sogConf = (org.openspcoop2.core.config.Soggetto) oggetto;
  4911.                         driver.getDriverConfigurazioneDB().deleteSoggetto(sogConf);

  4912.                         // Chiedo la setDati
  4913.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4914.                         operazioneDaSmistare.setOperazione(Operazione.del);
  4915.                         operazioneDaSmistare.setIDTable(sogConf.getId());
  4916.                         operazioneDaSmistare.setSuperuser(superUser);
  4917.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.soggetto);
  4918.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, sogConf.getTipo());
  4919.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, sogConf.getNome());

  4920.                         doSetDati = true;

  4921.                     }
  4922.                    
  4923.                     // soggetto reg
  4924.                     if (oggetto instanceof org.openspcoop2.core.registry.Soggetto) {
  4925.                        
  4926.                         org.openspcoop2.core.registry.Soggetto sogReg = (org.openspcoop2.core.registry.Soggetto) oggetto;

  4927.                         if(this.registroServiziLocale){
  4928.                             driver.getDriverRegistroServiziDB().deleteSoggetto(sogReg);
  4929.                         }

  4930.                         // Chiedo la setDati
  4931.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4932.                         operazioneDaSmistare.setOperazione(Operazione.del);
  4933.                         operazioneDaSmistare.setIDTable(sogReg.getId());
  4934.                         operazioneDaSmistare.setSuperuser(superUser);
  4935.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.soggetto);
  4936.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, sogReg.getTipo());
  4937.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, sogReg.getNome());

  4938.                         operazioneDaSmistare.setPdd(sogReg.getPortaDominio());
  4939.                        
  4940.                         doSetDati = true;

  4941.                     }
  4942.                    
  4943.                    
  4944.                    
  4945.                     /***********************************************************
  4946.                      * Operazioni su ConfigurazioneDB *
  4947.                      **********************************************************/

  4948.                     // ServizioApplicativo
  4949.                     if (oggetto instanceof ServizioApplicativo) {
  4950.                         ServizioApplicativo sa = (ServizioApplicativo) oggetto;
  4951.                         driver.getDriverConfigurazioneDB().deleteServizioApplicativo(sa);

  4952.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4953.                         operazioneDaSmistare.setOperazione(Operazione.del);
  4954.                         operazioneDaSmistare.setIDTable(sa.getId());
  4955.                         operazioneDaSmistare.setSuperuser(superUser);
  4956.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.servizioApplicativo);
  4957.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SERVIZIO_APPLICATIVO, sa.getNome());
  4958.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, sa.getNomeSoggettoProprietario());
  4959.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, sa.getTipoSoggettoProprietario());
  4960.                         if(this.isRegistroServiziLocale()){
  4961.                             org.openspcoop2.core.registry.Soggetto sogg = null;
  4962.                             if(sa.getIdSoggetto()!=null && sa.getIdSoggetto()>0){
  4963.                                 sogg = driver.getDriverRegistroServiziDB().getSoggetto(sa.getIdSoggetto());
  4964.                             }
  4965.                             else{
  4966.                                 sogg = driver.getDriverRegistroServiziDB().getSoggetto(new IDSoggetto(sa.getTipoSoggettoProprietario(), sa.getNomeSoggettoProprietario()));
  4967.                             }  
  4968.                             operazioneDaSmistare.setPdd(sogg.getPortaDominio());
  4969.                         }

  4970.                         doSetDati = true;
  4971.                     }
  4972.                     // PortaDelegata
  4973.                     if (oggetto instanceof PortaDelegata) {
  4974.                         PortaDelegata pd = (PortaDelegata) oggetto;
  4975.                         driver.getDriverConfigurazioneDB().deletePortaDelegata(pd);
  4976.                         // Chiedo la setDati
  4977.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4978.                         operazioneDaSmistare.setOperazione(Operazione.del);
  4979.                         operazioneDaSmistare.setIDTable(pd.getId());
  4980.                         operazioneDaSmistare.setSuperuser(superUser);
  4981.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pd);
  4982.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_PD, pd.getNome());
  4983.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, pd.getNomeSoggettoProprietario());
  4984.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, pd.getTipoSoggettoProprietario());
  4985.                         if(this.isRegistroServiziLocale()){
  4986.                             org.openspcoop2.core.registry.Soggetto sogg = soggettiCore.getSoggettoRegistro(new IDSoggetto(pd.getTipoSoggettoProprietario(), pd.getNomeSoggettoProprietario()));
  4987.                             String server = sogg.getPortaDominio();
  4988.                             operazioneDaSmistare.setPdd(server);
  4989.                         }
  4990.                         doSetDati = true;
  4991.                     }
  4992.                     // PortaApplivativa
  4993.                     if (oggetto instanceof PortaApplicativa) {
  4994.                         PortaApplicativa pa = (PortaApplicativa) oggetto;
  4995.                         driver.getDriverConfigurazioneDB().deletePortaApplicativa(pa);
  4996.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4997.                         operazioneDaSmistare.setOperazione(Operazione.del);
  4998.                         operazioneDaSmistare.setIDTable(pa.getId());
  4999.                         operazioneDaSmistare.setSuperuser(superUser);
  5000.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pa);
  5001.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_PA, pa.getNome());
  5002.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, pa.getNomeSoggettoProprietario());
  5003.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, pa.getTipoSoggettoProprietario());
  5004.                         if(this.isRegistroServiziLocale()){
  5005.                             org.openspcoop2.core.registry.Soggetto sogg = soggettiCore.getSoggettoRegistro(new IDSoggetto(pa.getTipoSoggettoProprietario(), pa.getNomeSoggettoProprietario()));
  5006.                             String server = sogg.getPortaDominio();
  5007.                             operazioneDaSmistare.setPdd(server);
  5008.                         }

  5009.                         doSetDati = true;
  5010.                     }
  5011.                     // RoutingTable
  5012.                     if (oggetto instanceof RoutingTable) {
  5013.                         RoutingTable rt = (RoutingTable) oggetto;
  5014.                         driver.getDriverConfigurazioneDB().deleteRoutingTable(rt);
  5015.                         ControlStationCore.invalidateConfigurazioneGenerale();
  5016.                         doSetDati = false;
  5017.                     }
  5018.                     // GestioneErrore
  5019.                     if (oggetto instanceof GestioneErrore) {
  5020.                         GestioneErrore gestErrore = (GestioneErrore) oggetto;
  5021.                         driver.getDriverConfigurazioneDB().deleteGestioneErroreComponenteCooperazione(gestErrore);
  5022.                         ControlStationCore.invalidateConfigurazioneGenerale();
  5023.                         doSetDati = false;
  5024.                     }
  5025.                     // Configurazione
  5026.                     if (oggetto instanceof Configurazione) {
  5027.                         Configurazione conf = (Configurazione) oggetto;
  5028.                         driver.getDriverConfigurazioneDB().deleteConfigurazione(conf);
  5029.                         ControlStationCore.invalidateConfigurazioneGenerale();
  5030.                         doSetDati = false;
  5031.                     }
  5032.                     // ConfigurazioneAccessoRegistro
  5033.                     if (oggetto instanceof AccessoRegistro) {
  5034.                         AccessoRegistro cfgAccessoRegistro = (AccessoRegistro) oggetto;
  5035.                         driver.getDriverConfigurazioneDB().deleteAccessoRegistro(cfgAccessoRegistro);
  5036.                         ControlStationCore.invalidateConfigurazioneGenerale();
  5037.                         doSetDati = false;
  5038.                     }
  5039.                     // ConfigurazioneAccessoRegistroRegistro
  5040.                     if (oggetto instanceof AccessoRegistroRegistro) {
  5041.                         AccessoRegistroRegistro carr = (AccessoRegistroRegistro) oggetto;
  5042.                         driver.getDriverConfigurazioneDB().deleteAccessoRegistro(carr);
  5043.                         ControlStationCore.invalidateConfigurazioneGenerale();
  5044.                         doSetDati = false;
  5045.                     }
  5046.                     // ConfigurazioneAccessoConfigurazione
  5047.                     if (oggetto instanceof AccessoConfigurazione) {
  5048.                         AccessoConfigurazione accesso = (AccessoConfigurazione) oggetto;
  5049.                         driver.getDriverConfigurazioneDB().deleteAccessoConfigurazione(accesso);
  5050.                         ControlStationCore.invalidateConfigurazioneGenerale();
  5051.                         doSetDati = false;
  5052.                     }
  5053.                     // ConfigurazioneAccessoDatiAutorizzazione
  5054.                     if (oggetto instanceof AccessoDatiAutorizzazione) {
  5055.                         AccessoDatiAutorizzazione accesso = (AccessoDatiAutorizzazione) oggetto;
  5056.                         driver.getDriverConfigurazioneDB().deleteAccessoDatiAutorizzazione(accesso);
  5057.                         ControlStationCore.invalidateConfigurazioneGenerale();
  5058.                         doSetDati = false;
  5059.                     }
  5060.                     // SystemProperties
  5061.                     if (oggetto instanceof SystemProperties) {
  5062.                         SystemProperties sps = (SystemProperties) oggetto;
  5063.                         driver.getDriverConfigurazioneDB().deleteSystemPropertiesPdD(sps);
  5064.                         ControlStationCore.invalidateConfigurazioneGenerale();
  5065.                         doSetDati = false;
  5066.                     }
  5067.                     // ConfigurazioneUrlInvocazioneRegola
  5068.                     if (oggetto instanceof ConfigurazioneUrlInvocazioneRegola) {
  5069.                         ConfigurazioneUrlInvocazioneRegola regola = (ConfigurazioneUrlInvocazioneRegola) oggetto;
  5070.                         driver.getDriverConfigurazioneDB().deleteUrlInvocazioneRegola(regola);
  5071.                         ControlStationCore.invalidateConfigurazioneGenerale();
  5072.                         doSetDati = false;
  5073.                     }

  5074.                     /***********************************************************
  5075.                      * Operazioni su Registro *
  5076.                      **********************************************************/
  5077.                     // PortaDominio
  5078.                     if (oggetto instanceof PortaDominio && !(oggetto instanceof PdDControlStation)) {
  5079.                         PortaDominio pdd = (PortaDominio) oggetto;
  5080.                         driver.getDriverRegistroServiziDB().deletePortaDominio(pdd);

  5081.                         operazioneDaSmistare = new OperazioneDaSmistare();
  5082.                         operazioneDaSmistare.setOperazione(Operazione.del);
  5083.                         operazioneDaSmistare.setIDTable(pdd.getId());
  5084.                         operazioneDaSmistare.setSuperuser(superUser);
  5085.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pdd);
  5086.                         operazioneDaSmistare.addParameter(OperationsParameter.PORTA_DOMINIO, pdd.getNome());

  5087.                         doSetDati = true;
  5088.                     }
  5089.                    
  5090.                     // Ruolo
  5091.                     if (oggetto instanceof Gruppo) {
  5092.                         Gruppo gruppo = (Gruppo) oggetto;
  5093.                         driver.getDriverRegistroServiziDB().deleteGruppo(gruppo);
  5094.                         operazioneDaSmistare = new OperazioneDaSmistare();
  5095.                         operazioneDaSmistare.setOperazione(Operazione.del);
  5096.                         operazioneDaSmistare.setIDTable(gruppo.getId());
  5097.                         operazioneDaSmistare.setSuperuser(superUser);
  5098.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.gruppo);
  5099.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_GRUPPO, gruppo.getNome());
  5100.                         operazioneDaSmistareList.add(operazioneDaSmistare);
  5101.                     }

  5102.                     // Ruolo
  5103.                     if (oggetto instanceof Ruolo) {
  5104.                         Ruolo ruolo = (Ruolo) oggetto;
  5105.                         driver.getDriverRegistroServiziDB().deleteRuolo(ruolo);
  5106.                         operazioneDaSmistare = new OperazioneDaSmistare();
  5107.                         operazioneDaSmistare.setOperazione(Operazione.del);
  5108.                         operazioneDaSmistare.setIDTable(ruolo.getId());
  5109.                         operazioneDaSmistare.setSuperuser(superUser);
  5110.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.ruolo);
  5111.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_RUOLO, ruolo.getNome());
  5112.                         operazioneDaSmistareList.add(operazioneDaSmistare);
  5113.                     }
  5114.                    
  5115.                     // Scope
  5116.                     if (oggetto instanceof Scope) {
  5117.                         Scope scope = (Scope) oggetto;
  5118.                         driver.getDriverRegistroServiziDB().deleteScope(scope);
  5119.                         operazioneDaSmistare = new OperazioneDaSmistare();
  5120.                         operazioneDaSmistare.setOperazione(Operazione.del);
  5121.                         operazioneDaSmistare.setIDTable(scope.getId());
  5122.                         operazioneDaSmistare.setSuperuser(superUser);
  5123.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.scope);
  5124.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SCOPE, scope.getNome());
  5125.                         operazioneDaSmistareList.add(operazioneDaSmistare);
  5126.                     }
  5127.                    
  5128.                     // AccordoServizio
  5129.                     if (oggetto instanceof AccordoServizioParteComune) {
  5130.                         AccordoServizioParteComune as = (AccordoServizioParteComune) oggetto;
  5131.                         driver.getDriverRegistroServiziDB().deleteAccordoServizioParteComune(as);
  5132.                         operazioneDaSmistare = new OperazioneDaSmistare();
  5133.                         operazioneDaSmistare.setOperazione(Operazione.del);
  5134.                         operazioneDaSmistare.setIDTable(as.getId());
  5135.                         operazioneDaSmistare.setSuperuser(superUser);
  5136.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordo);
  5137.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, as.getNome());
  5138.                         if(as.getVersione()!=null){
  5139.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, as.getVersione().intValue()+"");
  5140.                         }
  5141.                         if(as.getSoggettoReferente()!=null){
  5142.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, as.getSoggettoReferente().getTipo());
  5143.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, as.getSoggettoReferente().getNome());
  5144.                         }
  5145.                         operazioneDaSmistareList.add(operazioneDaSmistare);

  5146.                         // OPERAZIONI PER RepositoryAutorizzazioni
  5147.                         // preparo operazione da smistare
  5148.                         operazioneDaSmistare = new OperazioneDaSmistare();
  5149.                         operazioneDaSmistare.setOperazione(Operazione.del);
  5150.                         operazioneDaSmistare.setIDTable(as.getId());
  5151.                         operazioneDaSmistare.setSuperuser(superUser);
  5152.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordoRuolo);
  5153.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, as.getNome());
  5154.                         if(as.getVersione()!=null){
  5155.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, as.getVersione().intValue()+"");
  5156.                         }
  5157.                         if(as.getSoggettoReferente()!=null){
  5158.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, as.getSoggettoReferente().getTipo());
  5159.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, as.getSoggettoReferente().getNome());
  5160.                         }
  5161.                         // inserisco in lista l'operazione
  5162.                         operazioneDaSmistareList.add(operazioneDaSmistare);

  5163.                         // preparo l'altra operazione da aggiungere
  5164.                         operazioneDaSmistare = new OperazioneDaSmistare();
  5165.                         operazioneDaSmistare.setOperazione(Operazione.del);
  5166.                         operazioneDaSmistare.setIDTable(as.getId());
  5167.                         operazioneDaSmistare.setSuperuser(superUser);
  5168.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordoRuolo);
  5169.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, as.getNome() + "Correlato");
  5170.                         if(as.getVersione()!=null){
  5171.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, as.getVersione().intValue()+"");
  5172.                         }
  5173.                         if(as.getSoggettoReferente()!=null){
  5174.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, as.getSoggettoReferente().getTipo());
  5175.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, as.getSoggettoReferente().getNome());
  5176.                         }

  5177.                         doSetDati = true;
  5178.                     }

  5179.                     // AccordoCooperazione
  5180.                     if (oggetto instanceof AccordoCooperazione) {
  5181.                         AccordoCooperazione ac = (AccordoCooperazione) oggetto;
  5182.                         driver.getDriverRegistroServiziDB().deleteAccordoCooperazione(ac);

  5183.                         operazioneDaSmistare = new OperazioneDaSmistare();
  5184.                         operazioneDaSmistare.setOperazione(Operazione.del);
  5185.                         operazioneDaSmistare.setIDTable(ac.getId());
  5186.                         operazioneDaSmistare.setSuperuser(superUser);
  5187.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordoCooperazione);
  5188.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, ac.getNome());
  5189.                         if(ac.getVersione()!=null){
  5190.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, ac.getVersione().intValue()+"");
  5191.                         }
  5192.                         if(ac.getSoggettoReferente()!=null){
  5193.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, ac.getSoggettoReferente().getTipo());
  5194.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, ac.getSoggettoReferente().getNome());
  5195.                         }

  5196.                         doSetDati = true;
  5197.                     }

  5198.                     // Servizio
  5199.                     // Servizio Correlato
  5200.                     if (oggetto instanceof AccordoServizioParteSpecifica) {
  5201.                         AccordoServizioParteSpecifica asps = (AccordoServizioParteSpecifica) oggetto;
  5202.                        
  5203.                         driver.getDriverRegistroServiziDB().deleteAccordoServizioParteSpecifica(asps);

  5204.                         operazioneDaSmistare = new OperazioneDaSmistare();
  5205.                         operazioneDaSmistare.setOperazione(Operazione.del);
  5206.                         operazioneDaSmistare.setIDTable(asps.getId());
  5207.                         operazioneDaSmistare.setSuperuser(superUser);
  5208.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.servizio);
  5209.                        
  5210.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, asps.getTipoSoggettoErogatore());
  5211.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, asps.getNomeSoggettoErogatore());
  5212.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SERVIZIO, asps.getTipo());
  5213.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SERVIZIO, asps.getNome());
  5214.                         if(asps.getVersione()!=null){
  5215.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, asps.getVersione().intValue()+"");
  5216.                         }

  5217.                         doSetDati = true;

  5218.                     }

  5219.                     /***********************************************************
  5220.                      * Operazioni su Users *
  5221.                      **********************************************************/
  5222.                     // User
  5223.                     if (oggetto instanceof User) {
  5224.                         User user = (User) oggetto;
  5225.                         driver.getDriverUsersDB().deleteUser(user);
  5226.                         doSetDati = false;
  5227.                     }

  5228.                     /***********************************************************
  5229.                      * Operazioni su Audit *
  5230.                      **********************************************************/
  5231.                     // Filtro
  5232.                     if (oggetto instanceof Filtro) {
  5233.                         Filtro filtro = (Filtro) oggetto;
  5234.                         driver.getDriverAuditDB().deleteFiltro(filtro);
  5235.                         doSetDati = false;
  5236.                     }

  5237.                     // Operation
  5238.                     if (oggetto instanceof org.openspcoop2.web.lib.audit.log.Operation) {
  5239.                         org.openspcoop2.web.lib.audit.log.Operation auditOp =
  5240.                                 (org.openspcoop2.web.lib.audit.log.Operation) oggetto;
  5241.                         driver.getDriverAuditDBAppender().deleteOperation(auditOp);
  5242.                         doSetDati = false;
  5243.                     }
  5244.                    
  5245.                     /***********************************************************
  5246.                      * Operazioni su Controllo Traffico *
  5247.                      **********************************************************/
  5248.                     // Configurazione Policy
  5249.                     if(oggetto instanceof ConfigurazionePolicy) {
  5250.                         ConfigurazionePolicy policy = (ConfigurazionePolicy) oggetto;
  5251.                         driver.deleteConfigurazionePolicy(policy);
  5252.                         doSetDati = false;
  5253.                     }
  5254.                    
  5255.                     // Attivazione Policy
  5256.                     if(oggetto instanceof AttivazionePolicy) {
  5257.                         AttivazionePolicy policy = (AttivazionePolicy) oggetto;
  5258.                         // Il file importato potrebbe avere un identificativo diverso da quello effettivamente salvato
  5259.                         if(policy.getAlias()==null) {
  5260.                             driver.deleteAttivazionePolicy(policy);
  5261.                         }
  5262.                         else {
  5263.                             try {
  5264.                                 AttivazionePolicy att = driver.getPolicyByAlias(policy.getAlias(),
  5265.                                         (policy.getFiltro()!=null) ? policy.getFiltro().getRuoloPorta() : null,
  5266.                                         (policy.getFiltro()!=null) ? policy.getFiltro().getNomePorta() : null);
  5267.                                 driver.deleteAttivazionePolicy(att);
  5268.                             }catch(DriverControlStationNotFound notFound) {
  5269.                                 // ignore
  5270.                             }
  5271.                         }
  5272.                         doSetDati = false;
  5273.                        
  5274.                         updateProprietaOggettoPorta(policy, superUser, driver);
  5275.                     }
  5276.                    
  5277.                     /***********************************************************
  5278.                      * Operazioni su Generic Properties *
  5279.                      **********************************************************/
  5280.                     // Generic Propertie
  5281.                     if(oggetto instanceof GenericProperties) {
  5282.                         GenericProperties genericProperties = (GenericProperties) oggetto;
  5283.                         driver.getDriverConfigurazioneDB().deleteGenericProperties(genericProperties);
  5284.                         doSetDati = false;
  5285.                     }
  5286.                    
  5287.                     /***********************************************************
  5288.                      * Operazioni su Registro Plugin *
  5289.                      **********************************************************/
  5290.                     // Registro Plugin
  5291.                     if(oggetto instanceof RegistroPlugin) {
  5292.                         RegistroPlugin registroPlugin = (RegistroPlugin) oggetto;
  5293.                         driver.getDriverConfigurazioneDB().deleteRegistroPlugin(registroPlugin);
  5294.                         doSetDati = false;
  5295.                     }
  5296.                    
  5297.                     // Registro Plugin Archivio
  5298.                     if(oggetto instanceof RegistroPluginArchivio) {
  5299.                         RegistroPluginArchivio registroPlugin = (RegistroPluginArchivio) oggetto;
  5300.                         driver.getDriverConfigurazioneDB().deleteRegistroPluginArchivio(registroPlugin.getNomePlugin(), registroPlugin);
  5301.                         doSetDati = false;
  5302.                     }
  5303.                    
  5304.                     // Plugin Classi
  5305.                     if(oggetto instanceof Plugin) {
  5306.                         Plugin plugin = (Plugin) oggetto;
  5307.                         driver.deletePluginClassi(plugin);
  5308.                         doSetDati = false;
  5309.                     }
  5310.                    
  5311.                     /***********************************************************
  5312.                      * Operazioni su Allarmi *
  5313.                      **********************************************************/
  5314.                     // Allarmi
  5315.                     if(oggetto instanceof Allarme) {
  5316.                         Allarme allarme = (Allarme) oggetto;
  5317.                         // Il file importato potrebbe avere un identificativo diverso da quello effettivamente salvato
  5318.                         if(allarme.getAlias()==null) {
  5319.                             driver.deleteAllarme(allarme);
  5320.                            
  5321.                             updateProprietaOggettoPorta(allarme, superUser, driver);
  5322.                         }
  5323.                         else {
  5324.                             try {
  5325.                                 Allarme all = driver.getAllarmeByAlias(allarme.getAlias(),
  5326.                                         (allarme.getFiltro()!=null) ? allarme.getFiltro().getRuoloPorta() : null,
  5327.                                         (allarme.getFiltro()!=null) ? allarme.getFiltro().getNomePorta() : null);
  5328.                                 driver.deleteAllarme(all);
  5329.                                
  5330.                                 updateProprietaOggettoPorta(all, superUser, driver);
  5331.                             }catch(DriverControlStationNotFound notFound) {
  5332.                                 // ignore
  5333.                             }
  5334.                         }
  5335.                         doSetDati = false;
  5336.                     }
  5337.                    
  5338.                     /***********************************************************
  5339.                      * Extended *
  5340.                      **********************************************************/
  5341.                     if(extendedBean!=null && extendedServlet!=null){
  5342.                         extendedServlet.performDelete(con, oggetto, extendedBean);
  5343.                     }
  5344.                    
  5345.                     /***********************************************************
  5346.                      * Operazioni su Remote Store Keys *
  5347.                      **********************************************************/
  5348.                     // RemoteStoreKeys
  5349.                     if(oggetto instanceof RemoteStoreKeyEntry) {
  5350.                         RemoteStoreKeyEntry entry = (RemoteStoreKeyEntry) oggetto;
  5351.                         RemoteStoreProviderDriverUtils.deleteRemoteStoreKeyEntry(driver.getDriverConfigurazioneDB(), entry.getIdRemoteStore(), entry.getId());
  5352.                         doSetDati = false;
  5353.                     }
  5354.                                        
  5355.                     break;

  5356.                 default:
  5357.                     // Unkown operation type
  5358.                     throw new ControlStationCoreException("[ControlStationCore::performOperation] Unkown operation type :" + operationType);

  5359.                 }// fine switch

  5360.                 // inserisco l'operazione nella lista
  5361.                 if (doSetDati) {
  5362.                     operazioneDaSmistareList.add(operazioneDaSmistare);
  5363.                 }

  5364.             }// chiudo for

  5365.             if (doSetDati && smista) {
  5366.                 /* Inoltro ogni operazione nella coda dello smistatore */

  5367.                 // controllo su idTable
  5368.                 for (OperazioneDaSmistare operazione : operazioneDaSmistareList) {
  5369.                     if ((operazione == null) || (operazione.getIDTable() <= 0)) {
  5370.                         // se ci sono degli errori faccio il rollback
  5371.                         ControlStationCore.logError("[ControlStationCore::performOperation] Operazione da smistare non valida.");

  5372.                         // il rollback viene gestito da dal blocco di catch
  5373.                         throw new ControlStationCoreException("[ControlStationCore::performOperation]Operazione da smistare non valida.");
  5374.                     } else {
  5375.                         ControlStationJMSCore.setDati(operazione, this.smistatoreQueue, this.cfName, this.cfProp);
  5376.                     }
  5377.                 }

  5378.             }

  5379.             // Prima di committare provo a eseguire lo script se previsto
  5380.             if(pddGestore!=null && !this.isSinglePdD()){
  5381.                 String tipoPdd = pddGestore.getTipo();
  5382.                 if (tipoPdd != null && PddTipologia.OPERATIVO.toString().equals(tipoPdd) &&
  5383.                     (this.getSincronizzazionePddEngineEnabled_scriptShell_Path()!=null) &&
  5384.                     (CostantiControlStation.PERFORM_OPERATION_CREATE == pddGestoreTipoOperazione ||
  5385.                             CostantiControlStation.PERFORM_OPERATION_DELETE == pddGestoreTipoOperazione)
  5386.                     ){
  5387.                     ScriptInvoker scriptInvoker = new ScriptInvoker(this.getSincronizzazionePddEngineEnabled_scriptShell_Path());
  5388.                     String tipoOperazione = null;
  5389.                     if (CostantiControlStation.PERFORM_OPERATION_CREATE == pddGestoreTipoOperazione){
  5390.                         tipoOperazione = CostantiControlStation.SCRIPT_PERFORM_OPERATION_CREATE;
  5391.                     }else{
  5392.                         tipoOperazione = CostantiControlStation.SCRIPT_PERFORM_OPERATION_DELETE;
  5393.                     }
  5394.                     String nomeCoda = this.getSincronizzazionePddEngineEnabled_prefissoNomeCodaConfigurazionePdd() + pddGestore.getNome();
  5395.                     scriptInvoker.run(tipoOperazione,nomeCoda,this.getSincronizzazionePddEngineEnabled_scriptShell_Args());
  5396.                     String msg = "Invocazione script ["+this.getSincronizzazionePddEngineEnabled_scriptShell_Path()+"] ha ritornato un codice di uscita ["+scriptInvoker.getExitValue()+
  5397.                             "] (Param1:"+tipoOperazione+" Param2:"+nomeCoda+" Param3:"+this.getSincronizzazionePddEngineEnabled_scriptShell_Args()+
  5398.                             ").\nOutputStream: "+scriptInvoker.getOutputStream()+"\nErrorStream: "+scriptInvoker.getErrorStream();
  5399.                     if(scriptInvoker.getExitValue()!=0){
  5400.                         throw new ControlStationCoreException(msg);
  5401.                     }
  5402.                     else{
  5403.                         ControlStationCore.logDebug(msg);
  5404.                     }
  5405.                 }
  5406.             }
  5407.            
  5408.             // ogni operazione e' andata a buon fine quindi faccio il commit
  5409.             con.commit();
  5410.            
  5411.             // Devo Fermare e ricreare. Potrebbero essere stati modificati dei parametri
  5412.             if(pddGestore!=null && !this.isSinglePdD()){
  5413.                 if (CostantiControlStation.PERFORM_OPERATION_CREATE == pddGestoreTipoOperazione){
  5414.                     GestorePdDInitThread.addGestore(pddGestore);
  5415.                 }
  5416.                 else if (CostantiControlStation.PERFORM_OPERATION_UPDATE == pddGestoreTipoOperazione){
  5417.                     GestorePdDInitThread.deleteGestore(pddGestore.getNome());
  5418.                     GestorePdDInitThread.addGestore(pddGestore);
  5419.                 }
  5420.                 else if (CostantiControlStation.PERFORM_OPERATION_DELETE == pddGestoreTipoOperazione){
  5421.                     GestorePdDInitThread.deleteGestore(pddGestore.getNome());  
  5422.                 }
  5423.             }

  5424.         } catch (Exception e) {
  5425.             ControlStationCore.logError(e.getMessage(),e);

  5426.             try {
  5427.                 ControlStationCore.logDebug("[ControlStationCore::performOperation] rollback on error :" + e.getMessage(), e);
  5428.                 if(con!=null)
  5429.                     con.rollback();
  5430.             } catch (Exception ex) {
  5431.                 // ignore
  5432.             }

  5433.             throw new ControlStationCoreException(e.getMessage(),e);
  5434.         } finally {
  5435.             // qui posso riabilitare l'auto commit
  5436.             // e rilasciare la connessione
  5437.             try {
  5438.                 if(con!=null) {
  5439.                     con.setAutoCommit(true);
  5440.                     ControlStationCore.dbM.releaseConnection(con);
  5441.                 }
  5442.             } catch (Exception e) {
  5443.                 // ignore
  5444.             }
  5445.         }

  5446.     }

  5447.     public void performOperationMultiTypes(String superUser, boolean smista,int[] operationTypes,Object ... oggetti) throws DriverConfigurazioneNotFound, DriverConfigurazioneException, DriverRegistroServiziNotFound, DriverControlStationException, DriverRegistroServiziException, ControlStationCoreException, UtilsException {
  5448.         String nomeMetodo = "performOperationIbrido";
  5449.         ControlStationCore.logInfo(getPrefixMethod(nomeMetodo)+"performing operation on objects " + this.getClassNames(oggetti));
  5450.         Tipologia[] tipoOperazione = new Tipologia[oggetti.length];
  5451.         for (int i = 0; i < oggetti.length; i++) {
  5452.             if(operationTypes[i]==CostantiControlStation.PERFORM_OPERATION_CREATE) {
  5453.                 tipoOperazione[i] = Tipologia.ADD;
  5454.             }
  5455.             else if(operationTypes[i]==CostantiControlStation.PERFORM_OPERATION_UPDATE) {
  5456.                 tipoOperazione[i] = Tipologia.CHANGE;
  5457.             }
  5458.             else {
  5459.                 tipoOperazione[i] = Tipologia.DEL;
  5460.             }
  5461.         }

  5462.         this.cryptPassword(tipoOperazione, oggetti);
  5463.        
  5464.         IDOperazione [] idOperazione = null;
  5465.         boolean auditDisabiltato = false;
  5466.         try{
  5467.             idOperazione = this.performAuditRequest(tipoOperazione, superUser, oggetti);
  5468.         }catch(AuditDisabilitatoException disabilitato){
  5469.             auditDisabiltato = true;
  5470.         }
  5471.         try{
  5472.             this.performOperation(operationTypes, superUser, smista, oggetti);
  5473.             if(!auditDisabiltato){
  5474.                 this.performAuditComplete(idOperazione, tipoOperazione, superUser, oggetti);
  5475.             }
  5476.         }catch(Exception e){
  5477.             if(!auditDisabiltato){
  5478.                 this.performAuditError(idOperazione, e.getMessage(), tipoOperazione, superUser, oggetti);
  5479.             }
  5480.             throw e;
  5481.         }

  5482.         ControlStationCore.logInfo(getPrefixMethod(nomeMetodo)+"performed operation on objects " + this.getClassNames(oggetti));
  5483.     }

  5484.     /**
  5485.      * Crea un nuovo oggetto nella govwayConsole e si occupa di inoltrare
  5486.      * l'operazione nella coda dello Smistatore
  5487.      * @throws UtilsException
  5488.      */
  5489.     public void performCreateOperation(String superUser, boolean smista, Object ... oggetti) throws DriverConfigurazioneNotFound, DriverConfigurazioneException, DriverRegistroServiziNotFound, DriverControlStationException, DriverRegistroServiziException, ControlStationCoreException, UtilsException {
  5490.         String nomeMetodo = "performCreateOperation";
  5491.         String operationType = "CREATE";
  5492.         ControlStationCore.logInfo(getPrefixMethod(nomeMetodo)+"performing operation type [" + operationType + "] on objects " + this.getClassNames(oggetti));
  5493.         int[] operationTypes = new int[oggetti.length];
  5494.         for (int i = 0; i < oggetti.length; i++) {
  5495.             operationTypes[i] = CostantiControlStation.PERFORM_OPERATION_CREATE;
  5496.         }
  5497.         Tipologia[] tipoOperazione = new Tipologia[oggetti.length];
  5498.         for (int i = 0; i < oggetti.length; i++) {
  5499.             tipoOperazione[i] = Tipologia.ADD;
  5500.         }

  5501.         this.cryptPassword(tipoOperazione, oggetti);
  5502.        
  5503.         this.setProprietaOggetto(superUser, tipoOperazione, oggetti);
  5504.        
  5505.         IDOperazione [] idOperazione = null;
  5506.         boolean auditDisabiltato = false;
  5507.         try{
  5508.             idOperazione = this.performAuditRequest(tipoOperazione, superUser, oggetti);
  5509.         }catch(AuditDisabilitatoException disabilitato){
  5510.             auditDisabiltato = true;
  5511.         }
  5512.         try{
  5513.             this.performOperation(operationTypes, superUser, smista, oggetti);
  5514.             if(!auditDisabiltato){
  5515.                 this.performAuditComplete(idOperazione, tipoOperazione, superUser, oggetti);
  5516.             }
  5517.         }catch(Exception e){
  5518.             if(!auditDisabiltato){
  5519.                 this.performAuditError(idOperazione, e.getMessage(), tipoOperazione, superUser, oggetti);
  5520.             }
  5521.             throw e;
  5522.         }

  5523.         ControlStationCore.logInfo(getPrefixMethod(nomeMetodo)+"performed operation type [" + operationType + "] on objects " + this.getClassNames(oggetti));
  5524.     }

  5525.     /**
  5526.      * Aggiorna un oggetto nella govwayConsole e si occupa di inoltrare
  5527.      * l'operazione nella coda dello Smistatore
  5528.      * @throws UtilsException
  5529.      */
  5530.     public void performUpdateOperation(String superUser, boolean smista, Object ... oggetti) throws DriverConfigurazioneNotFound, DriverConfigurazioneException, DriverRegistroServiziNotFound, DriverControlStationException, DriverRegistroServiziException, ControlStationCoreException, UtilsException {
  5531.         String nomeMetodo = "performUpdateOperation";
  5532.         String operationType = "UPDATE";

  5533.         ControlStationCore.logInfo(getPrefixMethod(nomeMetodo)+"performing operation type [" + operationType + "] on objects " + this.getClassNames(oggetti));
  5534.         int[] operationTypes = new int[oggetti.length];
  5535.         for (int i = 0; i < oggetti.length; i++) {
  5536.             operationTypes[i] = CostantiControlStation.PERFORM_OPERATION_UPDATE;
  5537.         }
  5538.         Tipologia[] tipoOperazione = new Tipologia[oggetti.length];
  5539.         for (int i = 0; i < oggetti.length; i++) {
  5540.             tipoOperazione[i] = Tipologia.CHANGE;
  5541.         }

  5542.         this.cryptPassword(tipoOperazione, oggetti);
  5543.        
  5544.         this.setProprietaOggetto(superUser, tipoOperazione, oggetti);
  5545.        
  5546.         IDOperazione [] idOperazione = null;
  5547.         boolean auditDisabiltato = false;
  5548.         try{
  5549.             idOperazione = this.performAuditRequest(tipoOperazione, superUser, oggetti);
  5550.         }catch(AuditDisabilitatoException disabilitato){
  5551.             auditDisabiltato = true;
  5552.         }
  5553.         try{
  5554.             this.performOperation(operationTypes, superUser, smista, oggetti);
  5555.             if(!auditDisabiltato){
  5556.                 this.performAuditComplete(idOperazione, tipoOperazione, superUser, oggetti);
  5557.             }
  5558.         }catch(Exception e){
  5559.             if(!auditDisabiltato){
  5560.                 this.performAuditError(idOperazione, e.getMessage(), tipoOperazione, superUser, oggetti);
  5561.             }
  5562.             throw e;
  5563.         }

  5564.         ControlStationCore.logInfo(getPrefixMethod(nomeMetodo)+"performed operation type [" + operationType + "] on objects " + this.getClassNames(oggetti));

  5565.     }

  5566.     /**
  5567.      * Cancella un oggetto nella govwayConsole e si occupa di inoltrare
  5568.      * l'operazione nella coda dello Smistatore
  5569.      * @throws UtilsException
  5570.      */
  5571.     public void performDeleteOperation(String superUser, boolean smista, Object ... oggetti) throws DriverConfigurazioneNotFound, DriverConfigurazioneException, DriverRegistroServiziNotFound, DriverControlStationException, DriverRegistroServiziException, ControlStationCoreException, UtilsException {
  5572.         String nomeMetodo = "performDeleteOperation";
  5573.         String operationType = "DELETE";

  5574.         ControlStationCore.logInfo(getPrefixMethod(nomeMetodo)+"performing operation type [" + operationType + "] on objects " + this.getClassNames(oggetti));
  5575.         int[] operationTypes = new int[oggetti.length];
  5576.         for (int i = 0; i < oggetti.length; i++) {
  5577.             operationTypes[i] = CostantiControlStation.PERFORM_OPERATION_DELETE;
  5578.         }
  5579.         Tipologia[] tipoOperazione = new Tipologia[oggetti.length];
  5580.         for (int i = 0; i < oggetti.length; i++) {
  5581.             tipoOperazione[i] = Tipologia.DEL;
  5582.         }
  5583.        
  5584.         this.cryptPassword(tipoOperazione, oggetti);
  5585.        
  5586.         IDOperazione [] idOperazione = null;
  5587.         boolean auditDisabiltato = false;
  5588.         try{
  5589.             idOperazione = this.performAuditRequest(tipoOperazione, superUser, oggetti);
  5590.         }catch(AuditDisabilitatoException disabilitato){
  5591.             auditDisabiltato = true;
  5592.         }
  5593.         try{
  5594.             this.performOperation(operationTypes, superUser, smista, oggetti);
  5595.             if(!auditDisabiltato){
  5596.                 this.performAuditComplete(idOperazione, tipoOperazione, superUser, oggetti);
  5597.             }
  5598.         }catch(Exception e){
  5599.             if(!auditDisabiltato){
  5600.                 this.performAuditError(idOperazione, e.getMessage(), tipoOperazione, superUser, oggetti);
  5601.             }
  5602.             throw e;
  5603.         }

  5604.         ControlStationCore.logInfo(getPrefixMethod(nomeMetodo)+"performed operation type [" + operationType + "] on objects " + this.getClassNames(oggetti));

  5605.     }

  5606.     private <T> ArrayList<String> getClassNames(T[] array) {
  5607.         ArrayList<String> c = new ArrayList<>();
  5608.         for (T type : array) {
  5609.             c.add(type.getClass().getName());
  5610.         }

  5611.         return c;
  5612.     }



  5613.     /* ************** VERIFICA CONSISTENZA PROTOCOLLI ***************** */

  5614.     private static Boolean verificaConsistenzaProtocolli = null;
  5615.    
  5616.     private static void verificaConsistenzaProtocolli(ControlStationCore core) {
  5617.         if(verificaConsistenzaProtocolli==null) {
  5618.             _verificaConsistenzaProtocolli(core);
  5619.         }
  5620.     }
  5621.     private static synchronized void _verificaConsistenzaProtocolli(ControlStationCore core) {
  5622.         if(verificaConsistenzaProtocolli==null) {
  5623.             StringBuilder verificaConfigurazioneProtocolliBuilder = new StringBuilder();
  5624.             boolean configurazioneCorretta = core.verificaConfigurazioneProtocolliRispettoSoggettiDefault(verificaConfigurazioneProtocolliBuilder);
  5625.            
  5626.             if(!configurazioneCorretta) {
  5627.                 log.error("il controllo di consistenza tra Profili di Interoperabilitร  attivati e la configurazione del Gateway ha rilevato inconsistenze: \n"+verificaConfigurazioneProtocolliBuilder.toString());
  5628.             }
  5629.            
  5630.             verificaConsistenzaProtocolli = true;
  5631.         }
  5632.     }
  5633.    
  5634.     public boolean verificaConfigurazioneProtocolliRispettoSoggettiDefault(StringBuilder error) {
  5635.        
  5636.         try {
  5637.             ProtocolFactoryManager protocolFactoryManager = ProtocolFactoryManager.getInstance();
  5638.            
  5639.             // Prima verifico che per ogni protocollo a bordo dell'archivio console vi sia il corrispettivo soggetto di default
  5640.             // Localizza eventuali protocolli aggiunti senza avere aggiunto anche il sql relativo al soggetto nel database
  5641.             Enumeration<String> protocolNames = protocolFactoryManager.getProtocolFactories().keys();
  5642.             while (protocolNames.hasMoreElements()) {
  5643.                 String protocolName = (String) protocolNames.nextElement();
  5644.                 IDSoggetto idSoggetto = this.getSoggettoOperativoDefault(null, protocolName);
  5645.                 if(idSoggetto==null || idSoggetto.getTipo()==null || idSoggetto.getNome()==null) {
  5646.                     if(error.length()>0) {
  5647.                         error.append("\n");
  5648.                     }
  5649.                     error.append("Configurazione non corretta; non รจ stato rilevato un soggetto di default per il profilo di interoperabilitร  '"+NamingUtils.getLabelProtocollo(protocolName)+"'.");
  5650.                    
  5651.                 }
  5652.             }
  5653.            
  5654.             if(error.length()>0) {
  5655.                 error.append("\n");
  5656.                 error.append("Se sono stati aggiunti nuovi profili di interoperabilitร  rispetto alla precedente installazione, devono essere eseguiti gli script sql generati dall'installer 'dist/sql/profili/GovWay_upgrade_initialize-profilo-<new-profile>.sql");
  5657.             }
  5658.            
  5659.             if(error.length()<=0) {
  5660.                 // se non vi sono stati errori, recupero tutti i tipi di soggetto di default dal database e verifico che vi sia il protocollo nell'archivio
  5661.                 // Localizza eventuali aggiornamenti dove sono stati inseriti meno protocolli di quante configurazioni sono presenti sul database.
  5662.                 List<IDSoggetto> soggettiDefault = this.getSoggettiDefault();
  5663.                 if(soggettiDefault==null || soggettiDefault.isEmpty()) {
  5664.                     error.append("Configurazione non corretta; non รจ stato rilevato alcun soggetto di default");
  5665.                 }
  5666.                 else {
  5667.                     Map<String, List<IDSoggetto>> defaultByProtocol = new HashMap<String, List<IDSoggetto>>();
  5668.                     List<String> tipi_con_protocolli_censiti = protocolFactoryManager.getOrganizationTypesAsList();
  5669.                     for (IDSoggetto idSoggetto : soggettiDefault) {
  5670.                         if(!tipi_con_protocolli_censiti.contains(idSoggetto.getTipo())) {
  5671.                             error.append("Configurazione non corretta; Non esiste un profilo di interoperabilitร  che possa gestire il soggetto di default '"+idSoggetto.toString()+"' rilevato.");
  5672.                         }
  5673.                         String protocolName = protocolFactoryManager.getProtocolByOrganizationType(idSoggetto.getTipo());
  5674.                         List<IDSoggetto> l = null;
  5675.                         if(defaultByProtocol.containsKey(protocolName)) {
  5676.                             l = defaultByProtocol.get(protocolName);
  5677.                         }
  5678.                         else {
  5679.                             l = new ArrayList<IDSoggetto>();
  5680.                             defaultByProtocol.put(protocolName, l);
  5681.                         }
  5682.                         l.add(idSoggetto);
  5683.                     }
  5684.                    
  5685.                     if(!defaultByProtocol.isEmpty()) {
  5686.                         for (String protocolName : defaultByProtocol.keySet()) {
  5687.                             List<IDSoggetto> l = defaultByProtocol.get(protocolName);
  5688.                             if(l.size()>1) {
  5689.                                 if(error.length()>0) {
  5690.                                     error.append("\n");
  5691.                                 }
  5692.                                 StringBuilder sbSoggetti = new StringBuilder();
  5693.                                 for (IDSoggetto id : l) {
  5694.                                     if(sbSoggetti.length()>0) {
  5695.                                         sbSoggetti.append(", ");
  5696.                                     }
  5697.                                     sbSoggetti.append(NamingUtils.getLabelSoggetto(id));
  5698.                                 }
  5699.                                 error.append("Sono stati riscontrati piรน soggetti di default associati al profilo di interoperabilitร  '"+NamingUtils.getLabelProtocollo(protocolName)+"': "+sbSoggetti.toString());    
  5700.                             }
  5701.                         }
  5702.                     }
  5703.                 }
  5704.             }
  5705.            
  5706.         }catch(Exception e) {
  5707.             if(error.length()>0) {
  5708.                 error.append("\n");
  5709.             }
  5710.             error.append("Verifica fallita; "+e.getMessage());
  5711.         }
  5712.        
  5713.         return error.length()<=0;
  5714.     }




  5715.     /* ************** AUDIT ***************** */

  5716.     // Gestione audit
  5717.     private static AuditAppender auditManager = null;
  5718.     private static Semaphore semaphoreAuditLock = new Semaphore("ControlStationCoreAudit");
  5719.     public static void clearAuditManager(){
  5720.         SemaphoreLock lock = ControlStationCore.semaphoreAuditLock.acquireThrowRuntime("clearAuditManager");
  5721.         try {
  5722.             ControlStationCore.auditManager = null;
  5723.         }finally {
  5724.             ControlStationCore.semaphoreAuditLock.release(lock, "clearAuditManager");
  5725.         }
  5726.     }
  5727.     private static synchronized void initializeAuditManager(String tipoDatabase) throws DriverControlStationException{
  5728.         SemaphoreLock lock = ControlStationCore.semaphoreAuditLock.acquireThrowRuntime("initializeAuditManager");
  5729.         try {
  5730.             if(ControlStationCore.auditManager==null){
  5731.                 ControlStationCore.auditManager= new AuditAppender();

  5732.                 Connection con = null;
  5733.                 org.openspcoop2.web.lib.audit.dao.Configurazione configurazioneAuditing = null;
  5734.                 try{
  5735.                     con = ControlStationCore.dbM.getConnection();
  5736.                     if (con == null)
  5737.                         throw new Exception("Connessione non disponibile");

  5738.                     DriverAudit driverAudit = new DriverAudit(con,tipoDatabase);
  5739.                     configurazioneAuditing = driverAudit.getConfigurazione();
  5740.                     ControlStationCore.checkAuditDBAppender(configurazioneAuditing, tipoDatabase);

  5741.                 }catch(Exception e){
  5742.                     throw new DriverControlStationException("Inizializzazione auditManager non riuscita (LetturaConfigurazione): "+e.getMessage(),e);
  5743.                 }finally{
  5744.                     try{
  5745.                         JDBCUtilities.closeConnection(DriverControlStationDB.getCheckLogger(), con, DriverControlStationDB.isCheckAutocommit(), DriverControlStationDB.isCheckIsClosed());
  5746.                     }catch(Exception e){
  5747.                         // close
  5748.                     }
  5749.                 }

  5750.                 try{
  5751.                     ControlStationCore.auditManager.initializeAudit(configurazioneAuditing, IDBuilder.getIDBuilder());
  5752.                 }catch(Exception e){
  5753.                     throw new DriverControlStationException("Inizializzazione auditManager non riuscita: "+e.getMessage(),e);
  5754.                 }
  5755.             }
  5756.         }finally {
  5757.             ControlStationCore.semaphoreAuditLock.release(lock, "initializeAuditManager");
  5758.         }
  5759.     }
  5760.     public static synchronized void updateAuditManagerConfiguration(String tipoDatabase) throws DriverControlStationException{
  5761.         if(ControlStationCore.auditManager==null){
  5762.             throw new DriverControlStationException("AuditManager non inizializzato");
  5763.         }
  5764.         SemaphoreLock lock = ControlStationCore.semaphoreAuditLock.acquireThrowRuntime("updateAuditManagerConfiguration");
  5765.         try {
  5766.             Connection con = null;
  5767.             org.openspcoop2.web.lib.audit.dao.Configurazione configurazioneAuditing = null;
  5768.             try{
  5769.                 con = ControlStationCore.dbM.getConnection();
  5770.                 if (con == null)
  5771.                     throw new DriverControlStationException("Connessione non disponibile");

  5772.                 DriverAudit driverAudit = new DriverAudit(con,tipoDatabase);
  5773.                 configurazioneAuditing = driverAudit.getConfigurazione();
  5774.                 ControlStationCore.checkAuditDBAppender(configurazioneAuditing, tipoDatabase);

  5775.             }catch(Exception e){
  5776.                 throw new DriverControlStationException("Aggiornamento configurazione auditManager non riuscita (LetturaConfigurazione): "+e.getMessage(),e);
  5777.             }finally{
  5778.                 try{
  5779.                     JDBCUtilities.closeConnection(DriverControlStationDB.getCheckLogger(), con, DriverControlStationDB.isCheckAutocommit(), DriverControlStationDB.isCheckIsClosed());
  5780.                 }catch(Exception e){
  5781.                     // close
  5782.                 }
  5783.             }

  5784.             try{
  5785.                 ControlStationCore.auditManager.updateConfigurazioneAuditing(configurazioneAuditing);
  5786.             }catch(Exception e){
  5787.                 throw new DriverControlStationException("Aggiornamento configurazione auditManager non riuscita: "+e.getMessage(),e);
  5788.             }
  5789.         }finally {
  5790.             ControlStationCore.semaphoreAuditLock.release(lock, "updateAuditManagerConfiguration");
  5791.         }
  5792.     }
  5793.     private static void checkAuditDBAppender(org.openspcoop2.web.lib.audit.dao.Configurazione configurazioneAuditing,String tipoDatabase){
  5794.         for(int i=0; i<configurazioneAuditing.sizeAppender(); i++){
  5795.             Appender appender = configurazioneAuditing.getAppender(i);
  5796.             if(AuditDBAppender.class.getName().equals(appender.getClassName())){
  5797.                 boolean findDBKeyword = false;
  5798.                 for(int j=0; j<appender.sizeProperties(); j++){
  5799.                     if("@DB_INTERFACCIA@".equals(appender.getProperty(j).getValue())){
  5800.                         findDBKeyword = true;
  5801.                     }
  5802.                 }
  5803.                 if(findDBKeyword){
  5804.                     while(appender.sizeProperties()>0){
  5805.                         appender.removeProperty(0);
  5806.                     }
  5807.                     AppenderProperty apDS = new AppenderProperty();
  5808.                     apDS.setName("datasource");
  5809.                     apDS.setValue(ControlStationCore.dbM.getDataSourceName());
  5810.                     appender.addProperty(apDS);
  5811.                     AppenderProperty apTipoDatabase = new AppenderProperty();
  5812.                     apTipoDatabase.setName("tipoDatabase");
  5813.                     apTipoDatabase.setValue(tipoDatabase);
  5814.                     appender.addProperty(apTipoDatabase);
  5815.                     Properties contextDS = ControlStationCore.dbM.getDataSourceContext();
  5816.                     if(contextDS.size()>0){
  5817.                         Enumeration<?> keys = contextDS.keys();
  5818.                         while(keys.hasMoreElements()){
  5819.                             String key = (String) keys.nextElement();
  5820.                             AppenderProperty apCTX = new AppenderProperty();
  5821.                             apCTX.setName(key);
  5822.                             apCTX.setValue(contextDS.getProperty(key));
  5823.                             appender.addProperty(apCTX);
  5824.                         }
  5825.                     }
  5826.                 }
  5827.             }
  5828.         }
  5829.     }  
  5830.     public static AuditAppender getAuditManagerInstance(String tipoDatabase)throws DriverControlStationException{
  5831.         if(ControlStationCore.auditManager==null){
  5832.             ControlStationCore.initializeAuditManager(tipoDatabase);
  5833.         }
  5834.         return ControlStationCore.auditManager;
  5835.     }

  5836.     public void performAuditLogin(String user){

  5837.         String msg = user+":"+"completed:LOGIN";

  5838.         // loggo tramite auditManager
  5839.         boolean auditAbilitato = true;
  5840.         try{
  5841.             AuditAppender auditManager = ControlStationCore.getAuditManagerInstance(this.tipoDB);
  5842.             auditManager.registraOperazioneAccesso(Tipologia.LOGIN, user,msg, this.isAuditingRegistrazioneElementiBinari,
  5843.                     this.driverBYOKUtilities);
  5844.         }catch(AuditDisabilitatoException disabilitato){
  5845.             ControlStationCore.logDebug("Auditing dell'operazione ["+msg+"] non effettuato: "+disabilitato.getMessage());
  5846.             auditAbilitato = false;
  5847.         }catch(Exception e){
  5848.             ControlStationCore.logError("Auditing dell'operazione ["+msg+"] non riuscito: "+e.getMessage(),e);
  5849.         }

  5850.         // loggo su file dell'interfaccia (dopo chiamata ad auditManager, in modo che viene registrato il msg solo se abilitato l'audit)
  5851.         if(auditAbilitato)
  5852.             ControlStationCore.logInfo(msg);
  5853.     }

  5854.     public void performAuditLogout(String user){

  5855.         String msg = user+":"+"completed:LOGOUT";

  5856.         // loggo tramite auditManager
  5857.         boolean auditAbilitato = true;
  5858.         try{
  5859.             AuditAppender auditManager = ControlStationCore.getAuditManagerInstance(this.tipoDB);
  5860.             auditManager.registraOperazioneAccesso(Tipologia.LOGOUT, user,msg, this.isAuditingRegistrazioneElementiBinari,
  5861.                     this.driverBYOKUtilities);

  5862.         }catch(AuditDisabilitatoException disabilitato){
  5863.             ControlStationCore.logDebug("Auditing dell'operazione ["+msg+"] non effettuato: "+disabilitato.getMessage());
  5864.             auditAbilitato = false;
  5865.         }catch(Exception e){
  5866.             ControlStationCore.logError("Auditing dell'operazione ["+msg+"] non riuscito: "+e.getMessage(),e);
  5867.         }

  5868.         // loggo su file dell'interfaccia (dopo chiamata ad auditManager, in modo che viene registrato il msg solo se abilitato l'audit)
  5869.         if(auditAbilitato)
  5870.             ControlStationCore.logInfo(msg);
  5871.     }

  5872.     public IDOperazione[] performAuditRequest(Tipologia[] operationTypes, String user, Object ... obj) throws AuditDisabilitatoException{

  5873.         IDOperazione[] idOperazione = new IDOperazione[obj.length];
  5874.         for (int i = 0; i < obj.length; i++) {
  5875.             Tipologia tipoOperazione = operationTypes[i];
  5876.             Object oggetto = obj[i];

  5877.             if(oggetto instanceof WrapperExtendedBean){
  5878.                 WrapperExtendedBean w = (WrapperExtendedBean) oggetto;
  5879.                 if(w.isManageOriginalBean()){
  5880.                     oggetto = w.getOriginalBean();  
  5881.                 }
  5882.                 // altrimenti viene gestito come IExtendedBean
  5883.                 else{
  5884.                     oggetto = w.getExtendedBean();
  5885.                 }
  5886.             }
  5887.            
  5888.             String msg = null;
  5889.             try{
  5890.                 msg = this.generaMsgAuditing(user, Stato.REQUESTING, tipoOperazione, oggetto);
  5891.             }catch(Exception e){
  5892.                 ControlStationCore.logError("GenerazioneIDOperazione non riuscita: "+e.getMessage(),e);
  5893.                 msg = "GenerazioneIDOperazione non riuscita: "+e.getMessage();
  5894.             }

  5895.             // loggo tramite auditManager
  5896.             boolean auditAbilitato = true;
  5897.             try{
  5898.                 AuditAppender auditManager = ControlStationCore.getAuditManagerInstance(this.tipoDB);

  5899.                 // clono oggetto se e' un accordo di servizio, un servizio o un accordo di cooperazione (oggetti che contengono allegati)
  5900.                 if(oggetto instanceof AccordoServizioParteComune){

  5901.                     AccordoServizioParteComune asClone = (AccordoServizioParteComune) ((AccordoServizioParteComune)oggetto).clone();
  5902.                     for(int k=0; k<asClone.sizeAllegatoList(); k++){
  5903.                         Documento d = asClone.getAllegato(k);
  5904.                         if(d.getByteContenuto()==null){
  5905.                             // Inserisco contenuto per checksum
  5906.                             d.setByteContenuto(this.readContenutoAllegato(d.getId()));
  5907.                         }
  5908.                     }
  5909.                     for(int k=0; k<asClone.sizeSpecificaSemiformaleList(); k++){
  5910.                         Documento d = asClone.getSpecificaSemiformale(k);
  5911.                         if(d.getByteContenuto()==null){
  5912.                             // Inserisco contenuto per checksum
  5913.                             d.setByteContenuto(this.readContenutoAllegato(d.getId()));
  5914.                         }
  5915.                     }
  5916.                     if(asClone.getServizioComposto()!=null){
  5917.                         for(int k=0; k<asClone.getServizioComposto().sizeSpecificaCoordinamentoList(); k++){
  5918.                             Documento d = asClone.getServizioComposto().getSpecificaCoordinamento(k);
  5919.                             if(d.getByteContenuto()==null){
  5920.                                 // Inserisco contenuto per checksum
  5921.                                 d.setByteContenuto(this.readContenutoAllegato(d.getId()));
  5922.                             }
  5923.                         }
  5924.                     }

  5925.                     idOperazione[i] = auditManager.registraOperazioneInFaseDiElaborazione(tipoOperazione, asClone, user,msg, this.isAuditingRegistrazioneElementiBinari,
  5926.                             this.driverBYOKUtilities);

  5927.                 }else if(oggetto instanceof AccordoCooperazione){

  5928.                     AccordoCooperazione acClone = (AccordoCooperazione) ((AccordoCooperazione)oggetto).clone();
  5929.                     for(int k=0; k<acClone.sizeAllegatoList(); k++){
  5930.                         Documento d = acClone.getAllegato(k);
  5931.                         if(d.getByteContenuto()==null){
  5932.                             // Inserisco contenuto per checksum
  5933.                             d.setByteContenuto(this.readContenutoAllegato(d.getId()));
  5934.                         }
  5935.                     }
  5936.                     for(int k=0; k<acClone.sizeSpecificaSemiformaleList(); k++){
  5937.                         Documento d = acClone.getSpecificaSemiformale(k);
  5938.                         if(d.getByteContenuto()==null){
  5939.                             // Inserisco contenuto per checksum
  5940.                             d.setByteContenuto(this.readContenutoAllegato(d.getId()));
  5941.                         }
  5942.                     }

  5943.                     idOperazione[i] = auditManager.registraOperazioneInFaseDiElaborazione(tipoOperazione, acClone, user,msg, this.isAuditingRegistrazioneElementiBinari,
  5944.                             this.driverBYOKUtilities);

  5945.                 }else if(oggetto instanceof AccordoServizioParteSpecifica){

  5946.                     AccordoServizioParteSpecifica sClone = (AccordoServizioParteSpecifica) ((AccordoServizioParteSpecifica)oggetto).clone();
  5947.                     for(int k=0; k<sClone.sizeAllegatoList(); k++){
  5948.                         Documento d = sClone.getAllegato(k);
  5949.                         if(d.getByteContenuto()==null){
  5950.                             // Inserisco contenuto per checksum
  5951.                             d.setByteContenuto(this.readContenutoAllegato(d.getId()));
  5952.                         }
  5953.                     }
  5954.                     for(int k=0; k<sClone.sizeSpecificaSemiformaleList(); k++){
  5955.                         Documento d = sClone.getSpecificaSemiformale(k);
  5956.                         if(d.getByteContenuto()==null){
  5957.                             // Inserisco contenuto per checksum
  5958.                             d.setByteContenuto(this.readContenutoAllegato(d.getId()));
  5959.                         }
  5960.                     }
  5961.                     for(int k=0; k<sClone.sizeSpecificaSicurezzaList(); k++){
  5962.                         Documento d = sClone.getSpecificaSicurezza(k);
  5963.                         if(d.getByteContenuto()==null){
  5964.                             // Inserisco contenuto per checksum
  5965.                             d.setByteContenuto(this.readContenutoAllegato(d.getId()));
  5966.                         }
  5967.                     }
  5968.                     for(int k=0; k<sClone.sizeSpecificaLivelloServizioList(); k++){
  5969.                         Documento d = sClone.getSpecificaLivelloServizio(k);
  5970.                         if(d.getByteContenuto()==null){
  5971.                             // Inserisco contenuto per checksum
  5972.                             d.setByteContenuto(this.readContenutoAllegato(d.getId()));
  5973.                         }
  5974.                     }

  5975.                     idOperazione[i] = auditManager.registraOperazioneInFaseDiElaborazione(tipoOperazione, sClone, user,msg, this.isAuditingRegistrazioneElementiBinari,
  5976.                             this.driverBYOKUtilities);

  5977.                 }else {
  5978.                     idOperazione[i] = auditManager.registraOperazioneInFaseDiElaborazione(tipoOperazione, oggetto, user,msg, this.isAuditingRegistrazioneElementiBinari,
  5979.                             this.driverBYOKUtilities);
  5980.                 }

  5981.             }catch(AuditDisabilitatoException disabilitato){
  5982.                 ControlStationCore.logDebug("Auditing dell'operazione ["+msg+"] non effettuato: "+disabilitato.getMessage());
  5983.                 auditAbilitato = false;
  5984.                 throw disabilitato;
  5985.             }catch(Exception e){
  5986.                 ControlStationCore.logError("Auditing dell'operazione ["+msg+"] non riuscito: "+e.getMessage(),e);
  5987.             }

  5988.             // loggo su file dell'interfaccia (dopo chiamata ad auditManager, in modo che viene registrato il msg solo se abilitato l'audit)
  5989.             if(auditAbilitato)
  5990.                 ControlStationCore.logInfo(msg);
  5991.         }
  5992.         return idOperazione;
  5993.     }

  5994.     private byte[] readContenutoAllegato(long idDocumento) throws DriverRegistroServiziException{

  5995.         Connection con = null;
  5996.         String nomeMetodo = "readContenutoAllegato";
  5997.         DriverRegistroServiziDB driver = null;
  5998.         try {
  5999.             // prendo una connessione
  6000.             con = ControlStationCore.dbM.getConnection();
  6001.             // istanzio il driver
  6002.             driver = new DriverRegistroServiziDB(con, ControlStationCore.log, this.tipoDB);

  6003.             Documento doc = driver.getDocumento(idDocumento, true);
  6004.             if(doc!=null)
  6005.                 return doc.getByteContenuto();
  6006.             else
  6007.                 return null;

  6008.         }  catch (DriverRegistroServiziException e) {
  6009.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6010.             throw e;
  6011.         } catch (Exception e) {
  6012.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6013.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e), e);
  6014.         } finally {
  6015.             ControlStationCore.dbM.releaseConnection(con);
  6016.         }
  6017.     }

  6018.     public void performAuditComplete(IDOperazione[] idOperazione,Tipologia[] operationTypes,String user, Object ... obj){

  6019.         for (int i = 0; i < obj.length; i++) {
  6020.             Tipologia tipoOperazione = operationTypes[i];
  6021.             Object oggetto = obj[i];

  6022.             //loggo su file dell'interfaccia
  6023.             String msg = null;
  6024.             try{
  6025.                 msg = this.generaMsgAuditing(user, Stato.COMPLETED, tipoOperazione, oggetto);
  6026.             }catch(Exception e){
  6027.                 ControlStationCore.logError("GenerazioneIDOperazione non riuscita: "+e.getMessage(),e);
  6028.                 msg = "GenerazioneIDOperazione non riuscita: "+e.getMessage();
  6029.             }

  6030.             // loggo tramite auditManager
  6031.             boolean auditAbilitato = true;
  6032.             try{
  6033.                 AuditAppender auditManager = ControlStationCore.getAuditManagerInstance(this.tipoDB);
  6034.                 auditManager.registraOperazioneCompletataConSuccesso(idOperazione[i],msg);

  6035.             }catch(AuditDisabilitatoException disabilitato){
  6036.                 ControlStationCore.logDebug("Auditing dell'operazione ["+msg+"] non effettuato: "+disabilitato.getMessage());
  6037.                 auditAbilitato = false;
  6038.             }catch(Exception e){
  6039.                 ControlStationCore.logError("Auditing dell'operazione ["+msg+"] non riuscito: "+e.getMessage(),e);
  6040.             }

  6041.             // loggo su file dell'interfaccia (dopo chiamata ad auditManager, in modo che viene registrato il msg solo se abilitato l'audit)
  6042.             if(auditAbilitato)
  6043.                 ControlStationCore.logInfo(msg);
  6044.         }
  6045.     }

  6046.     @SafeVarargs
  6047.     public final <Type> void performAuditError(IDOperazione[] idOperazione,String motivoErrore,Tipologia[] operationTypes,String user, Type... obj){

  6048.         for (int i = 0; i < obj.length; i++) {
  6049.             Tipologia tipoOperazione = operationTypes[i];
  6050.             Type oggetto = obj[i];

  6051.             //loggo su file dell'interfaccia
  6052.             String msg = null;
  6053.             try{
  6054.                 msg = this.generaMsgAuditing(user, Stato.ERROR, tipoOperazione, oggetto);
  6055.             }catch(Exception e){
  6056.                 ControlStationCore.logError("GenerazioneIDOperazione non riuscita: "+e.getMessage(),e);
  6057.                 msg = "GenerazioneIDOperazione non riuscita: "+e.getMessage();
  6058.             }

  6059.             // loggo tramite auditManager
  6060.             boolean auditAbilitato = true;
  6061.             try{
  6062.                 AuditAppender auditManager = ControlStationCore.getAuditManagerInstance(this.tipoDB);
  6063.                 auditManager.registraOperazioneTerminataConErrore(idOperazione[i], motivoErrore,msg);

  6064.             }catch(AuditDisabilitatoException disabilitato){
  6065.                 ControlStationCore.logDebug("Auditing dell'operazione ["+msg+"] non effettuato: "+disabilitato.getMessage());
  6066.                 auditAbilitato = false;
  6067.             }catch(Exception e){
  6068.                 ControlStationCore.logError("Auditing dell'operazione ["+msg+"] non riuscito: "+e.getMessage(),e);
  6069.             }

  6070.             // loggo su file dell'interfaccia (dopo chiamata ad auditManager, in modo che viene registrato il msg solo se abilitato l'audit)
  6071.             if(auditAbilitato)
  6072.                 ControlStationCore.logError(msg+", errore avvenuto:"+motivoErrore);
  6073.         }
  6074.     }

  6075.     private String generaMsgAuditing(String user,Stato statoOperazione,Tipologia tipoOperazione,Object oggetto) throws DriverRegistroServiziException {
  6076.         String msg = user+":"+statoOperazione.toString()+":"+tipoOperazione.toString();

  6077.         // ControlStation
  6078.         if (oggetto instanceof PdDControlStation) {
  6079.             PdDControlStation pdd = (PdDControlStation) oggetto;
  6080.             msg+=":"+oggetto.getClass().getSimpleName();
  6081.             msg+=":<"+pdd.getNome()+">";
  6082.         }
  6083.         else if(oggetto instanceof MappingFruizionePortaDelegata){
  6084.             MappingFruizionePortaDelegata mapping = (MappingFruizionePortaDelegata) oggetto;
  6085.             msg+=":"+oggetto.getClass().getSimpleName();
  6086.             StringBuilder bf = new StringBuilder();
  6087.             bf.append("FR[");
  6088.             bf.append(mapping.getIdFruitore().getTipo()+"/"+mapping.getIdFruitore().getNome());
  6089.             bf.append("] SERV[");
  6090.             bf.append(mapping.getIdServizio().toString());
  6091.             bf.append("] PD["+mapping.getIdPortaDelegata().getNome());
  6092.             bf.append("]");
  6093.             msg+=":<"+bf.toString()+">";
  6094.         }
  6095.         else if(oggetto instanceof MappingErogazionePortaApplicativa){
  6096.             MappingErogazionePortaApplicativa mapping = (MappingErogazionePortaApplicativa) oggetto;
  6097.             msg+=":"+oggetto.getClass().getSimpleName();
  6098.             StringBuilder bf = new StringBuilder();
  6099.             bf.append("SERV[");
  6100.             bf.append(mapping.getIdServizio().toString());
  6101.             bf.append("] PA["+mapping.getIdPortaApplicativa().getNome());
  6102.             bf.append("]");
  6103.             msg+=":<"+bf.toString()+">";
  6104.         }
  6105.         else if (oggetto instanceof SoggettoCtrlStat) {
  6106.             SoggettoCtrlStat soggetto = (SoggettoCtrlStat) oggetto;
  6107.             msg+=":"+oggetto.getClass().getSimpleName();
  6108.             msg+=":<"+soggetto.getTipo()+"/"+soggetto.getNome()+">";
  6109.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6110.                 String oldTipo = soggetto.getOldTipoForUpdate()!=null ? soggetto.getOldTipoForUpdate() : soggetto.getTipo();
  6111.                 String oldNome = soggetto.getOldNomeForUpdate()!=null ? soggetto.getOldNomeForUpdate() : soggetto.getNome();
  6112.                 if( (oldTipo.equals(soggetto.getTipo())==false) || (oldNome.equals(soggetto.getNome())==false) )
  6113.                     msg+=":OLD<"+oldTipo+"/"+oldNome+">";
  6114.             }
  6115.         }

  6116.         // RegistroServizi
  6117.        
  6118.         // Gruppo
  6119.         else if (oggetto instanceof Gruppo) {
  6120.             Gruppo g = (Gruppo) oggetto;
  6121.             msg+=":"+oggetto.getClass().getSimpleName();
  6122.             msg+=":<"+g.getNome()+">";
  6123.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6124.                 if(g.getOldIDGruppoForUpdate()!=null && g.getNome().equals(g.getOldIDGruppoForUpdate().getNome())==false){
  6125.                     msg+=":OLD<"+g.getOldIDGruppoForUpdate().getNome()+">";
  6126.                 }
  6127.             }
  6128.         }

  6129.         // Ruolo
  6130.         else if (oggetto instanceof Ruolo) {
  6131.             Ruolo r = (Ruolo) oggetto;
  6132.             msg+=":"+oggetto.getClass().getSimpleName();
  6133.             msg+=":<"+r.getNome()+">";
  6134.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6135.                 if(r.getOldIDRuoloForUpdate()!=null && r.getNome().equals(r.getOldIDRuoloForUpdate().getNome())==false){
  6136.                     msg+=":OLD<"+r.getOldIDRuoloForUpdate().getNome()+">";
  6137.                 }
  6138.             }
  6139.         }
  6140.        
  6141.         // Scope
  6142.         else if (oggetto instanceof Scope) {
  6143.             Scope r = (Scope) oggetto;
  6144.             msg+=":"+oggetto.getClass().getSimpleName();
  6145.             msg+=":<"+r.getNome()+">";
  6146.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6147.                 if(r.getOldIDScopeForUpdate()!=null && r.getNome().equals(r.getOldIDScopeForUpdate().getNome())==false){
  6148.                     msg+=":OLD<"+r.getOldIDScopeForUpdate().getNome()+">";
  6149.                 }
  6150.             }
  6151.         }
  6152.        
  6153.         // AccordoCooperazione
  6154.         else if (oggetto instanceof AccordoCooperazione) {
  6155.             AccordoCooperazione ac = (AccordoCooperazione) oggetto;
  6156.             msg+=":"+oggetto.getClass().getSimpleName();
  6157.             msg+=":<"+this.idAccordoCooperazioneFactory.getUriFromAccordo(ac)+">";
  6158.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6159.                 String oldnome = ac.getOldIDAccordoForUpdate()!=null ? this.idAccordoCooperazioneFactory.getUriFromIDAccordo(ac.getOldIDAccordoForUpdate()) : this.idAccordoCooperazioneFactory.getUriFromAccordo(ac);
  6160.                 if(oldnome.equals(this.idAccordoCooperazioneFactory.getUriFromAccordo(ac))==false)
  6161.                     msg+=":OLD<"+oldnome+">";
  6162.             }
  6163.         }

  6164.         // AccordoServizio
  6165.         else if (oggetto instanceof AccordoServizioParteComune) {
  6166.             AccordoServizioParteComune as = (AccordoServizioParteComune) oggetto;
  6167.             msg+=":"+oggetto.getClass().getSimpleName();
  6168.             msg+=":<"+this.idAccordoFactory.getUriFromAccordo(as)+">";
  6169.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6170.                 String oldnome = as.getOldIDAccordoForUpdate()!=null ? this.idAccordoFactory.getUriFromIDAccordo(as.getOldIDAccordoForUpdate()) : this.idAccordoFactory.getUriFromAccordo(as);
  6171.                 if(oldnome.equals(this.idAccordoFactory.getUriFromAccordo(as))==false)
  6172.                     msg+=":OLD<"+oldnome+">";
  6173.             }
  6174.         }

  6175.         // Soggetto
  6176.         else if (oggetto instanceof org.openspcoop2.core.registry.Soggetto) {
  6177.             org.openspcoop2.core.registry.Soggetto soggetto = (org.openspcoop2.core.registry.Soggetto) oggetto;
  6178.             msg+=":"+oggetto.getClass().getSimpleName();
  6179.             msg+=":<"+soggetto.getTipo()+"/"+soggetto.getNome()+">";
  6180.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6181.                 String oldTipo = (soggetto.getOldIDSoggettoForUpdate()!=null && soggetto.getOldIDSoggettoForUpdate().getTipo()!=null) ?
  6182.                         soggetto.getOldIDSoggettoForUpdate().getTipo() : soggetto.getTipo();
  6183.                 String oldNome = (soggetto.getOldIDSoggettoForUpdate()!=null && soggetto.getOldIDSoggettoForUpdate().getNome()!=null) ?
  6184.                         soggetto.getOldIDSoggettoForUpdate().getNome() : soggetto.getNome();
  6185.                 if( (oldTipo.equals(soggetto.getTipo())==false) || (oldNome.equals(soggetto.getNome())==false) )
  6186.                     msg+=":OLD<"+oldTipo+"/"+oldNome+">";
  6187.             }
  6188.         }

  6189.         // Servizio
  6190.         else if (oggetto instanceof AccordoServizioParteSpecifica) {
  6191.             AccordoServizioParteSpecifica asps = (AccordoServizioParteSpecifica) oggetto;
  6192.             msg+=":"+oggetto.getClass().getSimpleName();
  6193.             msg+=":<"+this.idServizioFactory.getUriFromAccordo(asps)+">";
  6194.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6195.                 String oldnome = asps.getOldIDServizioForUpdate()!=null ? this.idServizioFactory.getUriFromIDServizio(asps.getOldIDServizioForUpdate()) : this.idServizioFactory.getUriFromAccordo(asps);
  6196.                 if(oldnome.equals(this.idServizioFactory.getUriFromAccordo(asps))==false)
  6197.                     msg+=":OLD<"+oldnome+">";
  6198.             }
  6199.         }

  6200.         // PortaDominio
  6201.         else if (oggetto instanceof PortaDominio) {
  6202.             PortaDominio pdd = (PortaDominio) oggetto;
  6203.             msg+=":"+oggetto.getClass().getSimpleName();
  6204.             msg+=":<"+pdd.getNome()+">";

  6205.         }

  6206.         // PortType
  6207.         else if (oggetto instanceof PortType) {
  6208.             PortType pt = (PortType) oggetto;

  6209.             long idAcc = pt.getIdAccordo();
  6210.             String nomeAS = "notdefined";
  6211.             try{
  6212.                 AccordiServizioParteComuneCore apcCore = new AccordiServizioParteComuneCore(this);
  6213.                 IDAccordo idAccordo = apcCore.getIdAccordoServizio(idAcc);
  6214.                 nomeAS = idAccordo.getNome();
  6215.             }catch (Exception e) {
  6216.                 // ignore
  6217.             }

  6218.             msg+=":"+oggetto.getClass().getSimpleName();
  6219.             msg+=":<"+pt.getNome()+"_"+nomeAS+">";
  6220.         }



  6221.         // config
  6222.         //Soggetto
  6223.         if (oggetto instanceof Soggetto) {
  6224.             Soggetto soggetto = (Soggetto) oggetto;
  6225.             msg+=":"+oggetto.getClass().getSimpleName();
  6226.             msg+=":<"+soggetto.getTipo()+"/"+soggetto.getNome()+">";
  6227.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6228.                 String oldTipo = (soggetto.getOldIDSoggettoForUpdate()!=null && soggetto.getOldIDSoggettoForUpdate().getTipo()!=null) ?
  6229.                         soggetto.getOldIDSoggettoForUpdate().getTipo() : soggetto.getTipo();
  6230.                 String oldNome = (soggetto.getOldIDSoggettoForUpdate()!=null && soggetto.getOldIDSoggettoForUpdate().getNome()!=null) ?
  6231.                         soggetto.getOldIDSoggettoForUpdate().getNome() : soggetto.getNome();
  6232.                 if( (oldTipo.equals(soggetto.getTipo())==false) || (oldNome.equals(soggetto.getNome())==false) )
  6233.                     msg+=":OLD<"+oldTipo+"/"+oldNome+">";
  6234.             }
  6235.         }

  6236.         // ServizioApplicativo
  6237.         else if (oggetto instanceof ServizioApplicativo) {
  6238.             ServizioApplicativo sa = (ServizioApplicativo) oggetto;
  6239.             msg+=":"+oggetto.getClass().getSimpleName();
  6240.             msg+=":<"+sa.getTipoSoggettoProprietario()+"/"+sa.getNomeSoggettoProprietario()+"_"+sa.getNome()+">";
  6241.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6242.                 String oldTipoProp = (sa.getOldIDServizioApplicativoForUpdate()!=null && sa.getOldIDServizioApplicativoForUpdate().getIdSoggettoProprietario()!=null &&
  6243.                         sa.getOldIDServizioApplicativoForUpdate().getIdSoggettoProprietario().getTipo()!=null) ?
  6244.                         sa.getOldIDServizioApplicativoForUpdate().getIdSoggettoProprietario().getTipo() : sa.getTipoSoggettoProprietario();
  6245.                 String oldNomeProp = (sa.getOldIDServizioApplicativoForUpdate()!=null && sa.getOldIDServizioApplicativoForUpdate().getIdSoggettoProprietario()!=null &&
  6246.                         sa.getOldIDServizioApplicativoForUpdate().getIdSoggettoProprietario().getNome()!=null) ?
  6247.                         sa.getOldIDServizioApplicativoForUpdate().getIdSoggettoProprietario().getNome() : sa.getNomeSoggettoProprietario();
  6248.                 String oldNome = (sa.getOldIDServizioApplicativoForUpdate()!=null && sa.getOldIDServizioApplicativoForUpdate().getNome()!=null) ?
  6249.                         sa.getOldIDServizioApplicativoForUpdate().getNome() : sa.getNome();
  6250.                 if(  (oldNome.equals(sa.getNome())==false) || (oldTipoProp.equals(sa.getTipoSoggettoProprietario())==false) || (oldNomeProp.equals(sa.getNomeSoggettoProprietario())==false) )
  6251.                     msg+=":OLD<"+oldTipoProp+"/"+oldNomeProp+"_"+oldNome+">";
  6252.             }
  6253.         }

  6254.         // PortaDelegata
  6255.         else if (oggetto instanceof PortaDelegata) {
  6256.             PortaDelegata pd = (PortaDelegata) oggetto;
  6257.             msg+=":"+oggetto.getClass().getSimpleName();
  6258.             msg+=":<"+pd.getTipoSoggettoProprietario()+"/"+pd.getNomeSoggettoProprietario()+"_"+pd.getNome()+">";
  6259.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6260.                 String oldNome = (pd.getOldIDPortaDelegataForUpdate()!=null && pd.getOldIDPortaDelegataForUpdate().getNome()!=null) ?
  6261.                         pd.getOldIDPortaDelegataForUpdate().getNome() : pd.getNome();
  6262.                 if(  (oldNome.equals(pd.getNome())==false) )
  6263.                     msg+=":OLD<"+pd.getTipoSoggettoProprietario()+"/"+pd.getNomeSoggettoProprietario()+"_"+oldNome+">";
  6264.             }
  6265.         }

  6266.         // PortaApplicativa
  6267.         else if (oggetto instanceof PortaApplicativa) {
  6268.             PortaApplicativa pa = (PortaApplicativa) oggetto;
  6269.             msg+=":"+oggetto.getClass().getSimpleName();
  6270.             msg+=":<"+pa.getTipoSoggettoProprietario()+"/"+pa.getNomeSoggettoProprietario()+"_"+pa.getNome()+">";
  6271.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6272.                 String oldNome = (pa.getOldIDPortaApplicativaForUpdate()!=null && pa.getOldIDPortaApplicativaForUpdate().getNome()!=null) ?
  6273.                         pa.getOldIDPortaApplicativaForUpdate().getNome() : pa.getNome();
  6274.                 if(  (oldNome.equals(pa.getNome())==false) )
  6275.                     msg+=":OLD<"+pa.getTipoSoggettoProprietario()+"/"+pa.getNomeSoggettoProprietario()+"_"+oldNome+">";
  6276.             }
  6277.         }

  6278.         // RoutingTable
  6279.         else if (oggetto instanceof RoutingTable) {
  6280.             //RoutingTable rt = (RoutingTable) oggetto;
  6281.             msg+=":"+oggetto.getClass().getSimpleName();
  6282.         }

  6283.         // Configurazione
  6284.         else if (oggetto instanceof Configurazione) {
  6285.             //Configurazione conf = (Configurazione) oggetto;
  6286.             msg+=":"+oggetto.getClass().getSimpleName();
  6287.         }

  6288.         // AccessoRegistro
  6289.         else if (oggetto instanceof AccessoRegistro) {
  6290.             //AccessoRegistro cfgAccessoRegistro = (AccessoRegistro) oggetto;
  6291.             msg+=":"+oggetto.getClass().getSimpleName();
  6292.         }

  6293.         // User
  6294.         else if (oggetto instanceof User) {
  6295.             User utente = (User) oggetto;
  6296.             msg+=":"+oggetto.getClass().getSimpleName();
  6297.             msg+=":<"+utente.getLogin()+">";
  6298.         }

  6299.         // auditing
  6300.         else if(oggetto instanceof org.openspcoop2.web.lib.audit.dao.Configurazione){
  6301.             msg+=":"+oggetto.getClass().getSimpleName();
  6302.         }
  6303.         else if(oggetto instanceof org.openspcoop2.web.lib.audit.dao.Filtro){
  6304.             org.openspcoop2.web.lib.audit.dao.Filtro filtro = (org.openspcoop2.web.lib.audit.dao.Filtro) oggetto;
  6305.             msg+=":"+oggetto.getClass().getSimpleName();
  6306.             msg+=":<"+filtro.toString()+">";
  6307.         }

  6308.         // Monitoraggio Applicativo
  6309.         else if(oggetto instanceof org.openspcoop2.pdd.monitor.driver.FilterSearch){
  6310.             org.openspcoop2.pdd.monitor.driver.FilterSearch filtro = (org.openspcoop2.pdd.monitor.driver.FilterSearch) oggetto;
  6311.             msg+=":"+oggetto.getClass().getSimpleName();
  6312.             msg+=":EliminazioneMessaggiBasatiSuFiltro<"+filtro.toString()+">";
  6313.         }
  6314.        
  6315.         // Configurazione Controllo Traffico
  6316.         else if(oggetto instanceof ConfigurazioneGenerale) {
  6317.             msg+=":"+oggetto.getClass().getSimpleName();
  6318.         }
  6319.         // Configurazione Policy
  6320.         else if(oggetto instanceof ConfigurazionePolicy) {
  6321.             ConfigurazionePolicy policy = (ConfigurazionePolicy) oggetto;
  6322.             msg+=":"+oggetto.getClass().getSimpleName();
  6323.             msg+=":<"+policy.getIdPolicy()+">";
  6324.         }
  6325.         // Attivazione Policy
  6326.         else if(oggetto instanceof AttivazionePolicy) {
  6327.             AttivazionePolicy policy = (AttivazionePolicy) oggetto;
  6328.             msg+=":"+oggetto.getClass().getSimpleName();
  6329.             StringBuilder bf = new StringBuilder();
  6330.             bf.append("IDActivePolicy[").append(policy.getIdActivePolicy()).append("] IDPolicy[").append(policy.getIdPolicy()).append("]");
  6331.             msg+=":<"+bf.toString()+">";
  6332.         }
  6333.         // Generic Properties
  6334.         else if(oggetto instanceof GenericProperties) {
  6335.             GenericProperties genericProperties = (GenericProperties) oggetto;
  6336.             msg+=":"+oggetto.getClass().getSimpleName();
  6337.             StringBuilder bf = new StringBuilder();
  6338.             bf.append("Nome[").append(genericProperties.getNome()).append("] Tipologia[").append(genericProperties.getTipologia()).append("]");
  6339.             msg+=":<"+bf.toString()+">";
  6340.         }
  6341.         // Registro Plugin
  6342.         else if(oggetto instanceof RegistroPlugin) {
  6343.             RegistroPlugin registroPlugins = (RegistroPlugin) oggetto;
  6344.             msg+=":"+oggetto.getClass().getSimpleName();
  6345.             StringBuilder bf = new StringBuilder();
  6346.             bf.append("Nome[").append(registroPlugins.getNome()).append("]");
  6347.             msg+=":<"+bf.toString()+">";
  6348.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6349.                 String oldNome = registroPlugins.getOldNome();
  6350.                 if( oldNome!=null && (oldNome.equals(registroPlugins.getNome())==false) )
  6351.                     msg+=":OLD<"+oldNome+">";
  6352.             }
  6353.         }
  6354.         // Registro Plugin Archivi
  6355.         else if(oggetto instanceof RegistroPluginArchivio) {
  6356.             RegistroPluginArchivio registroPluginArchivio = (RegistroPluginArchivio) oggetto;
  6357.             msg+=":"+oggetto.getClass().getSimpleName();
  6358.             StringBuilder bf = new StringBuilder();
  6359.             bf.append("Nome[").append(registroPluginArchivio.getNome()).append("]");
  6360.             bf.append(" Nome Plugin[").append(registroPluginArchivio.getNomePlugin()).append("]");
  6361.             msg+=":<"+bf.toString()+">";
  6362.         }
  6363.         // Plugin Classi
  6364.         else if(oggetto instanceof Plugin) {
  6365.             Plugin plugin = (Plugin) oggetto;
  6366.             msg+=":"+oggetto.getClass().getSimpleName();
  6367.             StringBuilder bf = new StringBuilder();
  6368.             bf.append("Tipo Plugin[").append(plugin.getTipoPlugin()).append("]");
  6369.             bf.append(" Tipo[").append(plugin.getTipo()).append("]");
  6370.             bf.append(" Label[").append(plugin.getLabel()).append("]");
  6371.             msg+=":<"+bf.toString()+">";
  6372.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6373.                 if((plugin.getOldIdPlugin().getTipoPlugin().equals(plugin.getTipoPlugin())==false) ||
  6374.                         (plugin.getOldIdPlugin().getTipo().equals(plugin.getTipo())==false) ||
  6375.                         (plugin.getOldIdPlugin().getLabel().equals(plugin.getLabel())==false) ) {
  6376.                     StringBuilder bf2 = new StringBuilder();
  6377.                     bf2.append("Tipo Plugin[").append(plugin.getTipoPlugin()).append("]");
  6378.                     bf2.append(" Tipo[").append(plugin.getTipo()).append("]");
  6379.                     bf2.append(" Label[").append(plugin.getLabel()).append("]");
  6380.                     msg+=":OLD<"+bf2.toString()+">";
  6381.                 }
  6382.             }
  6383.         }
  6384.         // Allarme
  6385.         else if(oggetto instanceof Allarme) {
  6386.             Allarme allarme = (Allarme) oggetto;
  6387.             msg+=":"+oggetto.getClass().getSimpleName();
  6388.             StringBuilder bf = new StringBuilder();
  6389.             bf.append("Nome[").append(allarme.getNome()).append("]");
  6390.             msg+=":<"+bf.toString()+">";
  6391.         }
  6392.         // AllarmeHistory
  6393.         else if(oggetto instanceof AllarmeHistory) {
  6394.             AllarmeHistory allarme = (AllarmeHistory) oggetto;
  6395.             msg+=":"+oggetto.getClass().getSimpleName();
  6396.             StringBuilder bf = new StringBuilder();
  6397.             bf.append("Nome[").append(allarme.getIdAllarme().getNome()).append("]");
  6398.             msg+=":<"+bf.toString()+">";
  6399.         }
  6400.         // IExtendedBean
  6401.         else if(oggetto instanceof IExtendedBean){
  6402.             IExtendedBean w = (IExtendedBean) oggetto;
  6403.             msg+=":"+w.getClass().getSimpleName();
  6404.             msg+=":<"+w.getHumanId()+">";
  6405.         }
  6406.         // RemoteStoreKey
  6407.         else if(oggetto instanceof RemoteStoreKeyEntry) {
  6408.             RemoteStoreKeyEntry key = (RemoteStoreKeyEntry) oggetto;
  6409.             msg+=":"+oggetto.getClass().getSimpleName();
  6410.             StringBuilder bf = new StringBuilder();
  6411.             bf.append("Kid[").append(key.getKid()).append("]");
  6412.             msg+=":<"+bf.toString()+">";
  6413.         }
  6414.        
  6415.         return msg;
  6416.     }

  6417.    











  6418.     /* ************** UTILITA' GENERALI A TUTTI I CORE ED HELPER ***************** */

  6419.     private static final String VERSION_INFO_READ = "VERSION_INFO_READ";
  6420.     private static final String VERSION_INFO = "VERSION_INFO";
  6421.    
  6422.     private IVersionInfo versionInfo = null;
  6423.     private Boolean versionInfoRead = null;
  6424.     private synchronized IVersionInfo initInfoVersion(HttpServletRequest request, HttpSession session, String tipoDB) throws UtilsException {
  6425.        
  6426.         if(this.versionInfoRead==null) {
  6427.        
  6428.             try {
  6429.                 Boolean versionInfoReadFromSession = ServletUtils.getObjectFromSession(request, session, Boolean.class, VERSION_INFO_READ);
  6430.                 if(versionInfoReadFromSession!=null) {
  6431.                     this.versionInfoRead = versionInfoReadFromSession;
  6432.                     this.versionInfo = ServletUtils.getObjectFromSession(request, session, IVersionInfo.class, VERSION_INFO);
  6433.                 }
  6434.                 else {
  6435.                     IVersionInfo vInfo = VersionUtilities.readInfoVersion();
  6436.                     if(vInfo!=null) {
  6437.                         Connection con = null;
  6438.                         try {
  6439.                             // prendo una connessione
  6440.                             con = ControlStationCore.dbM.getConnection();
  6441.                             vInfo.init(ControlStationLogger.getPddConsoleCoreLogger(), con, tipoDB);
  6442.                             this.versionInfo = vInfo;
  6443.                         }
  6444.                         catch(Exception e) {
  6445.                             ControlStationLogger.getPddConsoleCoreLogger().error(e.getMessage(),e);
  6446.                         }
  6447.                         finally {
  6448.                             ControlStationCore.dbM.releaseConnection(con);
  6449.                         }
  6450.                     }
  6451.                     ServletUtils.setObjectIntoSession(request, session, true, VERSION_INFO_READ);
  6452.                     if(vInfo!=null) {
  6453.                         ServletUtils.setObjectIntoSession(request, session, vInfo, VERSION_INFO);
  6454.                     }
  6455.                 }
  6456.             }finally {
  6457.                 this.versionInfoRead = true;
  6458.             }
  6459.            
  6460.         }
  6461.        
  6462.         return this.versionInfo;
  6463.        
  6464.     }
  6465.     public IVersionInfo getInfoVersion(HttpServletRequest request, HttpSession session) throws UtilsException {
  6466.         if(this.versionInfoRead==null) {
  6467.             initInfoVersion(request, session, this.tipoDB);
  6468.         }
  6469.         return this.versionInfo;
  6470.     }
  6471.     public void updateInfoVersion(HttpServletRequest request, HttpSession session, String info) throws UtilsException {
  6472.         Connection con = null;
  6473.         try {
  6474.             // prendo una connessione
  6475.             con = ControlStationCore.dbM.getConnection();
  6476.             IVersionInfo vInfo = getInfoVersion(request, session);
  6477.             if(vInfo!=null) {
  6478.                 vInfo.set(info, ControlStationLogger.getPddConsoleCoreLogger(), con, this.tipoDB);
  6479.             }
  6480.         }
  6481.         catch(Exception e) {
  6482.             ControlStationLogger.getPddConsoleCoreLogger().error(e.getMessage(),e);
  6483.             throw e;
  6484.         }
  6485.         finally {
  6486.             ControlStationCore.dbM.releaseConnection(con);
  6487.         }
  6488.     }
  6489.    
  6490.     public IRegistryReader getRegistryReader(IProtocolFactory<?> protocolFactory) throws DriverConfigurazioneException{
  6491.         String nomeMetodo = "getRegistryReader";
  6492.        
  6493.         try {
  6494.             // istanzio il driver
  6495.             DriverRegistroServiziDB driver = new DriverRegistroServiziDB(ControlStationCore.dbM.getDataSourceName(),ControlStationCore.dbM.getDataSourceContext(),ControlStationCore.log, this.tipoDB);
  6496.             return protocolFactory.getRegistryReader(driver);

  6497.         } catch (Exception e) {
  6498.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6499.             throw new DriverConfigurazioneException(getPrefixError(nomeMetodo,  e),e);
  6500.         }
  6501.     }
  6502.    
  6503.     public IConfigIntegrationReader getConfigIntegrationReader(IProtocolFactory<?> protocolFactory) throws DriverConfigurazioneException{
  6504.         String nomeMetodo = "getConfigIntegrationReader";
  6505.        
  6506.         try {
  6507.             // istanzio il driver
  6508.             DriverConfigurazioneDB driver = new DriverConfigurazioneDB(ControlStationCore.dbM.getDataSourceName(),ControlStationCore.dbM.getDataSourceContext(),ControlStationCore.log, this.tipoDB);
  6509.             return protocolFactory.getConfigIntegrationReader(driver);

  6510.         } catch (Exception e) {
  6511.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6512.             throw new DriverConfigurazioneException(getPrefixError(nomeMetodo,  e),e);
  6513.         }
  6514.     }
  6515.    

  6516.     public void initMappingErogazione(boolean forceMapping,Logger log) throws DriverConfigurazioneException {
  6517.         Connection con = null;
  6518.         String nomeMetodo = "initMappingErogazione";
  6519.         DriverControlStationDB driver = null;
  6520.         try {
  6521.             // prendo una connessione
  6522.             con = ControlStationCore.dbM.getConnection();
  6523.             // istanzio il driver
  6524.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  6525.             driver.initMappingErogazione(forceMapping,log);

  6526.         } catch (Exception e) {
  6527.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6528.             throw new DriverConfigurazioneException(getPrefixError(nomeMetodo,  e),e);
  6529.         } finally {
  6530.             ControlStationCore.dbM.releaseConnection(con);
  6531.         }

  6532.     }
  6533.    
  6534.     public void initMappingFruizione(boolean forceMapping,Logger log) throws DriverConfigurazioneException {
  6535.         Connection con = null;
  6536.         String nomeMetodo = "initMappingFruizione";
  6537.         DriverControlStationDB driver = null;

  6538.         try {
  6539.             // prendo una connessione
  6540.             con = ControlStationCore.dbM.getConnection();
  6541.             // istanzio il driver
  6542.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  6543.             driver.initMappingFruizione(forceMapping,log);

  6544.         } catch (Exception e) {
  6545.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6546.             throw new DriverConfigurazioneException(getPrefixError(nomeMetodo,  e),e);
  6547.         } finally {
  6548.             ControlStationCore.dbM.releaseConnection(con);
  6549.         }

  6550.     }
  6551.    

  6552.     /**
  6553.      * Accesso alla configurazione generale della Pdd
  6554.      *
  6555.      * @return configurazione generale della Pdd
  6556.      * @throws DriverConfigurazioneNotFound
  6557.      * @throws DriverConfigurazioneException
  6558.      */
  6559.     private static Configurazione configurazioneInstance = null;
  6560.     private static final Semaphore configurazioneInstanceSemaphore = new Semaphore("configurazioneGenerale");
  6561.     public static void invalidateConfigurazioneGenerale() {
  6562.         if(ControlStationCore.configurazioneInstance!=null) {
  6563.             invalidateConfigurazioneGeneraleEngine();
  6564.         }
  6565.     }
  6566.     public static void invalidateConfigurazioneGeneraleEngine() {
  6567.         SemaphoreLock lock = ControlStationCore.configurazioneInstanceSemaphore.acquireThrowRuntime("invalidateConfigurazioneGenerale");
  6568.         try {
  6569.             ControlStationCore.configurazioneInstance=null;
  6570.         }finally {
  6571.             ControlStationCore.configurazioneInstanceSemaphore.release(lock, "invalidateConfigurazioneGenerale");
  6572.         }
  6573.     }
  6574.     public Configurazione getConfigurazioneGenerale() throws DriverConfigurazioneNotFound, DriverConfigurazioneException {
  6575.         if(ControlStationCore.configurazioneInstance==null) {
  6576.             initSyncConfigurazioneGenerale();
  6577.         }
  6578.         return ControlStationCore.configurazioneInstance;
  6579.     }
  6580.     private void initSyncConfigurazioneGenerale() throws DriverConfigurazioneNotFound, DriverConfigurazioneException {
  6581.         if(ControlStationCore.configurazioneInstance==null) {
  6582.             SemaphoreLock lock = ControlStationCore.configurazioneInstanceSemaphore.acquireThrowRuntime("initConfigurazioneGenerale");
  6583.             try {
  6584.                 initConfigurazioneGenerale();
  6585.             }finally {
  6586.                 ControlStationCore.configurazioneInstanceSemaphore.release(lock, "initConfigurazioneGenerale");
  6587.             }
  6588.         }
  6589.     }
  6590.     private void initConfigurazioneGenerale() throws DriverConfigurazioneNotFound, DriverConfigurazioneException {
  6591.         Connection con = null;
  6592.         String nomeMetodo = "getConfigurazioneGenerale";
  6593.         DriverControlStationDB driver = null;

  6594.         try {
  6595.             // prendo una connessione
  6596.             con = ControlStationCore.dbM.getConnection();
  6597.             // istanzio il driver
  6598.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  6599.             Configurazione config = driver.getDriverConfigurazioneDB().getConfigurazioneGenerale();
  6600.             StatoFunzionalita statoMultitenant = (config.getMultitenant()==null || config.getMultitenant().getStato()==null) ? StatoFunzionalita.DISABILITATO :  config.getMultitenant().getStato();
  6601.             if(StatoFunzionalita.DISABILITATO.equals(statoMultitenant)) {
  6602.                 // Fix #20
  6603.                 SoggettiCore soggettiCore = new SoggettiCore(this);
  6604.                 List<IDSoggetto> l = soggettiCore.getIdSoggettiOperativi();
  6605.                 boolean existsMoreThanOneSoggettoOperativoPerProtocollo = false;
  6606.                 Map<String, Integer> countSoggettoOperativiByProtocol = new HashMap<>();
  6607.                 if(l!=null && !l.isEmpty()) {
  6608.                     for (IDSoggetto soggetto : l) {
  6609.                         String protocol = soggettiCore.getProtocolloAssociatoTipoSoggetto(soggetto.getTipo());
  6610.                         int count = 0;
  6611.                         if(countSoggettoOperativiByProtocol.containsKey(protocol)) {
  6612.                             count = countSoggettoOperativiByProtocol.remove(protocol);
  6613.                         }
  6614.                         count ++;
  6615.                         if(count>1) {
  6616.                             existsMoreThanOneSoggettoOperativoPerProtocollo = true;
  6617.                             break;
  6618.                         }
  6619.                         countSoggettoOperativiByProtocol.put(protocol, count);
  6620.                     }
  6621.                 }
  6622.                 if(existsMoreThanOneSoggettoOperativoPerProtocollo) {
  6623.                     // puรฒ succedere nel passaggio dalla 3.0.0 alla 3.0.1 quando piรน soggetti operativi erano giร  stati creati in una gestione multitenant completamente differente
  6624.                     if(config.getMultitenant()==null) {
  6625.                         config.setMultitenant(new ConfigurazioneMultitenant());
  6626.                     }
  6627.                     config.getMultitenant().setStato(StatoFunzionalita.ABILITATO);
  6628.                 }
  6629.             }
  6630.            
  6631.             ControlStationCore.configurazioneInstance = config;

  6632.         } catch (DriverConfigurazioneNotFound de) {
  6633.             ControlStationCore.logError(getPrefixError(nomeMetodo,  de),de);
  6634.             throw de;
  6635.         } catch (Exception e) {
  6636.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6637.             throw new DriverConfigurazioneException(getPrefixError(nomeMetodo,  e),e);
  6638.         } finally {
  6639.             ControlStationCore.dbM.releaseConnection(con);
  6640.         }

  6641.     }
  6642.    
  6643.     /**
  6644.      * Accesso alla configurazione dei canali
  6645.      *
  6646.      * @return configurazione dei canali
  6647.      * @throws DriverConfigurazioneNotFound
  6648.      * @throws DriverConfigurazioneException
  6649.      */
  6650.     public CanaliConfigurazione getCanaliConfigurazione(boolean readNodi) throws DriverConfigurazioneNotFound, DriverConfigurazioneException {
  6651.         Connection con = null;
  6652.         String nomeMetodo = "getCanaliConfigurazione";
  6653.         DriverControlStationDB driver = null;

  6654.         try {
  6655.             // prendo una connessione
  6656.             con = ControlStationCore.dbM.getConnection();
  6657.             // istanzio il driver
  6658.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  6659.             CanaliConfigurazione config = driver.getDriverConfigurazioneDB().getCanaliConfigurazione(readNodi);
  6660.             return config;

  6661.         } catch (DriverConfigurazioneNotFound de) {
  6662.             ControlStationCore.logError(getPrefixError(nomeMetodo,  de),de);
  6663.             throw de;
  6664.         } catch (Exception e) {
  6665.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6666.             throw new DriverConfigurazioneException(getPrefixError(nomeMetodo,  e),e);
  6667.         } finally {
  6668.             ControlStationCore.dbM.releaseConnection(con);
  6669.         }

  6670.     }
  6671.    
  6672.     public List<String> getAllGruppiOrdinatiPerDataRegistrazione() throws DriverRegistroServiziException {
  6673.         FiltroRicercaGruppi filtroRicercaGruppi = new FiltroRicercaGruppi();
  6674.         filtroRicercaGruppi.setOrdinaDataRegistrazione(true);
  6675.         List<String> returnList = new ArrayList<>();
  6676.         List<IDGruppo> list = this.getAllIdGruppi(filtroRicercaGruppi);
  6677.         for (IDGruppo idGruppo : list) {
  6678.             returnList.add(idGruppo.getNome());
  6679.         }
  6680.         return returnList;
  6681.     }
  6682.    
  6683.     public List<String> getAllGruppi(FiltroRicercaGruppi filtroRicerca) throws DriverRegistroServiziException {
  6684.         List<String> returnList = new ArrayList<>();
  6685.         List<IDGruppo> list = this.getAllIdGruppi(filtroRicerca);
  6686.         for (IDGruppo idGruppo : list) {
  6687.             returnList.add(idGruppo.getNome());
  6688.         }
  6689.         return returnList;
  6690.     }
  6691.     public List<IDGruppo> getAllIdGruppi(FiltroRicercaGruppi filtroRicerca) throws DriverRegistroServiziException {
  6692.         Connection con = null;
  6693.         String nomeMetodo = "getAllIdGruppi";
  6694.         DriverControlStationDB driver = null;

  6695.         try {
  6696.             if(this.isRegistroServiziLocale()){
  6697.                 // prendo una connessione
  6698.                 con = ControlStationCore.dbM.getConnection();
  6699.                 // istanzio il driver
  6700.                 driver = new DriverControlStationDB(con, null, this.tipoDB);
  6701.    
  6702.                 return driver.getDriverRegistroServiziDB().getAllIdGruppi(filtroRicerca);
  6703.             }
  6704.             else{
  6705.                 return GestoreRegistroServiziRemoto.getDriverRegistroServizi(ControlStationCore.log).getAllIdGruppi(filtroRicerca);
  6706.             }

  6707.         } catch (DriverRegistroServiziNotFound de) {
  6708.             ControlStationCore.logDebug(getPrefixError(nomeMetodo,  de),de);
  6709.             return new ArrayList<>();
  6710.         } catch (Exception e) {
  6711.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6712.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  6713.         } finally {
  6714.             ControlStationCore.dbM.releaseConnection(con);
  6715.         }
  6716.     }

  6717.     public List<String> getAllRuoli(FiltroRicercaRuoli filtroRicerca) throws DriverRegistroServiziException {
  6718.         List<String> returnList = new ArrayList<>();
  6719.         List<IDRuolo> list = this.getAllIdRuoli(filtroRicerca);
  6720.         for (IDRuolo idRuolo : list) {
  6721.             returnList.add(idRuolo.getNome());
  6722.         }
  6723.         return returnList;
  6724.     }
  6725.     public List<IDRuolo> getAllIdRuoli(FiltroRicercaRuoli filtroRicerca) throws DriverRegistroServiziException {
  6726.         Connection con = null;
  6727.         String nomeMetodo = "getAllIdRuoli";
  6728.         DriverControlStationDB driver = null;

  6729.         try {
  6730.             if(this.isRegistroServiziLocale()){
  6731.                 // prendo una connessione
  6732.                 con = ControlStationCore.dbM.getConnection();
  6733.                 // istanzio il driver
  6734.                 driver = new DriverControlStationDB(con, null, this.tipoDB);
  6735.    
  6736.                 return driver.getDriverRegistroServiziDB().getAllIdRuoli(filtroRicerca);
  6737.             }
  6738.             else{
  6739.                 return GestoreRegistroServiziRemoto.getDriverRegistroServizi(ControlStationCore.log).getAllIdRuoli(filtroRicerca);
  6740.             }

  6741.         } catch (DriverRegistroServiziNotFound de) {
  6742.             ControlStationCore.logDebug(getPrefixError(nomeMetodo,  de),de);
  6743.             return new ArrayList<>();
  6744.         } catch (Exception e) {
  6745.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6746.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  6747.         } finally {
  6748.             ControlStationCore.dbM.releaseConnection(con);
  6749.         }
  6750.     }
  6751.    
  6752.     public List<String> getAllScope(FiltroRicercaScope filtroRicerca) throws DriverRegistroServiziException {
  6753.         List<String> returnList = new ArrayList<>();
  6754.         List<IDScope> list = this.getAllIdScope(filtroRicerca);
  6755.         for (IDScope idScope : list) {
  6756.             returnList.add(idScope.getNome());
  6757.         }
  6758.         return returnList;
  6759.     }
  6760.     public List<IDScope> getAllIdScope(FiltroRicercaScope filtroRicerca) throws DriverRegistroServiziException {
  6761.         Connection con = null;
  6762.         String nomeMetodo = "getAllIdScope";
  6763.         DriverControlStationDB driver = null;

  6764.         try {
  6765.             if(this.isRegistroServiziLocale()){
  6766.                 // prendo una connessione
  6767.                 con = ControlStationCore.dbM.getConnection();
  6768.                 // istanzio il driver
  6769.                 driver = new DriverControlStationDB(con, null, this.tipoDB);
  6770.    
  6771.                 return driver.getDriverRegistroServiziDB().getAllIdScope(filtroRicerca);
  6772.             }
  6773.             else{
  6774.                 return GestoreRegistroServiziRemoto.getDriverRegistroServizi(ControlStationCore.log).getAllIdScope(filtroRicerca);
  6775.             }

  6776.         } catch (DriverRegistroServiziNotFound de) {
  6777.             ControlStationCore.logDebug(getPrefixError(nomeMetodo,  de),de);
  6778.             return new ArrayList<>();
  6779.         } catch (Exception e) {
  6780.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6781.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  6782.         } finally {
  6783.             ControlStationCore.dbM.releaseConnection(con);
  6784.         }
  6785.     }

  6786.     public int countProtocolli(HttpServletRequest request, HttpSession session) throws  DriverRegistroServiziException {
  6787.         return this.countProtocolli(request, session, false);
  6788.     }
  6789.     public int countProtocolli(HttpServletRequest request, HttpSession session, boolean ignoreProtocolloSelezionato) throws  DriverRegistroServiziException {
  6790.         List<String> l = this.getProtocolli(request, session, ignoreProtocolloSelezionato);
  6791.         return l.size();
  6792.     }
  6793.     public List<String> getProtocolli(HttpServletRequest request, HttpSession session) throws  DriverRegistroServiziException {
  6794.         return this.getProtocolli(request, session, false);
  6795.     }
  6796.     public List<String> getProtocolli(HttpServletRequest request, HttpSession session, boolean ignoreProtocolloSelezionato) throws  DriverRegistroServiziException {
  6797.         return this.getProtocolli(request, session, ignoreProtocolloSelezionato, false);
  6798.     }
  6799.     public List<String> getProtocolli(HttpServletRequest request, HttpSession session, boolean ignoreProtocolloSelezionato,
  6800.             boolean consideraProtocolliCompatibiliSoggettoSelezionato) throws  DriverRegistroServiziException {
  6801.         String getProtocolli = "getProtocolli";
  6802.         try{

  6803.             List<String> protocolliList = new ArrayList<>();
  6804.            
  6805.             User u =ServletUtils.getUserFromSession(request, session);
  6806.            
  6807.             if(!ignoreProtocolloSelezionato) {
  6808.                 if(u.getProtocolloSelezionatoPddConsole()!=null) {
  6809.                     protocolliList.add(u.getProtocolloSelezionatoPddConsole());
  6810.                     return protocolliList;
  6811.                 }
  6812.                 else if(consideraProtocolliCompatibiliSoggettoSelezionato &&
  6813.                         u.getSoggettoSelezionatoPddConsole()!=null && !"".equals(u.getSoggettoSelezionatoPddConsole())) {
  6814.                     String tipoSoggetto = u.getSoggettoSelezionatoPddConsole().split("/")[0];
  6815.                     SoggettiCore soggettiCore = new SoggettiCore(this);
  6816.                     String protocollo = soggettiCore.getProtocolloAssociatoTipoSoggetto(tipoSoggetto);
  6817.                     protocolliList.add(protocollo);
  6818.                     return protocolliList;
  6819.                 }
  6820.             }
  6821.            
  6822.             if(u.getProtocolliSupportati()!=null && u.getProtocolliSupportati().size()>0) {
  6823.                 return ProtocolUtils.orderProtocolli(u.getProtocolliSupportati());
  6824.             }
  6825.            
  6826.             return this.getProtocolli(); // ordinato dentro il metodo

  6827.         }catch (Exception e) {
  6828.             String errorMsg = getPrefixError(getProtocolli,  e);
  6829.             ControlStationCore.logError(errorMsg, e);
  6830.             throw new DriverRegistroServiziException(errorMsg,e);
  6831.         }
  6832.     }
  6833.     public List<String> getProtocolli(){
  6834.        
  6835.         List<String> protocolliList = new ArrayList<>();
  6836.        
  6837.         MapReader<String, IProtocolFactory<?>> protocolFactories = this.protocolFactoryManager.getProtocolFactories();
  6838.         Enumeration<String> protocolli = protocolFactories.keys();
  6839.         while (protocolli.hasMoreElements()) {

  6840.             String protocollo = protocolli.nextElement();
  6841.             protocolliList.add(protocollo);
  6842.         }
  6843.        
  6844.         return ProtocolUtils.orderProtocolli(protocolliList);
  6845.     }
  6846.     public List<String> getProtocolliByFilter(HttpServletRequest request, HttpSession session, boolean filtraSoggettiEsistenti,
  6847.             boolean filtraAccordiEsistenti) throws  DriverRegistroServiziException {
  6848.         return this.getProtocolliByFilter(request, session, filtraSoggettiEsistenti, filtraAccordiEsistenti, false);
  6849.     }
  6850.     public List<String> getProtocolliByFilter(HttpServletRequest request, HttpSession session, boolean filtraSoggettiEsistenti,
  6851.             boolean filtraAccordiEsistenti, boolean filtraAccordiCooperazioneEsistenti) throws  DriverRegistroServiziException {
  6852.         return getProtocolliByFilter(request, session, filtraSoggettiEsistenti, null,
  6853.                 filtraAccordiEsistenti, filtraAccordiCooperazioneEsistenti);
  6854.     }
  6855.     public List<String> getProtocolliByFilter(HttpServletRequest request, HttpSession session, boolean filtraSoggettiEsistenti, PddTipologia dominio,
  6856.             boolean filtraAccordiEsistenti) throws  DriverRegistroServiziException {
  6857.         return getProtocolliByFilter(request, session, filtraSoggettiEsistenti, dominio,
  6858.                 filtraAccordiEsistenti, false);
  6859.     }
  6860.     public List<String> getProtocolliByFilter(HttpServletRequest request, HttpSession session, boolean filtraSoggettiEsistenti, PddTipologia dominio,
  6861.             boolean filtraAccordiEsistenti, boolean filtraAccordiCooperazioneEsistenti) throws  DriverRegistroServiziException {
  6862.         return this.getProtocolliByFilter(request, session, filtraSoggettiEsistenti, dominio,
  6863.                 filtraAccordiEsistenti, filtraAccordiCooperazioneEsistenti,
  6864.                 false);
  6865.     }
  6866.     public List<String> getProtocolliByFilter(HttpServletRequest request, HttpSession session, boolean filtraSoggettiEsistenti, PddTipologia dominio,
  6867.             boolean filtraAccordiEsistenti, boolean filtraAccordiCooperazioneEsistenti,
  6868.             boolean consideraProtocolliCompatibiliSoggettoSelezionato) throws  DriverRegistroServiziException {
  6869.        
  6870.         List<String> _listaTipiProtocollo = this.getProtocolli(request, session, false, consideraProtocolliCompatibiliSoggettoSelezionato);
  6871.        
  6872.         String userLogin = ServletUtils.getUserLoginFromSession(session);
  6873.        
  6874.         if(filtraSoggettiEsistenti) {
  6875.            
  6876.             // Verifico esistenza soggetti per i protocolli caricati
  6877.             List<String> listaTipiProtocollo = new ArrayList<>();
  6878.             for (String check : _listaTipiProtocollo) {
  6879.                 if(this.existsAlmostOneOrganization(dominio, userLogin, check)) {
  6880.                     listaTipiProtocollo.add(check);
  6881.                 }
  6882.             }
  6883.             _listaTipiProtocollo = listaTipiProtocollo;
  6884.            
  6885.         }
  6886.        
  6887.         if(filtraAccordiEsistenti) {
  6888.            
  6889.             // Verifico esistenza accordi per i protocolli caricati
  6890.             List<String> listaTipiProtocollo = new ArrayList<>();
  6891.             for (String check : _listaTipiProtocollo) {
  6892.            
  6893.                 if(this.existsAlmostOneAPI(userLogin, check)) {
  6894.                     listaTipiProtocollo.add(check);
  6895.                 }
  6896.             }
  6897.             _listaTipiProtocollo = listaTipiProtocollo;
  6898.            
  6899.         }
  6900.        
  6901.         if(filtraAccordiCooperazioneEsistenti) {
  6902.            
  6903.             // Verifico esistenza accordi cooperazione per i protocolli caricati
  6904.             List<String> listaTipiProtocollo = new ArrayList<>();
  6905.             for (String check : _listaTipiProtocollo) {
  6906.            
  6907.                 if(this.existsAlmostOneAccordoCooperazione(userLogin, check)) {
  6908.                     listaTipiProtocollo.add(check);
  6909.                 }
  6910.             }
  6911.             _listaTipiProtocollo = listaTipiProtocollo;
  6912.            
  6913.         }
  6914.        
  6915.         return _listaTipiProtocollo;
  6916.     }
  6917.     public boolean existsAlmostOneOrganization(PddTipologia dominio, String userLogin, String protocollo) throws DriverRegistroServiziException{
  6918.         ConsoleSearch s = new ConsoleSearch();
  6919.         s.setPageSize(Liste.SOGGETTI, 1); // serve solo per il count
  6920.         s.addFilter(Liste.SOGGETTI, Filtri.FILTRO_PROTOCOLLO, protocollo); // imposto protocollo
  6921.         if(dominio!=null) {
  6922.             s.addFilter(Liste.SOGGETTI, Filtri.FILTRO_DOMINIO, dominio.toString()); // imposto dominio
  6923.         }
  6924.         List<org.openspcoop2.core.registry.Soggetto> lista = null;
  6925.         if(this.isVisioneOggettiGlobale(userLogin)){
  6926.             lista = this.soggettiRegistroList(null, s);
  6927.         }else{
  6928.             lista = this.soggettiRegistroList(userLogin, s);
  6929.         }
  6930.         if(lista!=null && lista.size()>0) {
  6931.             return true;
  6932.         }
  6933.         else {
  6934.             return false;
  6935.         }
  6936.     }
  6937.     public boolean existsAlmostOneAPI(String userLogin, String protocollo) throws DriverRegistroServiziException{
  6938.         ConsoleSearch s = new ConsoleSearch();
  6939.         s.setPageSize(Liste.ACCORDI, 1); // serve solo per il count
  6940.         s.addFilter(Liste.ACCORDI, Filtri.FILTRO_PROTOCOLLO, protocollo); // imposto protocollo
  6941.         List<AccordoServizioParteComuneSintetico> lista = null;
  6942.         if(this.isVisioneOggettiGlobale(userLogin)){
  6943.             lista = this.accordiList(null, s);
  6944.         }else{
  6945.             lista = this.accordiList(userLogin, s);
  6946.         }
  6947.         if(lista!=null && lista.size()>0) {
  6948.             return true;
  6949.         }
  6950.         else {
  6951.             return false;
  6952.         }
  6953.     }
  6954.     public boolean existsAlmostOneAccordoCooperazione(String userLogin, String protocollo) throws DriverRegistroServiziException{
  6955.         ConsoleSearch s = new ConsoleSearch();
  6956.         s.setPageSize(Liste.ACCORDI_COOPERAZIONE, 1); // serve solo per il count
  6957.         s.addFilter(Liste.ACCORDI_COOPERAZIONE, Filtri.FILTRO_PROTOCOLLO, protocollo); // imposto protocollo
  6958.         List<AccordoCooperazione> lista = null;
  6959.         if(this.isVisioneOggettiGlobale(userLogin)){
  6960.             lista = this.accordiCooperazioneList(null, s);
  6961.         }else{
  6962.             lista = this.accordiCooperazioneList(userLogin, s);
  6963.         }
  6964.         if(lista!=null && lista.size()>0) {
  6965.             return true;
  6966.         }
  6967.         else {
  6968.             return false;
  6969.         }
  6970.     }

  6971.     public IDSoggetto getSoggettoOperativoDefault(String userLogin, String protocollo) throws DriverRegistroServiziException{
  6972.         ConsoleSearch s = new ConsoleSearch();
  6973.         s.setPageSize(Liste.SOGGETTI, 1); // serve solo per il count
  6974.         s.addFilter(Liste.SOGGETTI, Filtri.FILTRO_PROTOCOLLO, protocollo); // imposto protocollo
  6975.         s.addFilter(Liste.SOGGETTI, Filtri.FILTRO_DOMINIO, PddTipologia.OPERATIVO.toString()); // imposto dominio
  6976.         s.addFilter(Liste.SOGGETTI, Filtri.FILTRO_SOGGETTO_DEFAULT, "true"); // imposto indicazione di volere il soggetto operativo di default
  6977.         List<org.openspcoop2.core.registry.Soggetto> lista = null;
  6978.         if(this.isVisioneOggettiGlobale(userLogin)){
  6979.             lista = this.soggettiRegistroList(null, s);
  6980.         }else{
  6981.             lista = this.soggettiRegistroList(userLogin, s);
  6982.         }
  6983.         if(lista!=null && lista.size()>0) {
  6984.             return new IDSoggetto(lista.get(0).getTipo(), lista.get(0).getNome());
  6985.         }
  6986.         else {
  6987.             return null;
  6988.         }
  6989.     }
  6990.    
  6991.     public List<org.openspcoop2.core.registry.Soggetto> getSoggettiOperativi() throws DriverRegistroServiziException{
  6992.         return this.getSoggettiOperativi(null);
  6993.     }
  6994.     public List<org.openspcoop2.core.registry.Soggetto> getSoggettiOperativi(String protocollo) throws DriverRegistroServiziException{
  6995.         ConsoleSearch s = new ConsoleSearch(true);
  6996.         if(protocollo!=null) {
  6997.             s.addFilter(Liste.SOGGETTI, Filtri.FILTRO_PROTOCOLLO, protocollo); // imposto protocollo
  6998.         }
  6999.         s.addFilter(Liste.SOGGETTI, Filtri.FILTRO_DOMINIO, PddTipologia.OPERATIVO.toString()); // imposto dominio
  7000.         return this.soggettiRegistroList(null, s);
  7001.     }
  7002.    
  7003.     public List<IDSoggetto> getIdSoggettiOperativi() throws DriverRegistroServiziException{
  7004.         return this.getIdSoggettiOperativi(null);
  7005.     }
  7006.     public List<IDSoggetto> getIdSoggettiOperativi(String protocollo) throws DriverRegistroServiziException{
  7007.         ConsoleSearch s = new ConsoleSearch(true);
  7008.         if(protocollo!=null) {
  7009.             s.addFilter(Liste.SOGGETTI, Filtri.FILTRO_PROTOCOLLO, protocollo); // imposto protocollo
  7010.         }
  7011.         s.addFilter(Liste.SOGGETTI, Filtri.FILTRO_DOMINIO, PddTipologia.OPERATIVO.toString()); // imposto dominio
  7012.         return this.idSoggettiRegistroList(null, s);
  7013.     }
  7014.    
  7015.     public List<org.openspcoop2.core.registry.Soggetto> getSoggetti() throws DriverRegistroServiziException{
  7016.         return this.getSoggetti(null);
  7017.     }
  7018.     public List<org.openspcoop2.core.registry.Soggetto> getSoggetti(String protocollo) throws DriverRegistroServiziException{
  7019.         ConsoleSearch s = new ConsoleSearch(true);
  7020.         if(protocollo!=null) {
  7021.             s.addFilter(Liste.SOGGETTI, Filtri.FILTRO_PROTOCOLLO, protocollo); // imposto protocollo
  7022.         }
  7023.         return this.soggettiRegistroList(null, s);
  7024.     }
  7025.    
  7026.     public List<IDSoggetto> getIdSoggetti() throws DriverRegistroServiziException{
  7027.         return this.getIdSoggetti(null);
  7028.     }
  7029.     public List<IDSoggetto> getIdSoggetti(String protocollo) throws DriverRegistroServiziException{
  7030.         List<org.openspcoop2.core.registry.Soggetto> list = this.getSoggetti(protocollo);
  7031.         List<IDSoggetto> l = new ArrayList<>();
  7032.         if(list!=null && !list.isEmpty()) {
  7033.             for (org.openspcoop2.core.registry.Soggetto soggetto : list) {
  7034.                 l.add(new IDSoggetto(soggetto.getTipo(), soggetto.getNome()));
  7035.             }
  7036.         }
  7037.         return l;
  7038.     }
  7039.    
  7040.     public IDSoggetto convertSoggettoSelezionatoToID(String soggettoOperativoSelezionato) {
  7041.         return new IDSoggetto(soggettoOperativoSelezionato.split("/")[0], soggettoOperativoSelezionato.split("/")[1]);
  7042.     }
  7043.    
  7044.     public List<org.openspcoop2.core.registry.Soggetto> soggettiRegistroList(String superuser, ISearch ricerca) throws DriverRegistroServiziException {
  7045.         Connection con = null;
  7046.         String nomeMetodo = "soggettiRegistroList";
  7047.         DriverControlStationDB driver = null;

  7048.         try {
  7049.             // prendo una connessione
  7050.             con = ControlStationCore.dbM.getConnection();
  7051.             // istanzio il driver
  7052.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  7053.             return driver.getDriverRegistroServiziDB().soggettiRegistroList(superuser, ricerca);

  7054.         } catch (Exception e) {
  7055.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7056.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7057.         } finally {
  7058.             ControlStationCore.dbM.releaseConnection(con);
  7059.         }
  7060.     }
  7061.    
  7062.     public List<IDSoggetto> idSoggettiRegistroList(String superuser, ISearch ricerca) throws DriverRegistroServiziException {
  7063.         Connection con = null;
  7064.         String nomeMetodo = "idSoggettiRegistroList";
  7065.         DriverControlStationDB driver = null;

  7066.         try {
  7067.             // prendo una connessione
  7068.             con = ControlStationCore.dbM.getConnection();
  7069.             // istanzio il driver
  7070.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  7071.             return driver.getDriverRegistroServiziDB().idSoggettiRegistroList(superuser, ricerca);

  7072.         } catch (Exception e) {
  7073.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7074.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7075.         } finally {
  7076.             ControlStationCore.dbM.releaseConnection(con);
  7077.         }
  7078.     }
  7079.    
  7080.     public List<IDSoggetto> getSoggettiDefault() throws DriverRegistroServiziException {
  7081.         Connection con = null;
  7082.         String nomeMetodo = "getSoggettiDefault";
  7083.         DriverControlStationDB driver = null;

  7084.         try {
  7085.             // prendo una connessione
  7086.             con = ControlStationCore.dbM.getConnection();
  7087.             // istanzio il driver
  7088.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  7089.             return driver.getDriverRegistroServiziDB().getSoggettiDefault();

  7090.         } catch (Exception e) {
  7091.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7092.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7093.         } finally {
  7094.             ControlStationCore.dbM.releaseConnection(con);
  7095.         }
  7096.     }
  7097.    
  7098.     public List<AccordoServizioParteComuneSintetico> accordiList(String superuser, ISearch ricerca) throws DriverRegistroServiziException {
  7099.         Connection con = null;
  7100.         String nomeMetodo = "accordiList";
  7101.         DriverControlStationDB driver = null;

  7102.         try {
  7103.             // prendo una connessione
  7104.             con = ControlStationCore.dbM.getConnection();
  7105.             // istanzio il driver
  7106.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  7107.             return driver.getDriverRegistroServiziDB().accordiList(superuser, ricerca);

  7108.         } catch (Exception e) {
  7109.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7110.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7111.         } finally {
  7112.             ControlStationCore.dbM.releaseConnection(con);
  7113.         }

  7114.     }
  7115.    
  7116.     public List<IDAccordoDB> idAccordiList(String superuser, ISearch ricerca,
  7117.             boolean soloAccordiConsistentiRest, boolean soloAccordiConsistentiSoap) throws DriverRegistroServiziException {
  7118.         Connection con = null;
  7119.         String nomeMetodo = "idAccordiList";
  7120.         DriverControlStationDB driver = null;

  7121.         try {
  7122.             // prendo una connessione
  7123.             con = ControlStationCore.dbM.getConnection();
  7124.             // istanzio il driver
  7125.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  7126.             return driver.getDriverRegistroServiziDB().idAccordiList(superuser, ricerca,
  7127.                     soloAccordiConsistentiRest, soloAccordiConsistentiSoap);

  7128.         } catch (Exception e) {
  7129.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7130.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7131.         } finally {
  7132.             ControlStationCore.dbM.releaseConnection(con);
  7133.         }

  7134.     }
  7135.    
  7136.     public List<AccordoCooperazione> accordiCooperazioneList(String superuser, ISearch ricerca) throws DriverRegistroServiziException {
  7137.         Connection con = null;
  7138.         String nomeMetodo = "accordiCooperazioneList";
  7139.         DriverControlStationDB driver = null;

  7140.         try {
  7141.             // prendo una connessione
  7142.             con = ControlStationCore.dbM.getConnection();
  7143.             // istanzio il driver
  7144.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  7145.             return driver.getDriverRegistroServiziDB().accordiCooperazioneList(superuser, ricerca);
  7146.         } catch (DriverRegistroServiziException e) {
  7147.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7148.             throw e;
  7149.         } catch (Exception e) {
  7150.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7151.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e), e);
  7152.         } finally {
  7153.             ControlStationCore.dbM.releaseConnection(con);
  7154.         }
  7155.     }
  7156.    
  7157.     public IDServizio getLabelNomeServizioApplicativo(String servizioApplicativo) throws DriverConfigurazioneException {
  7158.         Connection con = null;
  7159.         String nomeMetodo = "getLabelNomeServizioApplicativo";
  7160.         DriverControlStationDB driver = null;

  7161.         try {
  7162.             // prendo una connessione
  7163.             con = ControlStationCore.dbM.getConnection();
  7164.             // istanzio il driver
  7165.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  7166.             return driver.getDriverConfigurazioneDB().getLabelNomeServizioApplicativo(servizioApplicativo);
  7167.         } catch (DriverConfigurazioneException e) {
  7168.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7169.             throw e;
  7170.         } catch (Exception e) {
  7171.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7172.             throw new DriverConfigurazioneException(getPrefixError(nomeMetodo,  e), e);
  7173.         } finally {
  7174.             ControlStationCore.dbM.releaseConnection(con);
  7175.         }
  7176.     }
  7177.    
  7178.     public TipoAutenticazionePrincipal getTipoAutenticazionePrincipal(List<Proprieta> list) {
  7179.         if(list==null || list.isEmpty()) {
  7180.             return null;
  7181.         }
  7182.         for (Proprieta proprieta : list) {
  7183.             if(ParametriAutenticazionePrincipal.TIPO_AUTENTICAZIONE.equals(proprieta.getNome())) {
  7184.                 return TipoAutenticazionePrincipal.toEnumConstant(proprieta.getValore());
  7185.             }
  7186.         }
  7187.         return null;
  7188.     }
  7189.     public List<String> getParametroAutenticazione(String autenticazione, List<Proprieta> list) {
  7190.         if(list==null || list.isEmpty()) {
  7191.             return null;
  7192.         }
  7193.        
  7194.          List<String> parametroAutenticazioneList = null;
  7195.        
  7196.         if(TipoAutenticazione.BASIC.equals(autenticazione)) {
  7197.             // posizione 0: clean
  7198.             for (Proprieta proprieta : list) {
  7199.                 if(ParametriAutenticazioneBasic.CLEAN_HEADER_AUTHORIZATION.equals(proprieta.getNome())) {
  7200.                     parametroAutenticazioneList = new ArrayList<>();
  7201.                     if(ParametriAutenticazioneBasic.CLEAN_HEADER_AUTHORIZATION_TRUE.equals(proprieta.getValore())) {
  7202.                         parametroAutenticazioneList.add(Costanti.CHECK_BOX_DISABLED);
  7203.                     }
  7204.                     else {
  7205.                         parametroAutenticazioneList.add(Costanti.CHECK_BOX_ENABLED);
  7206.                     }
  7207.                     break;
  7208.                 }
  7209.             }
  7210.         }
  7211.         else if(TipoAutenticazione.PRINCIPAL.equals(autenticazione)) {
  7212.             TipoAutenticazionePrincipal tipo = getTipoAutenticazionePrincipal(list);
  7213.             if(tipo==null) {
  7214.                 return null;
  7215.             }
  7216.            
  7217.             // posizione 0: nome o pattern o tipoClaim
  7218.             switch (tipo) {
  7219.             case CONTAINER:
  7220.             case INDIRIZZO_IP:
  7221.             case INDIRIZZO_IP_X_FORWARDED_FOR:
  7222.                 return null;
  7223.             case HEADER:
  7224.             case FORM:
  7225.                 // posizione 0: nome
  7226.                 for (Proprieta proprieta : list) {
  7227.                     if(ParametriAutenticazionePrincipal.NOME.equals(proprieta.getNome())) {
  7228.                         parametroAutenticazioneList = new ArrayList<>();
  7229.                         parametroAutenticazioneList.add(proprieta.getValore());
  7230.                         break;
  7231.                     }
  7232.                 }
  7233.                
  7234.                 // posizione 1: clean
  7235.                 if(parametroAutenticazioneList==null) {
  7236.                     break;
  7237.                 }
  7238.                 for (Proprieta proprieta : list) {
  7239.                     if(ParametriAutenticazionePrincipal.CLEAN_PRINCIPAL.equals(proprieta.getNome())) {
  7240.                         if(ParametriAutenticazionePrincipal.CLEAN_PRINCIPAL_TRUE.equals(proprieta.getValore())) {
  7241.                             parametroAutenticazioneList.add(Costanti.CHECK_BOX_DISABLED);
  7242.                         }
  7243.                         else {
  7244.                             parametroAutenticazioneList.add(Costanti.CHECK_BOX_ENABLED);
  7245.                         }
  7246.                         break;
  7247.                     }
  7248.                 }
  7249.                
  7250.                 break;
  7251.             case URL:
  7252.                 // posizione 0: pattern
  7253.                 for (Proprieta proprieta : list) {
  7254.                     if(ParametriAutenticazionePrincipal.PATTERN.equals(proprieta.getNome())) {
  7255.                         parametroAutenticazioneList = new ArrayList<>();
  7256.                         parametroAutenticazioneList.add(proprieta.getValore());
  7257.                         break;
  7258.                     }
  7259.                 }
  7260.                 break;
  7261.             case TOKEN:
  7262.                 // posizione 0: tipoToken
  7263.                 for (Proprieta proprieta : list) {
  7264.                     if(ParametriAutenticazionePrincipal.TOKEN_CLAIM.equals(proprieta.getNome())) {
  7265.                         parametroAutenticazioneList = new ArrayList<>();
  7266.                         parametroAutenticazioneList.add(proprieta.getValore());
  7267.                         break;
  7268.                     }
  7269.                 }
  7270.                
  7271.                 // posizione 1: nome claim proprietario
  7272.                 if(parametroAutenticazioneList==null) {
  7273.                     break;
  7274.                 }
  7275.                 for (Proprieta proprieta : list) {
  7276.                     if(ParametriAutenticazionePrincipal.NOME.equals(proprieta.getNome())) {
  7277.                         parametroAutenticazioneList.add(proprieta.getValore());
  7278.                         break;
  7279.                     }
  7280.                 }
  7281.             }
  7282.         }
  7283.         else if(TipoAutenticazione.APIKEY.equals(autenticazione)) {
  7284.            
  7285.             parametroAutenticazioneList = new ArrayList<>();
  7286.            
  7287.             // posizione 0: appId
  7288.             _addValoreProprieta(list, ParametriAutenticazioneApiKey.APP_ID, parametroAutenticazioneList);
  7289.            
  7290.             // posizione 1: queryParameter
  7291.             _addValoreProprieta(list, ParametriAutenticazioneApiKey.QUERY_PARAMETER, parametroAutenticazioneList);
  7292.            
  7293.             // posizione 2: header
  7294.             _addValoreProprieta(list, ParametriAutenticazioneApiKey.HEADER, parametroAutenticazioneList);
  7295.            
  7296.             // posizione 3: cookie
  7297.             _addValoreProprieta(list, ParametriAutenticazioneApiKey.COOKIE, parametroAutenticazioneList);
  7298.            
  7299.             // posizione 4: useOAS3Names
  7300.             _addValoreProprieta(list, ParametriAutenticazioneApiKey.USE_OAS3_NAMES, parametroAutenticazioneList);
  7301.            
  7302.             // posizione 5: cleanApiKey
  7303.             _addValoreProprieta(list, ParametriAutenticazioneApiKey.CLEAN_API_KEY, parametroAutenticazioneList);
  7304.            
  7305.             // posizione 6: cleanAppId
  7306.             _addValoreProprieta(list, ParametriAutenticazioneApiKey.CLEAN_APP_ID, parametroAutenticazioneList);
  7307.            
  7308.             // posizione 7: queryParameterApiKey
  7309.             _addValoreProprieta(list, ParametriAutenticazioneApiKey.NOME_QUERY_PARAMETER_API_KEY, parametroAutenticazioneList);
  7310.                        
  7311.             // posizione 8: headerApiKey
  7312.             _addValoreProprieta(list, ParametriAutenticazioneApiKey.NOME_HEADER_API_KEY, parametroAutenticazioneList);
  7313.                        
  7314.             // posizione 9: cookieApiKey
  7315.             _addValoreProprieta(list, ParametriAutenticazioneApiKey.NOME_COOKIE_API_KEY, parametroAutenticazioneList);
  7316.                        
  7317.             // posizione 10: queryParameterAppId
  7318.             _addValoreProprieta(list, ParametriAutenticazioneApiKey.NOME_QUERY_PARAMETER_APP_ID, parametroAutenticazioneList);
  7319.                        
  7320.             // posizione 11: headerAppId
  7321.             _addValoreProprieta(list, ParametriAutenticazioneApiKey.NOME_HEADER_APP_ID, parametroAutenticazioneList);
  7322.            
  7323.             // posizione 12: cookieAppId
  7324.             _addValoreProprieta(list, ParametriAutenticazioneApiKey.NOME_COOKIE_APP_ID, parametroAutenticazioneList);
  7325.            
  7326.         }
  7327.            
  7328.         return parametroAutenticazioneList;
  7329.     }
  7330.    
  7331.     private void _addValoreProprieta(List<Proprieta> list, String nome, List<String> parametroAutenticazioneList) {
  7332.         for (Proprieta proprieta : list) {
  7333.             if(nome.equals(proprieta.getNome())) {
  7334.                 parametroAutenticazioneList.add(proprieta.getValore());
  7335.                 break;
  7336.             }
  7337.         }
  7338.     }

  7339.     public List<Proprieta> convertToAutenticazioneProprieta(String autenticazione, TipoAutenticazionePrincipal autenticazionePrincipal,  List<String> autenticazioneParametroList){
  7340.         List<Proprieta> list = new ArrayList<>();
  7341.         if(TipoAutenticazione.BASIC.equals(autenticazione)) {
  7342.             if(autenticazioneParametroList!=null && !autenticazioneParametroList.isEmpty()) {
  7343.                 for (int i = 0; i < autenticazioneParametroList.size(); i++) {
  7344.                     String autenticazioneParametro = autenticazioneParametroList.get(i);
  7345.                     if(autenticazioneParametro!=null && !"".equals(autenticazioneParametro)) {
  7346.                         Proprieta proprieta = new Proprieta();
  7347.                        
  7348.                         // posizione 0: clean
  7349.                         if(i==0) {
  7350.                             proprieta.setNome(ParametriAutenticazioneBasic.CLEAN_HEADER_AUTHORIZATION);
  7351.                             if(ServletUtils.isCheckBoxEnabled(autenticazioneParametro)) {
  7352.                                 proprieta.setValore(ParametriAutenticazioneBasic.CLEAN_HEADER_AUTHORIZATION_FALSE);
  7353.                             }
  7354.                             else {
  7355.                                 proprieta.setValore(ParametriAutenticazioneBasic.CLEAN_HEADER_AUTHORIZATION_TRUE);
  7356.                             }
  7357.                         }
  7358.                         list.add(proprieta);
  7359.                     }
  7360.                 }
  7361.             }
  7362.         }
  7363.         else if(TipoAutenticazione.PRINCIPAL.equals(autenticazione)) {
  7364.            
  7365.             if(autenticazionePrincipal==null) {
  7366.                 autenticazionePrincipal = TipoAutenticazionePrincipal.CONTAINER;    
  7367.             }
  7368.             Proprieta proprieta = new Proprieta();
  7369.             proprieta.setNome(ParametriAutenticazionePrincipal.TIPO_AUTENTICAZIONE);
  7370.             proprieta.setValore(autenticazionePrincipal.getValue());
  7371.             list.add(proprieta);
  7372.            
  7373.             switch (autenticazionePrincipal) {
  7374.             case CONTAINER:
  7375.             case INDIRIZZO_IP:
  7376.             case INDIRIZZO_IP_X_FORWARDED_FOR:
  7377.                 break;
  7378.             case HEADER:
  7379.             case FORM:
  7380.                 if(autenticazioneParametroList!=null && !autenticazioneParametroList.isEmpty()) {
  7381.                     for (int i = 0; i < autenticazioneParametroList.size(); i++) {
  7382.                         String autenticazioneParametro = autenticazioneParametroList.get(i);
  7383.                         if(autenticazioneParametro!=null && !"".equals(autenticazioneParametro)) {
  7384.                             Proprieta proprietaPar = new Proprieta();
  7385.                            
  7386.                             // posizione 0: nome
  7387.                             if(i==0) {
  7388.                                 proprietaPar.setNome(ParametriAutenticazionePrincipal.NOME);
  7389.                                 proprietaPar.setValore(autenticazioneParametro);
  7390.                             }
  7391.                            
  7392.                             // posizione 1: clean
  7393.                             else if(i==1) {
  7394.                                 proprietaPar.setNome(ParametriAutenticazionePrincipal.CLEAN_PRINCIPAL);
  7395.                                 if(ServletUtils.isCheckBoxEnabled(autenticazioneParametro)) {
  7396.                                     proprietaPar.setValore(ParametriAutenticazionePrincipal.CLEAN_PRINCIPAL_FALSE);
  7397.                                 }
  7398.                                 else {
  7399.                                     proprietaPar.setValore(ParametriAutenticazionePrincipal.CLEAN_PRINCIPAL_TRUE);
  7400.                                 }
  7401.                             }
  7402.                             list.add(proprietaPar);
  7403.                         }
  7404.                     }
  7405.                 }
  7406.                 break;
  7407.             case URL:
  7408.                 if(autenticazioneParametroList!=null && !autenticazioneParametroList.isEmpty()) {
  7409.                     for (int i = 0; i < autenticazioneParametroList.size(); i++) {
  7410.                         String autenticazioneParametro = autenticazioneParametroList.get(i);
  7411.                         if(autenticazioneParametro!=null && !"".equals(autenticazioneParametro)) {
  7412.                             Proprieta proprietaPar = new Proprieta();
  7413.                            
  7414.                             // posizione 0: pattern
  7415.                             if(i==0) {
  7416.                                 proprietaPar.setNome(ParametriAutenticazionePrincipal.PATTERN);
  7417.                                 proprietaPar.setValore(autenticazioneParametro);
  7418.                             }
  7419.                             list.add(proprietaPar);
  7420.                         }
  7421.                     }
  7422.                 }
  7423.                 break;
  7424.             case TOKEN:
  7425.                 if(autenticazioneParametroList!=null && !autenticazioneParametroList.isEmpty()) {
  7426.                     for (int i = 0; i < autenticazioneParametroList.size(); i++) {
  7427.                         String autenticazioneParametro = autenticazioneParametroList.get(i);
  7428.                         if(autenticazioneParametro!=null && !"".equals(autenticazioneParametro)) {
  7429.                             Proprieta proprietaPar = new Proprieta();
  7430.                            
  7431.                             // posizione 0: tipoToken
  7432.                             if(i==0) {
  7433.                                 proprietaPar.setNome(ParametriAutenticazionePrincipal.TOKEN_CLAIM);
  7434.                                 proprietaPar.setValore(autenticazioneParametro);
  7435.                             }
  7436.                            
  7437.                             // posizione 1: nome claim proprietario
  7438.                             else if(i==1) {
  7439.                                 proprietaPar.setNome(ParametriAutenticazionePrincipal.NOME);
  7440.                                 proprietaPar.setValore(autenticazioneParametro);
  7441.                             }
  7442.                             list.add(proprietaPar);
  7443.                         }
  7444.                     }
  7445.                 }
  7446.                 break;
  7447.             }
  7448.         }
  7449.         else if(TipoAutenticazione.APIKEY.equals(autenticazione)) {
  7450.             if(autenticazioneParametroList!=null && !autenticazioneParametroList.isEmpty()) {
  7451.                 for (int i = 0; i < autenticazioneParametroList.size(); i++) {
  7452.                     String autenticazioneParametro = autenticazioneParametroList.get(i);
  7453.                     if(autenticazioneParametro!=null && !"".equals(autenticazioneParametro)) {
  7454.                         Proprieta proprietaPar = new Proprieta();
  7455.                         proprietaPar.setValore(autenticazioneParametro);
  7456.                        
  7457.                         // posizione 0: appId
  7458.                         if(i==0) {
  7459.                             proprietaPar.setNome(ParametriAutenticazioneApiKey.APP_ID);
  7460.                         }
  7461.                         // posizione 1: queryParameter
  7462.                         else if(i==1) {
  7463.                             proprietaPar.setNome(ParametriAutenticazioneApiKey.QUERY_PARAMETER);
  7464.                         }
  7465.                         // posizione 2: header
  7466.                         else if(i==2) {
  7467.                             proprietaPar.setNome(ParametriAutenticazioneApiKey.HEADER);
  7468.                         }
  7469.                         // posizione 3: cookie
  7470.                         else if(i==3) {
  7471.                             proprietaPar.setNome(ParametriAutenticazioneApiKey.COOKIE);
  7472.                         }
  7473.                         // posizione 4: useOAS3Names
  7474.                         else if(i==4) {
  7475.                             proprietaPar.setNome(ParametriAutenticazioneApiKey.USE_OAS3_NAMES);
  7476.                         }
  7477.                         // posizione 5: cleanApiKey
  7478.                         else if(i==5) {
  7479.                             proprietaPar.setNome(ParametriAutenticazioneApiKey.CLEAN_API_KEY);
  7480.                         }
  7481.                         // posizione 6: cleanAppId
  7482.                         else if(i==6) {
  7483.                             proprietaPar.setNome(ParametriAutenticazioneApiKey.CLEAN_APP_ID);
  7484.                         }
  7485.                         // posizione 7: queryParameterApiKey
  7486.                         else if(i==7) {
  7487.                             proprietaPar.setNome(ParametriAutenticazioneApiKey.NOME_QUERY_PARAMETER_API_KEY);
  7488.                         }
  7489.                         // posizione 8: headerApiKey
  7490.                         else if(i==8) {
  7491.                             proprietaPar.setNome(ParametriAutenticazioneApiKey.NOME_HEADER_API_KEY);
  7492.                         }
  7493.                         // posizione 9: cookieApiKey
  7494.                         else if(i==9) {
  7495.                             proprietaPar.setNome(ParametriAutenticazioneApiKey.NOME_COOKIE_API_KEY);
  7496.                         }
  7497.                         // posizione 10: queryParameterAppId
  7498.                         else if(i==10) {
  7499.                             proprietaPar.setNome(ParametriAutenticazioneApiKey.NOME_QUERY_PARAMETER_APP_ID);
  7500.                         }
  7501.                         // posizione 11: headerAppId
  7502.                         else if(i==11) {
  7503.                             proprietaPar.setNome(ParametriAutenticazioneApiKey.NOME_HEADER_APP_ID);
  7504.                         }
  7505.                         // posizione 12: cookieAppId
  7506.                         else if(i==12) {
  7507.                             proprietaPar.setNome(ParametriAutenticazioneApiKey.NOME_COOKIE_APP_ID);
  7508.                         }
  7509.                        
  7510.                         list.add(proprietaPar);
  7511.                     }
  7512.                 }
  7513.             }              
  7514.         }
  7515.         return list;
  7516.     }
  7517.    
  7518.     public List<String> getVersioniProtocollo(String protocollo) throws DriverRegistroServiziNotFound, DriverRegistroServiziException {
  7519.         String nomeMetodo = "getVersioniProtocollo";
  7520.         try{

  7521.             return this.protocolFactoryManager.getProtocolFactoryByName(protocollo).createProtocolConfiguration().getVersioni();

  7522.         }catch (Exception e) {
  7523.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7524.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7525.         }
  7526.     }
  7527.    
  7528.     public String[] getProfiliDiCollaborazioneSupportatiDalProtocollo(String protocollo,ServiceBinding serviceBinding) throws DriverRegistroServiziNotFound, DriverRegistroServiziException {
  7529.         String nomeMetodo = "getProfiliDiCollaborazioneSupportatiDalProtocollo";
  7530.         List<String> lstProt = new ArrayList<>();
  7531.         try{
  7532.             if(isProfiloDiCollaborazioneSupportatoDalProtocollo(protocollo, serviceBinding, ProfiloDiCollaborazione.ONEWAY))
  7533.                 lstProt.add(CostantiRegistroServizi.ONEWAY.toString());

  7534.             if(isProfiloDiCollaborazioneSupportatoDalProtocollo(protocollo, serviceBinding, ProfiloDiCollaborazione.SINCRONO))
  7535.                 lstProt.add(CostantiRegistroServizi.SINCRONO.toString());
  7536.            
  7537.             if(isProfiloDiCollaborazioneSupportatoDalProtocollo(protocollo, serviceBinding, ProfiloDiCollaborazione.ASINCRONO_SIMMETRICO))
  7538.                 lstProt.add(CostantiRegistroServizi.ASINCRONO_SIMMETRICO.toString());
  7539.            
  7540.             if(isProfiloDiCollaborazioneSupportatoDalProtocollo(protocollo, serviceBinding, ProfiloDiCollaborazione.ASINCRONO_ASIMMETRICO))
  7541.                 lstProt.add(CostantiRegistroServizi.ASINCRONO_ASIMMETRICO.toString());
  7542.            
  7543.             return lstProt.toArray(new String[lstProt.size()]);
  7544.         }catch (Exception e) {
  7545.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7546.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7547.         }
  7548.     }
  7549.    
  7550.     public String[] getProfiliDiCollaborazioneSupportatiDalProtocolloDefault(ServiceBinding serviceBinding) throws DriverRegistroServiziNotFound, DriverRegistroServiziException {
  7551.         String nomeMetodo = "getProfiliDiCollaborazioneSupportatiDalProtocolloDefault";
  7552.         List<String> lstProt = new ArrayList<>();
  7553.         try{
  7554.             if(isProfiloDiCollaborazioneSupportatoDalProtocolloDefault(serviceBinding, ProfiloDiCollaborazione.ONEWAY))
  7555.                 lstProt.add(CostantiRegistroServizi.ONEWAY.toString());

  7556.             if(isProfiloDiCollaborazioneSupportatoDalProtocolloDefault(serviceBinding, ProfiloDiCollaborazione.SINCRONO))
  7557.                 lstProt.add(CostantiRegistroServizi.SINCRONO.toString());
  7558.            
  7559.             if(isProfiloDiCollaborazioneSupportatoDalProtocolloDefault(serviceBinding, ProfiloDiCollaborazione.ASINCRONO_SIMMETRICO))
  7560.                 lstProt.add(CostantiRegistroServizi.ASINCRONO_SIMMETRICO.toString());
  7561.            
  7562.             if(isProfiloDiCollaborazioneSupportatoDalProtocolloDefault(serviceBinding, ProfiloDiCollaborazione.ASINCRONO_ASIMMETRICO))
  7563.                 lstProt.add(CostantiRegistroServizi.ASINCRONO_ASIMMETRICO.toString());
  7564.            
  7565.             return lstProt.toArray(new String[lstProt.size()]);
  7566.         }catch (Exception e) {
  7567.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7568.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7569.         }
  7570.     }
  7571.    
  7572.     public String getVersioneDefaultProtocollo(String protocollo) throws DriverRegistroServiziNotFound, DriverRegistroServiziException {
  7573.         String nomeMetodo = "getVersioneDefaultProtocollo";
  7574.         try{

  7575.             return this.protocolFactoryManager.getProtocolFactoryByName(protocollo).createProtocolConfiguration().getVersioneDefault();

  7576.         }catch (Exception e) {
  7577.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7578.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7579.         }
  7580.     }
  7581.    
  7582.     public boolean isProfiloDiCollaborazioneAsincronoSupportatoDalProtocolloDefault(ServiceBinding serviceBinding) throws DriverRegistroServiziNotFound, DriverRegistroServiziException {
  7583.         String nomeMetodo = "isProfiloDiCollaborazioneAsincronoSupportatoDalProtocolloDefault";
  7584.         try{
  7585.             return this.protocolFactoryManager.getDefaultProtocolFactory().createProtocolConfiguration().isSupportato(serviceBinding,ProfiloDiCollaborazione.ASINCRONO_ASIMMETRICO)
  7586.                     || this.protocolFactoryManager.getDefaultProtocolFactory().createProtocolConfiguration().isSupportato(serviceBinding,ProfiloDiCollaborazione.ASINCRONO_SIMMETRICO)
  7587.                     ;
  7588.         }catch (Exception e) {
  7589.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7590.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7591.         }
  7592.     }
  7593.    
  7594.     public boolean isProfiloDiCollaborazioneAsincronoSupportatoDalProtocollo(String protocollo,ServiceBinding serviceBinding) throws DriverRegistroServiziNotFound, DriverRegistroServiziException {
  7595.         String nomeMetodo = "isProfiloDiCollaborazioneAsincronoSupportatoDalProtocollo";
  7596.         try{
  7597.             return this.protocolFactoryManager.getProtocolFactoryByName(protocollo).createProtocolConfiguration().isSupportato(serviceBinding,ProfiloDiCollaborazione.ASINCRONO_ASIMMETRICO)
  7598.                     || this.protocolFactoryManager.getProtocolFactoryByName(protocollo).createProtocolConfiguration().isSupportato(serviceBinding,ProfiloDiCollaborazione.ASINCRONO_SIMMETRICO);
  7599.         }catch (Exception e) {
  7600.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7601.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7602.         }
  7603.     }
  7604.    
  7605.    
  7606.     public boolean isProfiloDiCollaborazioneSupportatoDalProtocolloDefault(ServiceBinding serviceBinding,ProfiloDiCollaborazione profiloCollaborazione) throws DriverRegistroServiziNotFound, DriverRegistroServiziException {
  7607.         String nomeMetodo = "isProfiloDiCollaborazioneSupportatoDalProtocolloDefault";
  7608.         try{
  7609.             return this.protocolFactoryManager.getDefaultProtocolFactory().createProtocolConfiguration().isSupportato(serviceBinding, profiloCollaborazione );
  7610.         }catch (Exception e) {
  7611.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7612.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7613.         }
  7614.     }
  7615.    
  7616.     public boolean isProfiloDiCollaborazioneSupportatoDalProtocollo(String protocollo,ServiceBinding serviceBinding, ProfiloDiCollaborazione profiloCollaborazione) throws DriverRegistroServiziNotFound, DriverRegistroServiziException {
  7617.         String nomeMetodo = "isProfiloDiCollaborazioneSupportatoDalProtocollo";
  7618.         try{
  7619.             return this.protocolFactoryManager.getProtocolFactoryByName(protocollo).createProtocolConfiguration().isSupportato(serviceBinding,profiloCollaborazione );
  7620.         }catch (Exception e) {
  7621.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7622.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7623.         }
  7624.     }
  7625.        
  7626.     public boolean isFunzionalitaProtocolloSupportataDalProtocollo(String protocollo,ServiceBinding serviceBinding, FunzionalitaProtocollo funzionalitaProtocollo) throws DriverRegistroServiziNotFound, DriverRegistroServiziException {
  7627.         String nomeMetodo = "isFunzionalitaProtocolloSupportataDalProtocollo";
  7628.         try{
  7629.             if(this.isProfiloModIPA(protocollo)) {
  7630.                 if(FunzionalitaProtocollo.FILTRO_DUPLICATI.equals(funzionalitaProtocollo)) {
  7631.                     return false;
  7632.                 }
  7633.             }
  7634.             return this.protocolFactoryManager.getProtocolFactoryByName(protocollo).createProtocolConfiguration().isSupportato(serviceBinding,funzionalitaProtocollo);
  7635.         }catch (Exception e) {
  7636.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7637.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7638.         }
  7639.     }
  7640.    
  7641.     public List<ServiceBinding> getServiceBindingList(IProtocolFactory<?> protocolFactory) throws DriverConfigurazioneException{
  7642.         String nomeMetodo = "getServiceBindingList";
  7643.         List<ServiceBinding> lst = new ArrayList<>();
  7644.         try {
  7645.             ServiceBindingConfiguration defaultServiceBindingConfiguration = protocolFactory.createProtocolConfiguration().getDefaultServiceBindingConfiguration(null);
  7646.             if(defaultServiceBindingConfiguration.isServiceBindingSupported(ServiceBinding.REST))
  7647.                 lst.add(ServiceBinding.REST);
  7648.             if(defaultServiceBindingConfiguration.isServiceBindingSupported(ServiceBinding.SOAP))
  7649.                 lst.add(ServiceBinding.SOAP);
  7650.         } catch (Exception e) {
  7651.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7652.             throw new DriverConfigurazioneException(getPrefixError(nomeMetodo,  e),e);
  7653.         }
  7654.         return lst;
  7655.     }
  7656.    
  7657.     public List<ServiceBinding> getServiceBindingListProtocollo(String protocollo) throws DriverConfigurazioneException{
  7658.         String nomeMetodo = "getServiceBindingListProtocollo";
  7659.         List<ServiceBinding> lst = new ArrayList<>();
  7660.         try {
  7661.             IProtocolFactory<?> protocolFactory = this.protocolFactoryManager.getProtocolFactoryByName(protocollo);
  7662.             ServiceBindingConfiguration defaultServiceBindingConfiguration = protocolFactory.createProtocolConfiguration().getDefaultServiceBindingConfiguration(null);
  7663.             if(defaultServiceBindingConfiguration.isServiceBindingSupported(ServiceBinding.REST))
  7664.                 lst.add(ServiceBinding.REST);
  7665.             if(defaultServiceBindingConfiguration.isServiceBindingSupported(ServiceBinding.SOAP))
  7666.                 lst.add(ServiceBinding.SOAP);
  7667.         } catch (Exception e) {
  7668.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7669.             throw new DriverConfigurazioneException(getPrefixError(nomeMetodo,  e),e);
  7670.         }
  7671.         return lst;
  7672.     }
  7673.    
  7674.     public List<MessageType> getMessageTypeList(IProtocolFactory<?> protocolFactory,ServiceBinding serviceBinding) throws DriverConfigurazioneException{
  7675.         String nomeMetodo = "getMessageTypeList";
  7676.         List<MessageType> messageTypeSupported = new ArrayList<>();
  7677.         try {
  7678.             ServiceBindingConfiguration defaultServiceBindingConfiguration = protocolFactory.createProtocolConfiguration().getDefaultServiceBindingConfiguration(null);
  7679.             messageTypeSupported = defaultServiceBindingConfiguration.getMessageTypeSupported(serviceBinding);
  7680.         } catch (Exception e) {
  7681.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7682.             throw new DriverConfigurazioneException(getPrefixError(nomeMetodo,  e),e);
  7683.         }
  7684.         return messageTypeSupported;
  7685.     }
  7686.    
  7687.    
  7688.     public List<InterfaceType> getInterfaceTypeList(IProtocolFactory<?> protocolFactory,ServiceBinding serviceBinding) throws DriverConfigurazioneException{
  7689.         String nomeMetodo = "getInterfaceTypeList";
  7690.         List<InterfaceType> interfacceSupportate = new ArrayList<>();
  7691.         try {
  7692.             interfacceSupportate = protocolFactory.createProtocolConfiguration().getInterfacceSupportate(serviceBinding);
  7693.         } catch (Exception e) {
  7694.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7695.             throw new DriverConfigurazioneException(getPrefixError(nomeMetodo,  e),e);
  7696.         }
  7697.         return interfacceSupportate;
  7698.     }
  7699.    
  7700.     public List<InterfaceType> getInterfaceTypeList(String protocollo, ServiceBinding serviceBinding) throws DriverConfigurazioneException{
  7701.         String nomeMetodo = "getInterfaceTypeList";
  7702.         List<InterfaceType> interfacceSupportate = new ArrayList<>();
  7703.         try {
  7704.             interfacceSupportate = this.protocolFactoryManager.getProtocolFactoryByName(protocollo).createProtocolConfiguration().getInterfacceSupportate(serviceBinding);
  7705.         } catch (Exception e) {
  7706.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7707.             throw new DriverConfigurazioneException(getPrefixError(nomeMetodo,  e),e);
  7708.         }
  7709.         return interfacceSupportate;
  7710.     }
  7711.    
  7712.     public ServiceBinding getDefaultServiceBinding(IProtocolFactory<?> protocolFactory) throws DriverConfigurazioneException{
  7713.         String nomeMetodo = "getDefaultServiceBinding";
  7714.         try {
  7715.             ServiceBindingConfiguration defaultServiceBindingConfiguration = protocolFactory.createProtocolConfiguration().getDefaultServiceBindingConfiguration(null);
  7716.             return defaultServiceBindingConfiguration.getDefaultBinding();
  7717.         } catch (Exception e) {
  7718.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7719.             throw new DriverConfigurazioneException(getPrefixError(nomeMetodo,  e),e);
  7720.         }
  7721.     }
  7722.    
  7723.     public List<String> getAzioni(AccordoServizioParteSpecifica asps,AccordoServizioParteComuneSintetico aspc,
  7724.             boolean addTrattinoSelezioneNonEffettuata, boolean throwException, List<String> filtraAzioniUtilizzate) throws DriverConfigurazioneException{
  7725.         return AzioniUtils.getAzioni(asps, aspc,
  7726.                 addTrattinoSelezioneNonEffettuata, throwException, filtraAzioniUtilizzate,
  7727.                 CostantiControlStation.DEFAULT_VALUE_AZIONE_RISORSA_NON_SELEZIONATA, ControlStationCore.log);
  7728.     }
  7729.    
  7730.     public Map<String,String> getMapAzioni(AccordoServizioParteSpecifica asps,AccordoServizioParteComuneSintetico aspc,
  7731.             boolean addTrattinoSelezioneNonEffettuata, boolean throwException, List<String> filtraAzioniUtilizzate,
  7732.             boolean sortByLabel, boolean sortFirstByPath // per soap questi due parametri sono  ininfluenti
  7733.             ) throws DriverConfigurazioneException{
  7734.         return AzioniUtils.getMapAzioni(asps, aspc,
  7735.                 addTrattinoSelezioneNonEffettuata, throwException, filtraAzioniUtilizzate,
  7736.                 sortByLabel, sortFirstByPath,
  7737.                 CostantiControlStation.DEFAULT_VALUE_AZIONE_RISORSA_NON_SELEZIONATA, CostantiControlStation.DEFAULT_VALUE_AZIONE_RISORSA_NON_SELEZIONATA, ControlStationCore.log);
  7738.     }
  7739.    
  7740.     public Map<String,String> getAzioniConLabel(AccordoServizioParteSpecifica asps,AccordoServizioParteComuneSintetico aspc,
  7741.             boolean addTrattinoSelezioneNonEffettuata, boolean throwException, List<String> filtraAzioniUtilizzate) throws DriverConfigurazioneException {
  7742.         return getMapAzioni(asps, aspc, addTrattinoSelezioneNonEffettuata, throwException, filtraAzioniUtilizzate,
  7743.                 true, true);
  7744.     }
  7745.    
  7746.     public ServiceBinding toMessageServiceBinding(org.openspcoop2.core.registry.constants.ServiceBinding serviceBinding) {
  7747.         if(serviceBinding == null)
  7748.             return null;
  7749.        
  7750.         switch (serviceBinding) {
  7751.         case REST:
  7752.             return ServiceBinding.REST;
  7753.         case SOAP:
  7754.         default:
  7755.             return ServiceBinding.SOAP;
  7756.         }          
  7757.     }
  7758.    
  7759.     public String convertPrefixConfigDelGruppo(String prefix) {
  7760.         String key = " di ";
  7761.         if(prefix.endsWith(key)) {
  7762.             return prefix.substring(0, prefix.length()-key.length())+CostantiControlStation.LABEL_DEL_GRUPPO;
  7763.         }
  7764.         return prefix;
  7765.     }
  7766.    
  7767.     public String getLabelGroup(String groupName) {
  7768.         return "'"+groupName+"'";
  7769.     }
  7770.    
  7771.     public String convertPrefixConfigDelConnettore(String prefix) {
  7772.         String key = " di ";
  7773.         if(prefix.endsWith(key)) {
  7774.             return prefix.substring(0, prefix.length()-key.length())+CostantiControlStation.LABEL_DEL_CONNETTORE;
  7775.         }
  7776.         return prefix;
  7777.     }
  7778.    
  7779.     public org.openspcoop2.core.registry.constants.ServiceBinding fromMessageServiceBinding(ServiceBinding serviceBinding) {
  7780.         if(serviceBinding == null)
  7781.             return null;
  7782.        
  7783.         switch (serviceBinding) {
  7784.         case REST:
  7785.             return org.openspcoop2.core.registry.constants.ServiceBinding.REST;
  7786.         case SOAP:
  7787.         default:
  7788.             return org.openspcoop2.core.registry.constants.ServiceBinding.SOAP;
  7789.         }          
  7790.     }
  7791.    
  7792.     public MessageType toMessageMessageType(org.openspcoop2.core.registry.constants.MessageType messageType) {
  7793.         if(messageType == null)
  7794.             return null;
  7795.        
  7796.         switch (messageType) {
  7797.         case BINARY:
  7798.             return MessageType.BINARY;
  7799.         case JSON:
  7800.             return MessageType.JSON;
  7801.         case MIME_MULTIPART:
  7802.             return MessageType.MIME_MULTIPART;
  7803.         case SOAP_11:
  7804.             return MessageType.SOAP_11;
  7805.         case SOAP_12:
  7806.             return MessageType.SOAP_12;
  7807.         case XML:
  7808.         default:
  7809.             return MessageType.XML;
  7810.        
  7811.         }          
  7812.     }
  7813.    
  7814.     public org.openspcoop2.core.registry.constants.MessageType fromMessageMessageType(MessageType messageType) {
  7815.         if(messageType == null)
  7816.             return null;
  7817.        
  7818.         switch (messageType) {
  7819.         case BINARY:
  7820.             return org.openspcoop2.core.registry.constants.MessageType.BINARY;
  7821.         case JSON:
  7822.             return org.openspcoop2.core.registry.constants.MessageType.JSON;
  7823.         case MIME_MULTIPART:
  7824.             return org.openspcoop2.core.registry.constants.MessageType.MIME_MULTIPART;
  7825.         case SOAP_11:
  7826.             return org.openspcoop2.core.registry.constants.MessageType.SOAP_11;
  7827.         case SOAP_12:
  7828.             return org.openspcoop2.core.registry.constants.MessageType.SOAP_12;
  7829.         case XML:
  7830.         default:
  7831.             return org.openspcoop2.core.registry.constants.MessageType.XML;
  7832.        
  7833.         }          
  7834.     }
  7835.    
  7836.     public InterfaceType formatoSpecifica2InterfaceType(org.openspcoop2.core.registry.constants.FormatoSpecifica formatoSpecifica) {
  7837.         if(formatoSpecifica == null)
  7838.             return null;
  7839.        
  7840.         switch (formatoSpecifica) {
  7841.         case SWAGGER_2:
  7842.             return InterfaceType.SWAGGER_2;
  7843.         case OPEN_API_3:
  7844.             return InterfaceType.OPEN_API_3;
  7845.         case WADL:
  7846.             return InterfaceType.WADL;

  7847.            
  7848.         case WSDL_11:
  7849.         default:
  7850.             return InterfaceType.WSDL_11;
  7851.         }          
  7852.     }
  7853.    
  7854.     public org.openspcoop2.core.registry.constants.FormatoSpecifica interfaceType2FormatoSpecifica(InterfaceType formatoSpecifica) {
  7855.         if(formatoSpecifica == null)
  7856.             return null;
  7857.        
  7858.         switch (formatoSpecifica) {
  7859.         case SWAGGER_2:
  7860.             return org.openspcoop2.core.registry.constants.FormatoSpecifica.SWAGGER_2;
  7861.         case OPEN_API_3:
  7862.             return org.openspcoop2.core.registry.constants.FormatoSpecifica.OPEN_API_3;
  7863.         case WADL:
  7864.             return org.openspcoop2.core.registry.constants.FormatoSpecifica.WADL;
  7865.            
  7866.         case WSDL_11:
  7867.         default:
  7868.             return org.openspcoop2.core.registry.constants.FormatoSpecifica.WSDL_11;
  7869.         }          
  7870.     }
  7871.    
  7872.     public List<IExtendedMenu> getExtendedMenu(){
  7873.         return this.pluginMenu;
  7874.     }
  7875.    
  7876.     public List<IExtendedFormServlet> getExtendedServletConfigurazione(){
  7877.         return this.pluginConfigurazione;
  7878.     }
  7879.    
  7880.     public IExtendedListServlet getExtendedServletConfigurazioneList(ConsoleHelper consoleHelper){
  7881.         String tmp = consoleHelper.getRequest().getParameter(CostantiControlStation.PARAMETRO_EXTENDED_FORM_ID);
  7882.         if(tmp!=null && !"".equals(tmp)){
  7883.             return this.pluginConfigurazioneList.get(tmp);
  7884.         }
  7885.         return null;
  7886.     }
  7887.    
  7888.     public List<IExtendedConnettore> getExtendedConnettore(){
  7889.         return this.pluginConnettore;
  7890.     }
  7891.    
  7892.     public IExtendedListServlet getExtendedServletPortaDelegata(){
  7893.         return this.pluginPortaDelegata;
  7894.     }
  7895.    
  7896.     public IExtendedListServlet getExtendedServletPortaApplicativa(){
  7897.         return this.pluginPortaApplicativa;
  7898.     }
  7899.    
  7900.     /***
  7901.      * utilizzo Lucida sans come font di dafault poiche' e' generalmente presente nella jdk
  7902.      *
  7903.      * @return Font di defualt dell'applicazione
  7904.      */
  7905.     public Font getDefaultFont() {
  7906.         if(this.defaultFont == null)
  7907.             this.defaultFont = new Font("Lucida Sans", Font.PLAIN , 14);

  7908.         return this.defaultFont;
  7909.     }
  7910.     public void setDefaultFont(Font defaultFont) {
  7911.         this.defaultFont = defaultFont;
  7912.     }
  7913.    
  7914.     // UTILITIES misurazione dimensione text
  7915.     public Integer getFontWidth(String text){
  7916.         return getFontWidth(text, this.getDefaultFont());
  7917.     }
  7918.    
  7919.     public Integer getFontWidth(String text, int fontSize){
  7920.         Font defaultFont2 = this.getDefaultFont();
  7921.         return getFontWidth(text, defaultFont2.getFontName(), defaultFont2.getStyle(), fontSize);
  7922.     }
  7923.    
  7924.     public Integer getFontWidth(String text, int fontStyle, int fontSize){
  7925.         Font defaultFont2 = this.getDefaultFont();
  7926.         return getFontWidth(text, defaultFont2.getFontName(), fontStyle, fontSize);
  7927.     }

  7928.     public Integer getFontWidth(String text, String fontName, int fontStyle, int fontSize){
  7929.         Font fontToCheck = new Font(fontName,  fontStyle , fontSize);
  7930.         return getFontWidth(text, fontToCheck);
  7931.     }


  7932.     public Integer getFontWidth(String text, Font fontToCheck){
  7933.         if(this.fontRenderContext == null){
  7934.             if(this.affineTransform == null)
  7935.                 this.affineTransform = new AffineTransform();

  7936.             this.fontRenderContext = new FontRenderContext(this.affineTransform,true,true);
  7937.         }

  7938.         Rectangle2D rectangle2d = fontToCheck.getStringBounds(text, this.fontRenderContext);
  7939.         return (int) rectangle2d.getWidth();
  7940.     }
  7941.    
  7942.     public boolean isProfiloModIPA(String protocollo) {
  7943.         try {
  7944.             return protocollo!=null && protocollo.equals(CostantiLabel.MODIPA_PROTOCOL_NAME);
  7945.         }catch(Throwable t) {
  7946.             return false;
  7947.         }
  7948.     }
  7949.    
  7950.     public boolean isProfiloModIPAEnabled() {
  7951.         try {
  7952.             Enumeration<String> en = ProtocolFactoryManager.getInstance().getProtocolNames();
  7953.             while (en.hasMoreElements()) {
  7954.                 String protocollo = (String) en.nextElement();
  7955.                 if(protocollo.equals(CostantiLabel.MODIPA_PROTOCOL_NAME)) {
  7956.                     return true;
  7957.                 }
  7958.             }
  7959.             return false;
  7960.         }catch(Throwable t) {
  7961.             return false;
  7962.         }
  7963.     }
  7964.    
  7965.     public void setSearchAfterAdd(int idLista, String search, HttpServletRequest request, HttpSession session, ISearch ricerca) {
  7966.         ricerca.setSearchString(idLista, search);
  7967.         ricerca.setIndexIniziale(idLista, Costanti.INDEX_DEFAULT);
  7968.         /**ricerca.setPageSize(idLista, Costanti.PAGE_SIZE_DEFAULT);*/
  7969.         ricerca.setNumEntries(idLista, Costanti.NUM_ENTRIES_DEFAULT);
  7970.         ServletUtils.removeRisultatiRicercaFromSession(request, session, idLista);      
  7971.     }
  7972.    
  7973.     private void _cryptPassword(ServizioApplicativo sa) throws UtilsException {
  7974.         if(this.isApplicativiPasswordEncryptEnabled() && this.applicativiPwManager!=null) {
  7975.             if(sa.getInvocazionePorta()!=null && sa.getInvocazionePorta().sizeCredenzialiList()>0) {
  7976.                 for (Credenziali credenziali : sa.getInvocazionePorta().getCredenzialiList()) {
  7977.                     if(StringUtils.isNotEmpty(credenziali.getPassword()) && !credenziali.isCertificateStrictVerification()) {
  7978.                         credenziali.setPassword(this.applicativiPwManager.crypt(credenziali.getPassword()));
  7979.                         credenziali.setCertificateStrictVerification(true); // viene salvata a true per salvare l'informazione che รจ cifrata
  7980.                     }
  7981.                 }
  7982.             }
  7983.         }
  7984.     }
  7985.    
  7986.     private void _cryptPassword(org.openspcoop2.core.registry.Soggetto soggetto) throws UtilsException {
  7987.         if(this.isSoggettiPasswordEncryptEnabled() && this.soggettiPwManager!=null) {
  7988.             if(soggetto.sizeCredenzialiList()>0) {
  7989.                 for (CredenzialiSoggetto credenziali : soggetto.getCredenzialiList()) {
  7990.                     if(StringUtils.isNotEmpty(credenziali.getPassword()) && !credenziali.isCertificateStrictVerification()) {
  7991.                         credenziali.setPassword(this.applicativiPwManager.crypt(credenziali.getPassword()));
  7992.                         credenziali.setCertificateStrictVerification(true); // viene salvata a true per salvare l'informazione che รจ cifrata
  7993.                     }
  7994.                 }
  7995.             }
  7996.         }
  7997.     }

  7998.     private void cryptPassword(Tipologia[] tipoOperazione, Object ... oggetti) throws UtilsException {
  7999.         if(oggetti!=null && oggetti.length>0) {
  8000.             for (int i = 0; i < oggetti.length; i++) {
  8001.                 Object oggetto = oggetti[i];
  8002.                
  8003.                 Tipologia tipo = tipoOperazione[i];
  8004.                
  8005.                 if(!Tipologia.ADD.equals(tipo) && !Tipologia.CHANGE.equals(tipo)) {
  8006.                     continue;
  8007.                 }
  8008.                
  8009.                 if (oggetto instanceof SoggettoCtrlStat) {
  8010.                     SoggettoCtrlStat soggetto = (SoggettoCtrlStat) oggetto;
  8011.                     if(soggetto.getSoggettoReg()!=null) {
  8012.                         this._cryptPassword(soggetto.getSoggettoReg());
  8013.                     }
  8014.                 }
  8015.                 else if (oggetto instanceof org.openspcoop2.core.registry.Soggetto) {
  8016.                     org.openspcoop2.core.registry.Soggetto sogReg = (org.openspcoop2.core.registry.Soggetto) oggetto;
  8017.                     this._cryptPassword(sogReg);
  8018.                 }
  8019.                 else if (oggetto instanceof ServizioApplicativo) {
  8020.                     ServizioApplicativo sa = (ServizioApplicativo) oggetto;
  8021.                     this._cryptPassword(sa);
  8022.                 }
  8023.                
  8024.             }
  8025.         }
  8026.     }
  8027.    
  8028.     public void setProprietaOggetto(String superUser, Tipologia[] operationTypes, Object ... oggetti) {
  8029.         if(oggetti!=null && oggetti.length>0) {
  8030.             for (int i = 0; i < oggetti.length; i++) {
  8031.                 Object oggetto = oggetti[i];
  8032.                 Tipologia operationType = operationTypes[i];
  8033.                
  8034.                 boolean create = Tipologia.ADD.equals(operationType);
  8035.                 boolean update = Tipologia.CHANGE.equals(operationType);
  8036.                
  8037.                 if(!create && !update) {
  8038.                     continue;
  8039.                 }
  8040.                
  8041.                 setProprietaOggettoSoggetto(superUser, oggetto, create, update);
  8042.                
  8043.                 setProprietaOggettoAccordoServizioParteComune(superUser, oggetto, create, update);
  8044.                
  8045.                 setProprietaOggettoAccordoServizioParteSpecifica(superUser, oggetto, create, update);
  8046.                
  8047.                 setProprietaOggettoRuolo(superUser, oggetto, create, update);
  8048.                
  8049.                 setProprietaOggettoScope(superUser, oggetto, create, update);
  8050.                
  8051.                 setProprietaOggettoGruppo(superUser, oggetto, create, update);
  8052.                
  8053.                 setProprietaOggettoPortaDelegata(superUser, oggetto, create, update);
  8054.                
  8055.                 setProprietaOggettoPortaApplicativa(superUser, oggetto, create, update);
  8056.                
  8057.                 setProprietaOggettoServizioApplicativo(superUser, oggetto, create, update);
  8058.                
  8059.                 setProprietaOggettoGenericProperties(superUser, oggetto, create, update);
  8060.                
  8061.             }
  8062.         }
  8063.     }
  8064.     private void setProprietaOggettoSoggetto(String superUser, Object oggetto, boolean create, boolean update) {
  8065.         org.openspcoop2.core.registry.ProprietaOggetto pOggetto = null;
  8066.         if (oggetto instanceof SoggettoCtrlStat) {
  8067.             SoggettoCtrlStat soggetto = (SoggettoCtrlStat) oggetto;
  8068.             if(soggetto.getSoggettoReg()!=null) {
  8069.                 if(create && soggetto.getSoggettoReg().getProprietaOggetto()==null) {
  8070.                     soggetto.getSoggettoReg().setProprietaOggetto(new org.openspcoop2.core.registry.ProprietaOggetto());    
  8071.                 }
  8072.                 pOggetto = soggetto.getSoggettoReg().getProprietaOggetto();
  8073.             }
  8074.         }
  8075.         else if (oggetto instanceof org.openspcoop2.core.registry.Soggetto) {
  8076.             org.openspcoop2.core.registry.Soggetto sogReg = (org.openspcoop2.core.registry.Soggetto) oggetto;
  8077.             if(create && sogReg.getProprietaOggetto()==null) {
  8078.                 sogReg.setProprietaOggetto(new org.openspcoop2.core.registry.ProprietaOggetto());  
  8079.             }
  8080.             pOggetto = sogReg.getProprietaOggetto();
  8081.         }
  8082.         setProprietaOggetto(superUser, pOggetto, create, update);
  8083.     }
  8084.     private void setProprietaOggettoAccordoServizioParteComune(String superUser, Object oggetto, boolean create, boolean update) {
  8085.         org.openspcoop2.core.registry.ProprietaOggetto pOggetto = null;
  8086.         if (oggetto instanceof AccordoServizioParteComune) {
  8087.             AccordoServizioParteComune a = (AccordoServizioParteComune) oggetto;
  8088.             if(create && a.getProprietaOggetto()==null) {
  8089.                 a.setProprietaOggetto(new org.openspcoop2.core.registry.ProprietaOggetto());    
  8090.             }
  8091.             pOggetto = a.getProprietaOggetto();
  8092.         }
  8093.         setProprietaOggetto(superUser, pOggetto, create, update);
  8094.     }
  8095.     private void setProprietaOggettoAccordoServizioParteSpecifica(String superUser, Object oggetto, boolean create, boolean update) {
  8096.         org.openspcoop2.core.registry.ProprietaOggetto pOggetto = null;
  8097.         if (oggetto instanceof AccordoServizioParteSpecifica) {
  8098.             AccordoServizioParteSpecifica a = (AccordoServizioParteSpecifica) oggetto;
  8099.            
  8100.             // per gli aggiornamenti i casi da gestire sono:
  8101.             // modifica solo dei dati di un fruizione (si usa setDataAggiornamentoFruitore)
  8102.             // modifica solo dei dati di una erogazione (si usa setDataAggiornamentoServizio)
  8103.             // modifica effettuata in una fruizione o in una erogazione che comunque impatta su tutte le fruizioni/erogazioni esistenti
  8104.            
  8105.             boolean isFruitoreSingolo = setProprietaOggettoAccordoServizioParteSpecificaFruitore(superUser, a);
  8106.            
  8107.             if(!isFruitoreSingolo) {
  8108.                 if(create && a.getProprietaOggetto()==null) {
  8109.                     a.setProprietaOggetto(new org.openspcoop2.core.registry.ProprietaOggetto());    
  8110.                 }
  8111.                 pOggetto = a.getProprietaOggetto();
  8112.                
  8113.                 if(isDataAggiornamentoServizio(a) ) {
  8114.                     setProprietaOggettoAccordoServizioParteSpecificaResetFruitori(a);
  8115.                 }
  8116.             }
  8117.         }
  8118.         setProprietaOggetto(superUser, pOggetto, create, update);
  8119.     }
  8120.     private void setProprietaOggettoAccordoServizioParteSpecificaResetFruitori(AccordoServizioParteSpecifica a) {
  8121.         if(a.sizeFruitoreList()>0) {
  8122.             for (Fruitore fr : a.getFruitoreList()) {
  8123.                 fr.setProprietaOggetto(null); // per non far aggiornare visto che la modifica non riguarda il fruitore
  8124.             }
  8125.         }
  8126.     }
  8127.    
  8128.     private static final Date DATA_CREAZIONE = new Date(0);
  8129.     public void setDataCreazioneFruitore(Fruitore fr) {
  8130.         if(fr!=null) {
  8131.             if(fr.getProprietaOggetto()==null) {
  8132.                 fr.setProprietaOggetto(new org.openspcoop2.core.registry.ProprietaOggetto());
  8133.             }
  8134.             fr.getProprietaOggetto().setDataCreazione(DATA_CREAZIONE);
  8135.         }
  8136.     }
  8137.     private boolean isDataCreazioneFruitore(Fruitore fr) {
  8138.         return fr!=null && fr.getProprietaOggetto()!=null &&
  8139.                 fr.getProprietaOggetto().getDataCreazione()!=null &&
  8140.                 DATA_CREAZIONE.equals(fr.getProprietaOggetto().getDataCreazione());
  8141.     }
  8142.    
  8143.     private static final Date DATA_AGGIORNAMENTO = new Date(0);
  8144.     private boolean isDataAggiornamentoServizio(AccordoServizioParteSpecifica asps) {
  8145.         return asps!=null && asps.getProprietaOggetto()!=null &&
  8146.                 asps.getProprietaOggetto().getDataUltimaModifica()!=null &&
  8147.                 DATA_AGGIORNAMENTO.equals(asps.getProprietaOggetto().getDataUltimaModifica());
  8148.     }
  8149.     public void setDataAggiornamentoServizio(AccordoServizioParteSpecifica asps) {
  8150.         if(asps!=null) {
  8151.             if(asps.getProprietaOggetto()==null) {
  8152.                 asps.setProprietaOggetto(new org.openspcoop2.core.registry.ProprietaOggetto());
  8153.             }
  8154.             asps.getProprietaOggetto().setDataUltimaModifica(DATA_AGGIORNAMENTO);
  8155.         }
  8156.     }
  8157.     public void setDataAggiornamentoFruitore(Fruitore fr) {
  8158.         if(fr!=null) {
  8159.             if(fr.getProprietaOggetto()==null) {
  8160.                 fr.setProprietaOggetto(new org.openspcoop2.core.registry.ProprietaOggetto());
  8161.             }
  8162.             fr.getProprietaOggetto().setDataUltimaModifica(DATA_AGGIORNAMENTO);
  8163.         }
  8164.     }
  8165.     private boolean isDataAggiornamentoFruitore(Fruitore fr) {
  8166.         return fr!=null && fr.getProprietaOggetto()!=null &&
  8167.                 fr.getProprietaOggetto().getDataUltimaModifica()!=null &&
  8168.                 DATA_AGGIORNAMENTO.equals(fr.getProprietaOggetto().getDataUltimaModifica());
  8169.     }
  8170.    
  8171.     private boolean setProprietaOggettoAccordoServizioParteSpecificaFruitore(String superUser, AccordoServizioParteSpecifica a) {
  8172.         boolean isFruitoreSingolo = false;
  8173.         if(a.sizeFruitoreList()>0) {
  8174.             isFruitoreSingolo = setProprietaOggettoAccordoServizioParteSpecificaSingoloFruitore(superUser, a);
  8175.         }
  8176.         if(!isFruitoreSingolo && a.sizeFruitoreList()>0) {
  8177.             // se comunque esistono dei fruitori, si tratta di un aggiornamento massivo
  8178.             for (Fruitore fr : a.getFruitoreList()) {
  8179.                 if(fr.getProprietaOggetto()==null) {
  8180.                     fr.setProprietaOggetto(new org.openspcoop2.core.registry.ProprietaOggetto());
  8181.                 }
  8182.                 setProprietaOggetto(superUser, fr.getProprietaOggetto(), false, true);
  8183.             }
  8184.         }
  8185.         return isFruitoreSingolo;
  8186.     }
  8187.     private boolean setProprietaOggettoAccordoServizioParteSpecificaSingoloFruitore(String superUser, AccordoServizioParteSpecifica a) {
  8188.         boolean isFruitoreSingolo = isProprietaOggettoAccordoServizioParteSpecificaSingoloFruitore(a);
  8189.         for (Fruitore fr : a.getFruitoreList()) {
  8190.             if(fr!=null) {
  8191.                 setProprietaOggettoAccordoServizioParteSpecificaSingoloFruitore(superUser, fr, isFruitoreSingolo);
  8192.             }
  8193.         }
  8194.         return isFruitoreSingolo;
  8195.     }
  8196.     private void setProprietaOggettoAccordoServizioParteSpecificaSingoloFruitore(String superUser, Fruitore fr, boolean isFruitoreSingolo) {
  8197.         if(isDataAggiornamentoFruitore(fr)) {
  8198.             if(fr.getProprietaOggetto()==null) {
  8199.                 fr.setProprietaOggetto(new org.openspcoop2.core.registry.ProprietaOggetto());
  8200.             }
  8201.             setProprietaOggetto(superUser, fr.getProprietaOggetto(), false, true);
  8202.         }
  8203.         else if(isDataCreazioneFruitore(fr)) {
  8204.             if(fr.getProprietaOggetto()==null) {
  8205.                 fr.setProprietaOggetto(new org.openspcoop2.core.registry.ProprietaOggetto());
  8206.             }
  8207.             setProprietaOggetto(superUser, fr.getProprietaOggetto(), true, false);
  8208.         }
  8209.         else if(isFruitoreSingolo && fr!=null){
  8210.             fr.setProprietaOggetto(null); // per non far aggiornare visto che la modifica non riguarda il fruitore
  8211.         }
  8212.     }
  8213.     private boolean isProprietaOggettoAccordoServizioParteSpecificaSingoloFruitore(AccordoServizioParteSpecifica a) {
  8214.         boolean isFruitoreSingolo = false;
  8215.         for (Fruitore fr : a.getFruitoreList()) {
  8216.             if(fr!=null &&
  8217.                 (isDataAggiornamentoFruitore(fr) || isDataCreazioneFruitore(fr))
  8218.                 ){
  8219.                 isFruitoreSingolo = true;
  8220.                 break;
  8221.             }
  8222.         }
  8223.         return isFruitoreSingolo;
  8224.     }
  8225.     private void setProprietaOggettoRuolo(String superUser, Object oggetto, boolean create, boolean update) {
  8226.         org.openspcoop2.core.registry.ProprietaOggetto pOggetto = null;
  8227.         if (oggetto instanceof Ruolo) {
  8228.             Ruolo r = (Ruolo) oggetto;
  8229.             if(create && r.getProprietaOggetto()==null) {
  8230.                 r.setProprietaOggetto(new org.openspcoop2.core.registry.ProprietaOggetto());    
  8231.             }
  8232.             pOggetto = r.getProprietaOggetto();
  8233.         }
  8234.         setProprietaOggetto(superUser, pOggetto, create, update);
  8235.     }
  8236.     private void setProprietaOggettoScope(String superUser, Object oggetto, boolean create, boolean update) {
  8237.         org.openspcoop2.core.registry.ProprietaOggetto pOggetto = null;
  8238.         if (oggetto instanceof Scope) {
  8239.             Scope s = (Scope) oggetto;
  8240.             if(create && s.getProprietaOggetto()==null) {
  8241.                 s.setProprietaOggetto(new org.openspcoop2.core.registry.ProprietaOggetto());    
  8242.             }
  8243.             pOggetto = s.getProprietaOggetto();
  8244.         }
  8245.         setProprietaOggetto(superUser, pOggetto, create, update);
  8246.     }
  8247.     private void setProprietaOggettoGruppo(String superUser, Object oggetto, boolean create, boolean update) {
  8248.         org.openspcoop2.core.registry.ProprietaOggetto pOggetto = null;
  8249.         if (oggetto instanceof Gruppo) {
  8250.             Gruppo g = (Gruppo) oggetto;
  8251.             if(create && g.getProprietaOggetto()==null) {
  8252.                 g.setProprietaOggetto(new org.openspcoop2.core.registry.ProprietaOggetto());    
  8253.             }
  8254.             pOggetto = g.getProprietaOggetto();
  8255.         }
  8256.         setProprietaOggetto(superUser, pOggetto, create, update);
  8257.     }
  8258.     private void setProprietaOggettoPortaDelegata(String superUser, Object oggetto, boolean create, boolean update) {
  8259.         org.openspcoop2.core.config.ProprietaOggetto pOggetto = null;
  8260.         if (oggetto instanceof PortaDelegata) {
  8261.             PortaDelegata p = (PortaDelegata) oggetto;
  8262.             if(create && p.getProprietaOggetto()==null) {
  8263.                 p.setProprietaOggetto(new org.openspcoop2.core.config.ProprietaOggetto());  
  8264.             }
  8265.             pOggetto = p.getProprietaOggetto();
  8266.         }
  8267.         setProprietaOggetto(superUser, pOggetto, create, update);
  8268.     }
  8269.     private void setProprietaOggettoPortaApplicativa(String superUser, Object oggetto, boolean create, boolean update) {
  8270.         org.openspcoop2.core.config.ProprietaOggetto pOggetto = null;
  8271.         if (oggetto instanceof PortaApplicativa) {
  8272.             PortaApplicativa p = (PortaApplicativa) oggetto;
  8273.             if(create && p.getProprietaOggetto()==null) {
  8274.                 p.setProprietaOggetto(new org.openspcoop2.core.config.ProprietaOggetto());  
  8275.             }
  8276.             pOggetto = p.getProprietaOggetto();
  8277.         }
  8278.         setProprietaOggetto(superUser, pOggetto, create, update);
  8279.     }
  8280.     private void setProprietaOggettoServizioApplicativo(String superUser, Object oggetto, boolean create, boolean update) {
  8281.         org.openspcoop2.core.config.ProprietaOggetto pOggetto = null;
  8282.         if (oggetto instanceof ServizioApplicativo) {
  8283.             ServizioApplicativo s = (ServizioApplicativo) oggetto;
  8284.             if(create && s.getProprietaOggetto()==null) {
  8285.                 s.setProprietaOggetto(new org.openspcoop2.core.config.ProprietaOggetto());  
  8286.             }
  8287.             pOggetto = s.getProprietaOggetto();
  8288.         }
  8289.         setProprietaOggetto(superUser, pOggetto, create, update);
  8290.     }
  8291.     private void setProprietaOggettoGenericProperties(String superUser, Object oggetto, boolean create, boolean update) {
  8292.         org.openspcoop2.core.config.ProprietaOggetto pOggetto = null;
  8293.         if (oggetto instanceof GenericProperties) {
  8294.             GenericProperties gp = (GenericProperties) oggetto;
  8295.             if(
  8296.                 //create &&
  8297.                 gp.getProprietaOggetto()==null) {
  8298.                 gp.setProprietaOggetto(new org.openspcoop2.core.config.ProprietaOggetto());
  8299.             }
  8300.             pOggetto = gp.getProprietaOggetto();
  8301.         }
  8302.         setProprietaOggetto(superUser, pOggetto, create, update);
  8303.     }
  8304.     private void setProprietaOggetto(String superUser, Object oggetto, boolean create, boolean update) {
  8305.         if(oggetto instanceof org.openspcoop2.core.registry.ProprietaOggetto) {
  8306.             org.openspcoop2.core.registry.ProprietaOggetto p = (org.openspcoop2.core.registry.ProprietaOggetto) oggetto;
  8307.             if(create) {
  8308.                 p.setDataCreazione(DateManager.getDate());
  8309.                 p.setUtenteRichiedente(superUser);
  8310.             }
  8311.             else if(update) {
  8312.                 p.setDataUltimaModifica(DateManager.getDate());
  8313.                 p.setUtenteUltimaModifica(superUser);
  8314.             }
  8315.         }
  8316.         else if(oggetto instanceof org.openspcoop2.core.config.ProprietaOggetto) {
  8317.             org.openspcoop2.core.config.ProprietaOggetto p = (org.openspcoop2.core.config.ProprietaOggetto) oggetto;
  8318.             if(create) {
  8319.                 p.setDataCreazione(DateManager.getDate());
  8320.                 p.setUtenteRichiedente(superUser);
  8321.             }
  8322.             else if(update) {
  8323.                 p.setDataUltimaModifica(DateManager.getDate());
  8324.                 p.setUtenteUltimaModifica(superUser);
  8325.             }
  8326.         }
  8327.     }
  8328.    
  8329.     private void updateProprietaOggettoPorta(AttivazionePolicy policy, String superUser, DriverControlStationDB driver) throws DriverConfigurazioneException {      
  8330.         if(policy.getFiltro()!=null && policy.getFiltro().getEnabled() && policy.getFiltro().getRuoloPorta()!=null &&
  8331.                 policy.getFiltro().getNomePorta()!=null && StringUtils.isNotEmpty(policy.getFiltro().getNomePorta())) {
  8332.             if(org.openspcoop2.core.controllo_traffico.constants.RuoloPolicy.APPLICATIVA.equals(policy.getFiltro().getRuoloPorta())) {
  8333.                 IDPortaApplicativa idPA = new IDPortaApplicativa();
  8334.                 idPA.setNome(policy.getFiltro().getNomePorta());
  8335.                 driver.getDriverConfigurazioneDB().updateProprietaOggetto(idPA, superUser);
  8336.             }
  8337.             else if(org.openspcoop2.core.controllo_traffico.constants.RuoloPolicy.DELEGATA.equals(policy.getFiltro().getRuoloPorta())) {
  8338.                 IDPortaDelegata idPD = new IDPortaDelegata();
  8339.                 idPD.setNome(policy.getFiltro().getNomePorta());
  8340.                 driver.getDriverConfigurazioneDB().updateProprietaOggetto(idPD, superUser);
  8341.             }
  8342.         }
  8343.     }
  8344.    
  8345.     private void updateProprietaOggettoPorta(Allarme allarme, String superUser, DriverControlStationDB driver) throws DriverConfigurazioneException {      
  8346.         if(allarme!=null && allarme.getFiltro()!=null && allarme.getFiltro().getEnabled() && allarme.getFiltro().getRuoloPorta()!=null &&
  8347.                 allarme.getFiltro().getNomePorta()!=null && StringUtils.isNotEmpty(allarme.getFiltro().getNomePorta())) {
  8348.             if(org.openspcoop2.core.allarmi.constants.RuoloPorta.APPLICATIVA.equals(allarme.getFiltro().getRuoloPorta())) {
  8349.                 IDPortaApplicativa idPA = new IDPortaApplicativa();
  8350.                 idPA.setNome(allarme.getFiltro().getNomePorta());
  8351.                 driver.getDriverConfigurazioneDB().updateProprietaOggetto(idPA, superUser);
  8352.             }
  8353.             else if(org.openspcoop2.core.allarmi.constants.RuoloPorta.DELEGATA.equals(allarme.getFiltro().getRuoloPorta())) {
  8354.                 IDPortaDelegata idPD = new IDPortaDelegata();
  8355.                 idPD.setNome(allarme.getFiltro().getNomePorta());
  8356.                 driver.getDriverConfigurazioneDB().updateProprietaOggetto(idPD, superUser);
  8357.             }
  8358.         }
  8359.     }
  8360.    
  8361.     public boolean isVisualizzaConfigurazioneAllarmiEnabled() {
  8362.         if(!this.configurazioneAllarmiEnabled) {
  8363.             return false;
  8364.         }
  8365.         if(this.countPluginsAllarmi==null) {
  8366.             this.initCountPluginsAllarmi();
  8367.         }
  8368.         return this.countPluginsAllarmi!=null && this.countPluginsAllarmi.intValue()>0;
  8369.     }
  8370.     private synchronized void initCountPluginsAllarmi() {
  8371.         if(this.countPluginsAllarmi==null) {
  8372.             this.countPluginsAllarmi = countPluginsAllarmi();
  8373.         }
  8374.     }
  8375.     private int countPluginsAllarmi() {
  8376.         Connection con = null;
  8377.         String nomeMetodo = "countPluginsAllarmi";
  8378.         DriverControlStationDB driver = null;

  8379.         try {
  8380.             //String applicabilita, boolean soloAbilitati
  8381.            
  8382.             ISearch ricercaPlugin = new ConsoleSearch(true);
  8383.             ricercaPlugin.addFilter( Liste.CONFIGURAZIONE_PLUGINS_CLASSI, Filtri.FILTRO_TIPO_PLUGIN_CLASSI, TipoPlugin.ALLARME.toString());
  8384.            
  8385.             // prendo una connessione
  8386.             con = ControlStationCore.dbM.getConnection();
  8387.             // istanzio il driver
  8388.             driver = new DriverControlStationDB(con, null, this.tipoDB);
  8389.             List<Plugin> p = driver.pluginsClassiList(ricercaPlugin);
  8390.             return p!=null ? p.size() : 0;
  8391.            
  8392.         } catch (Exception e) {
  8393.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  8394.             return -1;
  8395.         } finally {
  8396.             ControlStationCore.dbM.releaseConnection(con);
  8397.         }
  8398.     }
  8399.    
  8400.     public void updatePluginClassLoader() throws Exception  {
  8401.         // Aggiorno classLoader interno
  8402.         PluginLoader pluginLoader = ((PluginLoader)CorePluginLoader.getInstance());
  8403.         if(pluginLoader.isPluginManagerEnabled()) {
  8404.             pluginLoader.updateFromConsoleConfig(log);
  8405.         }
  8406.     }
  8407.    
  8408.     public boolean isInterfaceDefined(String wsdlS) {
  8409.         if(wsdlS == null || wsdlS.trim().replaceAll("\n", "").equals("")) {
  8410.             return false;
  8411.         }
  8412.         return true;
  8413.     }
  8414.     public byte[] getInterfaceAsByteArray(FormatoSpecifica formatoSpecifica,String wsdlS) {
  8415.         if(!isInterfaceDefined(wsdlS)) {
  8416.             return null;
  8417.         }
  8418.        
  8419.         if(FormatoSpecifica.OPEN_API_3.equals(formatoSpecifica) || FormatoSpecifica.SWAGGER_2.equals(formatoSpecifica)){
  8420.             byte [] wsdl = wsdlS.getBytes();
  8421.             if(YAMLUtils.getInstance().isYaml(wsdl)) {
  8422.                 // non deve essere effettuato il trim, essendo lo yaml posizionale:
  8423.                 return wsdl;
  8424.             }
  8425.         }

  8426.         return wsdlS.trim().getBytes();
  8427.        
  8428.     }
  8429.    
  8430.     public AttributeAuthority buildAttributeAuthority(int sizeAA, String aaName, String attributeAuthorityAttributi) {
  8431.        
  8432.         Properties properties = null;
  8433.         if(attributeAuthorityAttributi!=null && StringUtils.isNotEmpty(attributeAuthorityAttributi)) {
  8434.             properties = PropertiesUtilities.convertTextToProperties(attributeAuthorityAttributi);
  8435.         }
  8436.        
  8437.         AttributeAuthority aa = new AttributeAuthority();
  8438.         aa.setNome(aaName);
  8439.         if(properties!=null && properties.size()>0) {
  8440.             String p = properties.getProperty(aaName);
  8441.             List<String> attributi = DBUtils.convertToList(p);
  8442.             if(attributi!=null && !attributi.isEmpty()) {
  8443.                 aa.setAttributoList(attributi);
  8444.             }
  8445.         }
  8446.        
  8447.         if(aa.sizeAttributoList()<=0 && sizeAA==1) {
  8448.             // sono stati forniti direttamente i valori
  8449.             List<String> attributi = DBUtils.convertToList(attributeAuthorityAttributi);
  8450.             if(attributi!=null && !attributi.isEmpty()) {
  8451.                 aa.setAttributoList(attributi);
  8452.             }
  8453.         }
  8454.        
  8455.         return aa;
  8456.     }
  8457.    
  8458.     public String[] buildAuthorityArrayString(List<AttributeAuthority> list){
  8459.         if(list==null || list.isEmpty()) {
  8460.             return null;
  8461.         }
  8462.         List<String> l = new ArrayList<>();
  8463.         for (AttributeAuthority attributeAuthority : list) {
  8464.             l.add(attributeAuthority.getNome());
  8465.         }
  8466.         return l.toArray(new String[1]);
  8467.     }
  8468.    
  8469.     public String buildAttributesStringFromAuthority(List<AttributeAuthority> list) {
  8470.         if(list==null || list.isEmpty()) {
  8471.             return null;
  8472.         }
  8473.         StringBuilder sb = new StringBuilder();
  8474.         if(list.size()==1) {
  8475.             AttributeAuthority attributeAuthority = list.get(0);
  8476.             if(attributeAuthority.sizeAttributoList()>0) {
  8477.                 for (int i = 0; i < attributeAuthority.sizeAttributoList(); i++) {
  8478.                     if(i>0) {
  8479.                         sb.append(",");
  8480.                     }
  8481.                     sb.append(attributeAuthority.getAttributo(i));
  8482.                 }
  8483.             }
  8484.         }
  8485.         else {
  8486.             for (AttributeAuthority attributeAuthority : list) {
  8487.                 if(attributeAuthority.sizeAttributoList()>0) {
  8488.                     if(sb.length()>0) {
  8489.                         sb.append("\n");
  8490.                     }
  8491.                     sb.append(attributeAuthority.getNome());
  8492.                     sb.append("=");
  8493.                     for (int i = 0; i < attributeAuthority.sizeAttributoList(); i++) {
  8494.                         if(i>0) {
  8495.                             sb.append(",");
  8496.                         }
  8497.                         sb.append(attributeAuthority.getAttributo(i));
  8498.                     }
  8499.                 }
  8500.             }
  8501.         }
  8502.         if(sb.length()>0) {
  8503.             return sb.toString();
  8504.         }
  8505.         return null;
  8506.     }
  8507.    
  8508.     public void invokeJmxMethodAllNodesAndSetResult(PageData pd, String risorsa, String metodo,
  8509.             String msgSuccesso, String msgFallimento,
  8510.             Object ... parametri) throws DriverControlStationException, DriverControlStationNotFound {
  8511.         boolean rilevatoErrore = false;
  8512.         StringBuilder sbMessagePerOperazioneEffettuata = new StringBuilder();
  8513.         String msgSuccessoAlternativo = null;
  8514.         int index = 0;
  8515.         List<String> aliases = this.getJmxPdDAliases();
  8516.         for (String alias : aliases) {
  8517.            
  8518.             StringBuilder bfExternal = new StringBuilder();
  8519.             String descrizione = this.getJmxPdDDescrizione(alias);
  8520.            
  8521.             if(aliases.size()>1) {
  8522.                 if(index>0) {
  8523.                     bfExternal.append(org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE);
  8524.                 }
  8525.                 bfExternal.append(ConfigurazioneCostanti.LABEL_PARAMETRO_CONFIGURAZIONE_SISTEMA_NODO_CLUSTER).append(" ").append(descrizione).append(org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE);
  8526.             }                      
  8527.             try{
  8528.                 String stato = this.getInvoker().invokeJMXMethod(alias, this.getJmxPdDConfigurazioneSistemaType(alias),
  8529.                         risorsa,
  8530.                         metodo,
  8531.                         parametri);
  8532.                 if(JMXUtils.MSG_OPERAZIONE_EFFETTUATA_SUCCESSO.equals(stato)){
  8533.                     bfExternal.append(msgSuccesso);
  8534.                 }
  8535.                 else if(stato!=null && stato.startsWith(JMXUtils.MSG_OPERAZIONE_EFFETTUATA_SUCCESSO_PREFIX)){
  8536.                     StringBuilder bfStateSuccess = new StringBuilder();
  8537.                    
  8538.                     String suffix = stato.length()>JMXUtils.MSG_OPERAZIONE_EFFETTUATA_SUCCESSO_PREFIX.length() ? stato.substring(JMXUtils.MSG_OPERAZIONE_EFFETTUATA_SUCCESSO_PREFIX.length()) : "";
  8539.                     bfStateSuccess.append(msgSuccesso);
  8540.                     if(suffix!=null && StringUtils.isNotEmpty(suffix)) {
  8541.                         bfStateSuccess.append(org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE);
  8542.                         bfStateSuccess.append(org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE);
  8543.                         bfStateSuccess.append(suffix);
  8544.                     }
  8545.                     if(msgSuccessoAlternativo==null) {
  8546.                         msgSuccessoAlternativo = bfStateSuccess.toString(); // dovrebbe essere uguale per tutti i nodi
  8547.                     }
  8548.                    
  8549.                     bfExternal.append(bfStateSuccess.toString());
  8550.                 }
  8551.                 else{
  8552.                     rilevatoErrore = true;
  8553.                     bfExternal.append(msgFallimento);
  8554.                     if(stato!=null && stato.startsWith(JMXUtils.MSG_OPERAZIONE_NON_EFFETTUATA)) {
  8555.                         bfExternal.append(stato.substring(JMXUtils.MSG_OPERAZIONE_NON_EFFETTUATA.length()));
  8556.                     }
  8557.                     else {
  8558.                         bfExternal.append(stato);
  8559.                     }
  8560.                 }
  8561.             }catch(Exception e){
  8562.                 ControlStationCore.logError("Errore durante l'invocazione del metodo '"+metodo+"' (jmxResource '"+risorsa+"') (node:"+alias+"): "+e.getMessage(),e);
  8563.                 rilevatoErrore = true;
  8564.                 String stato = e.getMessage();
  8565.                 bfExternal.append(msgFallimento);
  8566.                 if(stato.startsWith(JMXUtils.MSG_OPERAZIONE_NON_EFFETTUATA)) {
  8567.                     bfExternal.append(stato.substring(JMXUtils.MSG_OPERAZIONE_NON_EFFETTUATA.length()));
  8568.                 }
  8569.                 else {
  8570.                     bfExternal.append(stato);
  8571.                 }
  8572.             }

  8573.             if(sbMessagePerOperazioneEffettuata.length()>0){
  8574.                 sbMessagePerOperazioneEffettuata.append(org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE);
  8575.             }
  8576.             sbMessagePerOperazioneEffettuata.append(bfExternal.toString());
  8577.            
  8578.             index++;
  8579.         }
  8580.         if(sbMessagePerOperazioneEffettuata.length()>0){
  8581.             if(rilevatoErrore) {
  8582.                 pd.setMessage(sbMessagePerOperazioneEffettuata.toString());
  8583.             }else {
  8584.                 /**pd.setMessage(sbMessagePerOperazioneEffettuata.toString(),Costanti.MESSAGE_TYPE_INFO);*/
  8585.                 // non riporto elenco dei nodi ma solamente che l'operazione รจ andata a buon fine
  8586.                 pd.setMessage(msgSuccessoAlternativo!=null ? msgSuccessoAlternativo : msgSuccesso,Costanti.MESSAGE_TYPE_INFO);
  8587.             }
  8588.         }
  8589.     }
  8590.    
  8591.     public void formatVerificaCertificatiEsito(PageData pd, List<String> formatIds,
  8592.             String errore, String extraErrore, String posizioneErrore,
  8593.             String warning, String extraWarning, String posizioneWarning,
  8594.             boolean piuCertificatiAssociatiEntita) {
  8595.         if(errore!=null && errore.length()>0) {
  8596.             String error = errore.replaceAll("\n", org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE).trim();
  8597.             if(!error.startsWith(org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE)) {
  8598.                 error = org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE + error;
  8599.             }
  8600.             for (String formatId : formatIds) {
  8601.                 error = error.replace(formatId, formatId+org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE);
  8602.             }
  8603.             pd.setMessage(CostantiControlStation.LABEL_VERIFICA_CERTIFICATI_ERROR_PREFIX+posizioneErrore+
  8604.                     org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE+
  8605.                     (extraErrore!=null ? (org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE+extraErrore+org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE) : "")+
  8606.                     error,
  8607.                     Costanti.MESSAGE_TYPE_ERROR);
  8608.         }
  8609.         else if(warning!=null && warning.length()>0) {
  8610.             String w = warning.replaceAll("\n", org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE).trim();
  8611.             if(!w.startsWith(org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE)) {
  8612.                 w = org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE + w;
  8613.             }
  8614.             for (String formatId : formatIds) {
  8615.                 w = w.replace(formatId, formatId+org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE);
  8616.             }
  8617.             String messaggio = CostantiControlStation.LABEL_VERIFICA_CERTIFICATI_WARNING_PREFIX;
  8618.             if(piuCertificatiAssociatiEntita) {
  8619.                 messaggio = CostantiControlStation.LABEL_VERIFICA_CERTIFICATI_WARNING_ANCHE_SCADUTI_PREFIX;
  8620.             }
  8621.             pd.setMessage(messaggio+posizioneWarning+
  8622.                     org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE+
  8623.                     (extraWarning!=null ? (org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE+extraWarning+org.openspcoop2.core.constants.Costanti.WEB_NEW_LINE) : "")+
  8624.                     w,
  8625.                     Costanti.MESSAGE_TYPE_WARN);
  8626.         }
  8627.         else {
  8628.             pd.setMessage(CostantiControlStation.LABEL_VERIFICA_CERTIFICATI_SUCCESSO,
  8629.                     Costanti.MESSAGE_TYPE_INFO);
  8630.         }
  8631.     }
  8632.    
  8633.     public SortedMap<List<String>> toSortedListMap(List<Proprieta> proprieta) throws UtilsException{
  8634.         return ConfigUtils.toSortedListMap(proprieta);
  8635.     }
  8636.     public void addFromSortedListMap(List<Proprieta> proprieta, SortedMap<List<String>> map){
  8637.         ConfigUtils.addFromSortedListMap(proprieta, map);
  8638.     }
  8639.    
  8640.     public ConfigBean leggiConfigurazione(Config config, Map<String, Properties> propertiesMap) throws ValidationException, CoreException, ProviderException {
  8641.         ExternalResources externalResources = new ExternalResources();
  8642.         externalResources.setLog(ControlStationCore.getLog());
  8643.         externalResources.setTipoDB(this.tipoDB);
  8644.         Connection con = ControlStationCore.dbM.getConnection();
  8645.         ConfigBean configurazioneBean = null;
  8646.         try {
  8647.             externalResources.setConnection(con);
  8648.             configurazioneBean = ReadPropertiesUtilities.leggiConfigurazione(config, propertiesMap, externalResources);
  8649.         }finally {
  8650.             ControlStationCore.dbM.releaseConnection(con);
  8651.         }
  8652.         return configurazioneBean;
  8653.     }
  8654.    
  8655.    
  8656.    
  8657.     public TracciamentoConfigurazione buildTracciamentoConfigurazioneDatabase(String dbStato,
  8658.             String dbStatoReqIn, String dbStatoReqOut, String dbStatoResOut, String dbStatoResOutComplete,
  8659.             boolean dbFiltroEsiti){
  8660.         TracciamentoConfigurazione database = new TracciamentoConfigurazione();
  8661.         database.setStato(StatoFunzionalitaConPersonalizzazione.toEnumConstant(dbStato));
  8662.         if(StatoFunzionalitaConPersonalizzazione.PERSONALIZZATO.equals(database.getStato())) {
  8663.             database.setRequestIn(StatoFunzionalitaBloccante.toEnumConstant(dbStatoReqIn));
  8664.             database.setRequestOut(StatoFunzionalitaBloccante.toEnumConstant(dbStatoReqOut));
  8665.             database.setResponseOut(StatoFunzionalitaBloccante.toEnumConstant(dbStatoResOut));
  8666.             database.setResponseOutComplete(StatoFunzionalita.toEnumConstant(dbStatoResOutComplete));
  8667.         }
  8668.         if(!StatoFunzionalitaConPersonalizzazione.DISABILITATO.equals(database.getStato())) {
  8669.             database.setFiltroEsiti(dbFiltroEsiti ? StatoFunzionalita.ABILITATO : StatoFunzionalita.DISABILITATO);
  8670.         }
  8671.         return database;
  8672.     }
  8673.     public TracciamentoConfigurazione buildTracciamentoConfigurazioneFiletrace(String fsStato,
  8674.             String fsStatoReqIn, String fsStatoReqOut, String fsStatoResOut, String fsStatoResOutComplete,
  8675.             boolean fsFiltroEsiti){
  8676.         TracciamentoConfigurazione filetrace = new TracciamentoConfigurazione();
  8677.         filetrace.setStato(StatoFunzionalitaConPersonalizzazione.toEnumConstant(fsStato));
  8678.         if(StatoFunzionalitaConPersonalizzazione.PERSONALIZZATO.equals(filetrace.getStato())) {
  8679.             filetrace.setRequestIn(StatoFunzionalitaBloccante.toEnumConstant(fsStatoReqIn));
  8680.             filetrace.setRequestOut(StatoFunzionalitaBloccante.toEnumConstant(fsStatoReqOut));
  8681.             filetrace.setResponseOut(StatoFunzionalitaBloccante.toEnumConstant(fsStatoResOut));
  8682.             filetrace.setResponseOutComplete(StatoFunzionalita.toEnumConstant(fsStatoResOutComplete));
  8683.         }
  8684.         if(!StatoFunzionalitaConPersonalizzazione.DISABILITATO.equals(filetrace.getStato())) {
  8685.             filetrace.setFiltroEsiti(fsFiltroEsiti ? StatoFunzionalita.ABILITATO : StatoFunzionalita.DISABILITATO);
  8686.         }
  8687.         return filetrace;
  8688.     }
  8689.    
  8690.    


  8691.     protected void activeBYOK(DriverControlStationDB driver, boolean wrap, boolean unwrap) throws UtilsException{
  8692.         DriverBYOK driverBYOK = this.driverBYOKUtilities.getDriverBYOKManagerNode(wrap, unwrap);
  8693.         if(driverBYOK!=null && driver.getDriverConfigurazioneDB() instanceof IDriverBYOKConfig) {
  8694.             IDriverBYOKConfig c = driver.getDriverConfigurazioneDB();
  8695.             c.initialize(driverBYOK, wrap, unwrap);
  8696.         }
  8697.         if(driverBYOK!=null && driver.getDriverRegistroServiziDB() instanceof IDriverBYOKConfig) {
  8698.             IDriverBYOKConfig c = driver.getDriverRegistroServiziDB();
  8699.             c.initialize(driverBYOK, wrap, unwrap);
  8700.         }
  8701.     }
  8702.        
  8703. }