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> jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreChiaviPDND = new HashMap<>();
  1735.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreCacheChiaviPDND = new HashMap<>();
  1736.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreOperazioniRemote = new HashMap<>();
  1737.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerSvecchiamentoOperazioniRemote = new HashMap<>();
  1738.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoTimerThresholdThread = new HashMap<>();
  1739.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreById = new HashMap<>();
  1740.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreById = new HashMap<>();
  1741.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyValidazione = new HashMap<>();
  1742.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyNegoziazione = new HashMap<>();
  1743.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreAttributeAuthority = new HashMap<>();
  1744.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyValidazione = new HashMap<>();
  1745.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyNegoziazione = new HashMap<>();
  1746.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreAttributeAuthority = new HashMap<>();
  1747.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoEnablePortaDelegata = new HashMap<>();
  1748.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoDisablePortaDelegata = new HashMap<>();
  1749.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoEnablePortaApplicativa = new HashMap<>();
  1750.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoDisablePortaApplicativa = new HashMap<>();
  1751.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoEnableConnettoreMultiplo = new HashMap<>();
  1752.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoDisableConnettoreMultiplo = new HashMap<>();
  1753.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiplo = new HashMap<>();
  1754.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiplo = new HashMap<>();
  1755.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiploRuntimeRepository = new HashMap<>();
  1756.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiploRuntimeRepository = new HashMap<>();
  1757.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAccordoCooperazione = new HashMap<>();
  1758.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApi = new HashMap<>();
  1759.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheErogazione = new HashMap<>();
  1760.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheFruizione = new HashMap<>();
  1761.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheSoggetto = new HashMap<>();
  1762.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApplicativo = new HashMap<>();
  1763.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheRuolo = new HashMap<>();
  1764.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheScope = new HashMap<>();
  1765.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyValidazione = new HashMap<>();
  1766.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyNegoziazione = new HashMap<>();
  1767.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAttributeAuthority = new HashMap<>();
  1768.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeRisorsaAccessoRegistroServizi = new HashMap<>();
  1769.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeRisorsaStatoServiziPdD = new HashMap<>();
  1770.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegata = new HashMap<>();
  1771.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataAbilitazioniPuntuali = new HashMap<>();
  1772.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataDisabilitazioniPuntuali = new HashMap<>();
  1773.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativa = new HashMap<>();
  1774.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaAbilitazioniPuntuali = new HashMap<>();
  1775.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaDisabilitazioniPuntuali = new HashMap<>();
  1776.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioIntegrationManager = new HashMap<>();
  1777.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaDelegata = new HashMap<>();
  1778.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaDelegata = new HashMap<>();
  1779.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaApplicativa = new HashMap<>();
  1780.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaApplicativa = new HashMap<>();
  1781.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioIntegrationManager = new HashMap<>();
  1782.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioIntegrationManager = new HashMap<>();
  1783.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeRisorsaDatasourceGW = new HashMap<>();
  1784.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeAttributoNumeroDatasourceGW = new HashMap<>();
  1785.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetDatasourcesGW = new HashMap<>();
  1786.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetUsedConnectionsDatasourcesGW = new HashMap<>();
  1787.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetInformazioniDatabaseDatasourcesGW = new HashMap<>();
  1788.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeRisorsaConsegnaContenutiApplicativi = new HashMap<>();
  1789.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetThreadPoolStatus  = new HashMap<>();
  1790.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetQueueConfig  = new HashMap<>();
  1791.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetApplicativiPrioritari  = new HashMap<>();
  1792.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoGetConnettoriPrioritari  = new HashMap<>();
  1793.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoUpdateConnettoriPrioritari  = new HashMap<>();
  1794.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoResetConnettoriPrioritari  = new HashMap<>();
  1795.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeRisorsaSystemPropertiesPdD = new HashMap<>();
  1796.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRefreshPersistentConfiguration = new HashMap<>();
  1797.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeRisorsaDatiRichieste = new HashMap<>();
  1798.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingGlobalConfigCache = new HashMap<>();
  1799.     private Map<String, String> jmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingAPIConfigCache = new HashMap<>();
  1800.     private Map<String, List<String>> jmxPdDCaches = new HashMap<>();
  1801.     private Map<String, List<String>> jmxPdDCachesPrefill = new HashMap<>();
  1802.     private Map<String, String> jmxPdDCacheType = new HashMap<>();
  1803.     private Map<String, String> jmxPdDCacheNomeAttributoCacheAbilitata = new HashMap<>();
  1804.     private Map<String, String> jmxPdDCacheNomeMetodoStatoCache = new HashMap<>();
  1805.     private Map<String, String> jmxPdDCacheNomeMetodoResetCache = new HashMap<>();
  1806.     private Map<String, String> jmxPdDCacheNomeMetodoPrefillCache = new HashMap<>();
  1807.    
  1808.     public DriverBYOKUtilities getDriverBYOKUtilities() {
  1809.         return this.driverBYOKUtilities;
  1810.     }
  1811.     public LockUtilities getLockUtilities() {
  1812.         return this.lockUtilities;
  1813.     }
  1814.    
  1815.     public boolean isVisualizzaLinkClearAllCachesRemoteCheckCacheStatus() {
  1816.         return this.isVisualizzaLinkClearAllCachesRemoteCheckCacheStatus;
  1817.     }
  1818.     public List<String> getJmxPdDAliases() {
  1819.         return this.jmxPdDAliases;
  1820.     }
  1821.     public Map<String, List<String>> getJmxPdDGruppiAliases() {
  1822.         return this.jmxPdDGruppiAliases;
  1823.     }
  1824.     public String getJmxPdDDescrizione(String alias) throws DriverControlStationException, DriverControlStationNotFound {
  1825.         String descrizione = this.jmxPdDDescrizioni.get(alias);
  1826.         if(descrizione==null || "".equals(descrizione)){
  1827.             if(this.singlePdD){
  1828.                 descrizione = alias; // uso lo stesso nome dell'alias
  1829.             }
  1830.             else{
  1831.                 PddCore pddCore = new PddCore(this);
  1832.                 PdDControlStation pdd = pddCore.getPdDControlStation(alias); // esiste per forza
  1833.                 if(pdd.getDescrizione()!=null && "".equals(pdd.getDescrizione())){
  1834.                     descrizione = pdd.getDescrizione();
  1835.                 }
  1836.                 else{
  1837.                     descrizione = alias; // uso lo stesso nome dell'alias
  1838.                 }
  1839.             }
  1840.         }
  1841.         return descrizione;
  1842.     }
  1843.     public CertificateChecker getJmxPdDCertificateChecker() {
  1844.         return this.jmxPdDCertificateChecker;
  1845.     }
  1846.     public CertificateChecker newJmxPdDCertificateChecker(List<String> alias) throws OpenSPCoop2ConfigurationException {
  1847.         return new CertificateChecker(log, this.invoker, this.configurazioneNodiRuntime, alias, ConsoleProperties.getInstance());
  1848.     }
  1849.     public String getJmxPdDConfigurazioneSistemaType(String alias) {
  1850.         return this.jmxPdDConfigurazioneSistemaType.get(alias);
  1851.     }
  1852.     public String getJmxPdDConfigurazioneSistemaNomeRisorsa(String alias) {
  1853.         return this.jmxPdDConfigurazioneSistemaNomeRisorsa.get(alias);
  1854.     }
  1855.     public String getJmxPdDConfigurazioneSistemaNomeMetodoVersionePdD(String alias) {
  1856.         return this.jmxPdDConfigurazioneSistemaNomeMetodoVersionePdD.get(alias);
  1857.     }
  1858.     public String getJmxPdDConfigurazioneSistemaNomeMetodoVersioneBaseDati(String alias) {
  1859.         return this.jmxPdDConfigurazioneSistemaNomeMetodoVersioneBaseDati.get(alias);
  1860.     }
  1861.     public String getJmxPdDConfigurazioneSistemaNomeMetodoVersioneJava(String alias) {
  1862.         return this.jmxPdDConfigurazioneSistemaNomeMetodoVersioneJava.get(alias);
  1863.     }
  1864.     public String getJmxPdDConfigurazioneSistemaNomeMetodoVendorJava(String alias) {
  1865.         return this.jmxPdDConfigurazioneSistemaNomeMetodoVendorJava.get(alias);
  1866.     }
  1867.     public String getJmxPdDConfigurazioneSistemaNomeMetodoTipoDatabase(String alias) {
  1868.         return this.jmxPdDConfigurazioneSistemaNomeMetodoTipoDatabase.get(alias);
  1869.     }
  1870.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniDatabase(String alias) {
  1871.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniDatabase.get(alias);
  1872.     }
  1873.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniSSL(String alias) {
  1874.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniSSL.get(alias);
  1875.     }
  1876.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteSSL(String alias) {
  1877.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteSSL.get(alias);
  1878.     }
  1879.     public boolean isJmxPdD_configurazioneSistemaShowInformazioniCryptographyKeyLength() {
  1880.         return this.jmxPdDConfigurazioneSistemaShowInformazioniCryptographyKeyLength;
  1881.     }
  1882.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniCryptographyKeyLength(String alias) {
  1883.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCryptographyKeyLength.get(alias);
  1884.     }
  1885.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniCharset(String alias) {
  1886.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCharset.get(alias);
  1887.     }
  1888.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniInternazionalizzazione(String alias) {
  1889.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniInternazionalizzazione.get(alias);
  1890.     }
  1891.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteInternazionalizzazione(String alias) {
  1892.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteInternazionalizzazione.get(alias);
  1893.     }
  1894.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniTimeZone(String alias) {
  1895.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniTimeZone.get(alias);
  1896.     }
  1897.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteTimeZone(String alias) {
  1898.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteTimeZone.get(alias);
  1899.     }
  1900.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaJavaNetworking(String alias) {
  1901.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaJavaNetworking.get(alias);
  1902.     }
  1903.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteProprietaJavaNetworking(String alias) {
  1904.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniCompleteProprietaJavaNetworking.get(alias);
  1905.     }
  1906.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaJavaAltro(String alias) {
  1907.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaJavaAltro.get(alias);
  1908.     }
  1909.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaSistema(String alias) {
  1910.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniProprietaSistema.get(alias);
  1911.     }
  1912.     public String getJmxPdDConfigurazioneSistemaNomeMetodoMessageFactory(String alias) {
  1913.         return this.jmxPdDConfigurazioneSistemaNomeMetodoMessageFactory.get(alias);
  1914.     }
  1915.     public String getJmxPdDConfigurazioneSistemaNomeMetodoDirectoryConfigurazione(String alias) {
  1916.         return this.jmxPdDConfigurazioneSistemaNomeMetodoDirectoryConfigurazione.get(alias);
  1917.     }
  1918.     public String getJmxPdDConfigurazioneSistemaNomeMetodoPluginProtocols(String alias) {
  1919.         return this.jmxPdDConfigurazioneSistemaNomeMetodoPluginProtocols.get(alias);
  1920.     }
  1921.     public String getJmxPdDConfigurazioneSistemaNomeMetodoInformazioniInstallazione(String alias) {
  1922.         return this.jmxPdDConfigurazioneSistemaNomeMetodoInformazioniInstallazione.get(alias);
  1923.     }
  1924.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetFileTrace(String alias) {
  1925.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetFileTrace.get(alias);
  1926.     }
  1927.     public String getJmxPdDConfigurazioneSistemaNomeMetodoUpdateFileTrace(String alias) {
  1928.         return this.jmxPdDConfigurazioneSistemaNomeMetodoUpdateFileTrace.get(alias);
  1929.     }
  1930.     public String getJmxPdDConfigurazioneSistemaNomeMetodoUnwrapKey(String alias) {
  1931.         return this.jmxPdDConfigurazioneSistemaNomeMetodoUnwrapKey.get(alias);
  1932.     }
  1933.     public String getJmxPdDConfigurazioneSistemaNomeMetodoWrapKey(String alias) {
  1934.         return this.jmxPdDConfigurazioneSistemaNomeMetodoWrapKey.get(alias);
  1935.     }
  1936.     public String getJmxPdDConfigurazioneSistemaNomeRisorsaMonitoraggio(String alias) {
  1937.         return this.jmxPdDConfigurazioneSistemaNomeRisorsaMonitoraggio.get(alias);
  1938.     }
  1939.     public String getJmxPdDConfigurazioneSistemaNomeMetodoConnessioniDB(String alias) {
  1940.         return this.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniDB.get(alias);
  1941.     }
  1942.     public String getJmxPdDConfigurazioneSistemaNomeMetodoConnessioniJMS(String alias) {
  1943.         return this.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniJMS.get(alias);
  1944.     }
  1945.     public String getJmxPdDConfigurazioneSistemaNomeMetodoIdTransazioniAttive(String alias) {
  1946.         return this.jmxPdDConfigurazioneSistemaNomeMetodoIdTransazioniAttive.get(alias);
  1947.     }
  1948.     public String getJmxPdDConfigurazioneSistemaNomeMetodoIdProtocolloTransazioniAttive(String alias) {
  1949.         return this.jmxPdDConfigurazioneSistemaNomeMetodoIdProtocolloTransazioniAttive.get(alias);
  1950.     }
  1951.     public String getJmxPdDConfigurazioneSistemaNomeMetodoConnessioniPD(String alias) {
  1952.         return this.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniPD.get(alias);
  1953.     }
  1954.     public String getJmxPdDConfigurazioneSistemaNomeMetodoConnessioniPA(String alias) {
  1955.         return this.jmxPdDConfigurazioneSistemaNomeMetodoConnessioniPA.get(alias);
  1956.     }
  1957.     public String getJmxPdDConfigurazioneSistemaNomeRisorsaConfigurazionePdD(String alias) {
  1958.         return this.jmxPdDConfigurazioneSistemaNomeRisorsaConfigurazionePdD.get(alias);
  1959.     }
  1960.     public String getJmxPdDConfigurazioneSistemaNomeAttributoSeveritaDiagnostici(String alias) {
  1961.         return this.jmxPdDConfigurazioneSistemaNomeAttributoSeveritaDiagnostici.get(alias);
  1962.     }
  1963.     public String getJmxPdDConfigurazioneSistemaNomeAttributoSeveritaDiagnosticiLog4j(String alias) {
  1964.         return this.jmxPdDConfigurazioneSistemaNomeAttributoSeveritaDiagnosticiLog4j.get(alias);
  1965.     }
  1966.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTracciamento(String alias) {
  1967.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTracciamento.get(alias);
  1968.     }
  1969.     public String getJmxPdDConfigurazioneSistemaNomeAttributoDumpPD(String alias) {
  1970.         return this.jmxPdDConfigurazioneSistemaNomeAttributoDumpPD.get(alias);
  1971.     }
  1972.     public String getJmxPdDConfigurazioneSistemaNomeAttributoDumpPA(String alias) {
  1973.         return this.jmxPdDConfigurazioneSistemaNomeAttributoDumpPA.get(alias);
  1974.     }
  1975.     public String getJmxPdDConfigurazioneSistemaNomeAttributoLog4jDiagnostica(String alias) {
  1976.         return this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jDiagnostica.get(alias);
  1977.     }
  1978.     public String getJmxPdDConfigurazioneSistemaNomeAttributoLog4jOpenspcoop(String alias) {
  1979.         return this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jOpenspcoop.get(alias);
  1980.     }
  1981.     public String getJmxPdDConfigurazioneSistemaNomeAttributoLog4jIntegrationManager(String alias) {
  1982.         return this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jIntegrationManager.get(alias);
  1983.     }
  1984.     public String getJmxPdDConfigurazioneSistemaNomeAttributoLog4jTracciamento(String alias) {
  1985.         return this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jTracciamento.get(alias);
  1986.     }
  1987.     public String getJmxPdDConfigurazioneSistemaNomeAttributoLog4jDump(String alias) {
  1988.         return this.jmxPdDConfigurazioneSistemaNomeAttributoLog4jDump.get(alias);
  1989.     }
  1990.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorStatusCode(String alias) {
  1991.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorStatusCode.get(alias);
  1992.     }
  1993.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorInstanceId(String alias) {
  1994.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorInstanceId.get(alias);
  1995.     }
  1996.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeBadResponse(String alias) {
  1997.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeBadResponse.get(alias);
  1998.     }
  1999.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalResponseError(String alias) {
  2000.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalResponseError.get(alias);
  2001.     }
  2002.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalRequestError(String alias) {
  2003.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalRequestError.get(alias);
  2004.     }
  2005.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalError(String alias) {
  2006.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorTypeInternalError.get(alias);
  2007.     }
  2008.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorDetails(String alias) {
  2009.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionSpecificErrorDetails.get(alias);
  2010.     }
  2011.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorUseStatusCodeAsFaultCode(String alias) {
  2012.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorUseStatusCodeAsFaultCode.get(alias);
  2013.     }
  2014.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorGenerateHttpHeaderGovWayCode(String alias) {
  2015.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTransactionErrorGenerateHttpHeaderGovWayCode.get(alias);
  2016.     }
  2017.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerConsegnaContenutiApplicativi(String alias) {
  2018.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerConsegnaContenutiApplicativi.get(alias);
  2019.     }
  2020.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerEventi(String alias) {
  2021.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerEventi.get(alias);
  2022.     }
  2023.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerFileSystemRecovery(String alias) {
  2024.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerFileSystemRecovery.get(alias);
  2025.     }
  2026.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreBusteOnewayNonRiscontrate(String alias) {
  2027.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreBusteOnewayNonRiscontrate.get(alias);
  2028.     }
  2029.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreBusteAsincroneNonRiscontrate(String alias) {
  2030.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreBusteAsincroneNonRiscontrate.get(alias);
  2031.     }
  2032.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiEliminati(String alias) {
  2033.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiEliminati.get(alias);
  2034.     }
  2035.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiScaduti(String alias) {
  2036.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiScaduti.get(alias);
  2037.     }
  2038.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiNonGestiti(String alias) {
  2039.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaMessaggiNonGestiti.get(alias);
  2040.     }
  2041.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaCorrelazioneApplicativa(String alias) {
  2042.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiPuliziaCorrelazioneApplicativa.get(alias);
  2043.     }
  2044.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiVerificaConnessioniAttive(String alias) {
  2045.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreMessaggiVerificaConnessioniAttive.get(alias);
  2046.     }
  2047.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestorePuliziaMessaggiAnomali(String alias) {
  2048.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestorePuliziaMessaggiAnomali.get(alias);
  2049.     }
  2050.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreRepositoryBuste(String alias) {
  2051.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreRepositoryBuste.get(alias);
  2052.     }
  2053.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerMonitoraggioRisorseThread(String alias) {
  2054.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerMonitoraggioRisorseThread.get(alias);
  2055.     }
  2056.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerRepositoryStatefulThread(String alias) {
  2057.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerRepositoryStatefulThread.get(alias);
  2058.     }
  2059.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheOrarie(String alias) {
  2060.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheOrarie.get(alias);
  2061.     }
  2062.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheGiornaliere(String alias) {
  2063.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheGiornaliere.get(alias);
  2064.     }
  2065.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheSettimanali(String alias) {
  2066.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheSettimanali.get(alias);
  2067.     }
  2068.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheMensili(String alias) {
  2069.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerStatisticheMensili.get(alias);
  2070.     }
  2071.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreChiaviPDND(String alias) {
  2072.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreChiaviPDND.get(alias);
  2073.     }
  2074.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreCacheChiaviPDND(String alias) {
  2075.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreCacheChiaviPDND.get(alias);
  2076.     }
  2077.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreOperazioniRemote(String alias) {
  2078.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerGestoreOperazioniRemote.get(alias);
  2079.     }
  2080.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerSvecchiamentoOperazioniRemote(String alias) {
  2081.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerSvecchiamentoOperazioniRemote.get(alias);
  2082.     }
  2083.     public String getJmxPdDConfigurazioneSistemaNomeAttributoTimerThresholdThread(String alias) {
  2084.         return this.jmxPdDConfigurazioneSistemaNomeAttributoTimerThresholdThread.get(alias);
  2085.     }
  2086.     public String getJmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreById(String alias) {
  2087.         return this.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreById.get(alias);
  2088.     }
  2089.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreById(String alias) {
  2090.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreById.get(alias);
  2091.     }
  2092.     public String getJmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyValidazione(String alias) {
  2093.         return this.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyValidazione.get(alias);
  2094.     }
  2095.     public String getJmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyNegoziazione(String alias) {
  2096.         return this.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreTokenPolicyNegoziazione.get(alias);
  2097.     }
  2098.     public String getJmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreAttributeAuthority(String alias) {
  2099.         return this.jmxPdDConfigurazioneSistemaNomeMetodoCheckConnettoreAttributeAuthority.get(alias);
  2100.     }
  2101.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyValidazione(String alias) {
  2102.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyValidazione.get(alias);
  2103.     }
  2104.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyNegoziazione(String alias) {
  2105.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreTokenPolicyNegoziazione.get(alias);
  2106.     }
  2107.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreAttributeAuthority(String alias) {
  2108.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetCertificatiConnettoreAttributeAuthority.get(alias);
  2109.     }
  2110.     public String getJmxPdDConfigurazioneSistemaNomeMetodoEnablePortaDelegata(String alias) {
  2111.         return this.jmxPdDConfigurazioneSistemaNomeMetodoEnablePortaDelegata.get(alias);
  2112.     }
  2113.     public String getJmxPdDConfigurazioneSistemaNomeMetodoDisablePortaDelegata(String alias) {
  2114.         return this.jmxPdDConfigurazioneSistemaNomeMetodoDisablePortaDelegata.get(alias);
  2115.     }
  2116.     public String getJmxPdDConfigurazioneSistemaNomeMetodoEnablePortaApplicativa(String alias) {
  2117.         return this.jmxPdDConfigurazioneSistemaNomeMetodoEnablePortaApplicativa.get(alias);
  2118.     }
  2119.     public String getJmxPdDConfigurazioneSistemaNomeMetodoDisablePortaApplicativa(String alias) {
  2120.         return this.jmxPdDConfigurazioneSistemaNomeMetodoDisablePortaApplicativa.get(alias);
  2121.     }
  2122.     public String getJmxPdDConfigurazioneSistemaNomeMetodoEnableConnettoreMultiplo(String alias) {
  2123.         return this.jmxPdDConfigurazioneSistemaNomeMetodoEnableConnettoreMultiplo.get(alias);
  2124.     }
  2125.     public String getJmxPdDConfigurazioneSistemaNomeMetodoDisableConnettoreMultiplo(String alias) {
  2126.         return this.jmxPdDConfigurazioneSistemaNomeMetodoDisableConnettoreMultiplo.get(alias);
  2127.     }
  2128.     public String getJmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiplo(String alias) {
  2129.         return this.jmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiplo.get(alias);
  2130.     }
  2131.     public String getJmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiplo(String alias) {
  2132.         return this.jmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiplo.get(alias);
  2133.     }
  2134.     public String getJmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiploRuntimeRepository(String alias) {
  2135.         return this.jmxPdDConfigurazioneSistemaNomeMetodoEnableSchedulingConnettoreMultiploRuntimeRepository.get(alias);
  2136.     }
  2137.     public String getJmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiploRuntimeRepository(String alias) {
  2138.         return this.jmxPdDConfigurazioneSistemaNomeMetodoDisableSchedulingConnettoreMultiploRuntimeRepository.get(alias);
  2139.     }
  2140.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAccordoCooperazione(String alias) {
  2141.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAccordoCooperazione.get(alias);
  2142.     }
  2143.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApi(String alias) {
  2144.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApi.get(alias);
  2145.     }
  2146.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheErogazione(String alias) {
  2147.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheErogazione.get(alias);
  2148.     }
  2149.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheFruizione(String alias) {
  2150.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheFruizione.get(alias);
  2151.     }
  2152.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheSoggetto(String alias) {
  2153.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheSoggetto.get(alias);
  2154.     }
  2155.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApplicativo(String alias) {
  2156.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheApplicativo.get(alias);
  2157.     }
  2158.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheRuolo(String alias) {
  2159.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheRuolo.get(alias);
  2160.     }
  2161.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheScope(String alias) {
  2162.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheScope.get(alias);
  2163.     }
  2164.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyValidazione(String alias) {
  2165.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyValidazione.get(alias);
  2166.     }
  2167.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyNegoziazione(String alias) {
  2168.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheTokenPolicyNegoziazione.get(alias);
  2169.     }
  2170.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAttributeAuthority(String alias) {
  2171.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRipulisciRiferimentiCacheAttributeAuthority.get(alias);
  2172.     }
  2173.     public String getJmxPdDConfigurazioneSistemaNomeRisorsaAccessoRegistroServizi(String alias) {
  2174.         return this.jmxPdDConfigurazioneSistemaNomeRisorsaAccessoRegistroServizi.get(alias);
  2175.     }
  2176.     public String getJmxPdDConfigurazioneSistemaNomeRisorsaStatoServiziPdD(String alias) {
  2177.         return this.jmxPdDConfigurazioneSistemaNomeRisorsaStatoServiziPdD.get(alias);
  2178.     }
  2179.     public String getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegata(String alias) {
  2180.         return this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegata.get(alias);
  2181.     }
  2182.     public String getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataAbilitazioniPuntuali(String alias) {
  2183.         return this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataAbilitazioniPuntuali.get(alias);
  2184.     }
  2185.     public String getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataDisabilitazioniPuntuali(String alias) {
  2186.         return this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaDelegataDisabilitazioniPuntuali.get(alias);
  2187.     }
  2188.     public String getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativa(String alias) {
  2189.         return this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativa.get(alias);
  2190.     }
  2191.     public String getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaAbilitazioniPuntuali(String alias) {
  2192.         return this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaAbilitazioniPuntuali.get(alias);
  2193.     }
  2194.     public String getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaDisabilitazioniPuntuali(String alias) {
  2195.         return this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioPortaApplicativaDisabilitazioniPuntuali.get(alias);
  2196.     }
  2197.     public String getJmxPdDConfigurazioneSistemaNomeAttributoStatoServizioIntegrationManager(String alias) {
  2198.         return this.jmxPdDConfigurazioneSistemaNomeAttributoStatoServizioIntegrationManager.get(alias);
  2199.     }
  2200.     public String getJmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaDelegata(String alias) {
  2201.         return this.jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaDelegata.get(alias);
  2202.     }
  2203.     public String getJmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaDelegata(String alias) {
  2204.         return this.jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaDelegata.get(alias);
  2205.     }
  2206.     public String getJmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaApplicativa(String alias) {
  2207.         return this.jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioPortaApplicativa.get(alias);
  2208.     }
  2209.     public String getJmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaApplicativa(String alias) {
  2210.         return this.jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioPortaApplicativa.get(alias);
  2211.     }
  2212.     public String getJmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioIntegrationManager(String alias) {
  2213.         return this.jmxPdDConfigurazioneSistemaNomeMetodoAbilitaServizioIntegrationManager.get(alias);
  2214.     }
  2215.     public String getJmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioIntegrationManager(String alias) {
  2216.         return this.jmxPdDConfigurazioneSistemaNomeMetodoDisabilitaServizioIntegrationManager.get(alias);
  2217.     }
  2218.     public String getJmxPdDConfigurazioneSistemaNomeRisorsaDatasourceGW(String alias) {
  2219.         return this.jmxPdDConfigurazioneSistemaNomeRisorsaDatasourceGW.get(alias);
  2220.     }
  2221.     public String getJmxPdDConfigurazioneSistemaNomeAttributoNumeroDatasourceGW(String alias) {
  2222.         return this.jmxPdDConfigurazioneSistemaNomeAttributoNumeroDatasourceGW.get(alias);
  2223.     }
  2224.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetDatasourcesGW(String alias) {
  2225.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetDatasourcesGW.get(alias);
  2226.     }
  2227.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetUsedConnectionsDatasourcesGW(String alias) {
  2228.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetUsedConnectionsDatasourcesGW.get(alias);
  2229.     }
  2230.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetInformazioniDatabaseDatasourcesGW(String alias) {
  2231.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetInformazioniDatabaseDatasourcesGW.get(alias);
  2232.     }
  2233.     public String getJmxPdDConfigurazioneSistemaNomeRisorsaConsegnaContenutiApplicativi(String alias) {
  2234.         return this.jmxPdDConfigurazioneSistemaNomeRisorsaConsegnaContenutiApplicativi.get(alias);
  2235.     }
  2236.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetThreadPoolStatus(String alias) {
  2237.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetThreadPoolStatus.get(alias);
  2238.     }
  2239.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetQueueConfig(String alias) {
  2240.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetQueueConfig.get(alias);
  2241.     }
  2242.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetApplicativiPrioritari(String alias) {
  2243.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetApplicativiPrioritari.get(alias);
  2244.     }
  2245.     public String getJmxPdDConfigurazioneSistemaNomeMetodoGetConnettoriPrioritari(String alias) {
  2246.         return this.jmxPdDConfigurazioneSistemaNomeMetodoGetConnettoriPrioritari.get(alias);
  2247.     }
  2248.     public String getJmxPdDConfigurazioneSistemaNomeMetodoUpdateConnettoriPrioritari(String alias) {
  2249.         return this.jmxPdDConfigurazioneSistemaNomeMetodoUpdateConnettoriPrioritari.get(alias);
  2250.     }
  2251.     public String getJmxPdDConfigurazioneSistemaNomeMetodoResetConnettoriPrioritari(String alias) {
  2252.         return this.jmxPdDConfigurazioneSistemaNomeMetodoResetConnettoriPrioritari.get(alias);
  2253.     }
  2254.     public String getJmxPdDConfigurazioneSistemaNomeRisorsaSystemPropertiesPdD(String alias) {
  2255.         return this.jmxPdDConfigurazioneSistemaNomeRisorsaSystemPropertiesPdD.get(alias);
  2256.     }
  2257.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRefreshPersistentConfiguration(String alias) {
  2258.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRefreshPersistentConfiguration.get(alias);
  2259.     }
  2260.     public String getJmxPdDConfigurazioneSistemaNomeRisorsaDatiRichieste(String alias) {
  2261.         return this.jmxPdDConfigurazioneSistemaNomeRisorsaDatiRichieste.get(alias);
  2262.     }
  2263.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingGlobalConfigCache(String alias) {
  2264.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingGlobalConfigCache.get(alias);
  2265.     }
  2266.     public String getJmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingAPIConfigCache(String alias) {
  2267.         return this.jmxPdDConfigurazioneSistemaNomeMetodoRemoveRateLimitingAPIConfigCache.get(alias);
  2268.     }
  2269.     public List<String> getJmxPdDCaches(String alias) {
  2270.         return this.jmxPdDCaches.get(alias);
  2271.     }
  2272.     public List<String> getJmxPdDCachesPrefill(String alias) {
  2273.         return this.jmxPdDCachesPrefill.get(alias);
  2274.     }
  2275.     public String getJmxPdDCacheType(String alias) {
  2276.         return this.jmxPdDCacheType.get(alias);
  2277.     }
  2278.     public String getJmxPdDCacheNomeAttributoCacheAbilitata(String alias) {
  2279.         return this.jmxPdDCacheNomeAttributoCacheAbilitata.get(alias);
  2280.     }
  2281.     public String getJmxPdDCacheNomeMetodoStatoCache(String alias) {
  2282.         return this.jmxPdDCacheNomeMetodoStatoCache.get(alias);
  2283.     }
  2284.     public String getJmxPdDCacheNomeMetodoResetCache(String alias) {
  2285.         return this.jmxPdDCacheNomeMetodoResetCache.get(alias);
  2286.     }
  2287.     public String getJmxPdDCacheNomeMetodoPrefillCache(String alias) {
  2288.         return this.jmxPdDCacheNomeMetodoPrefillCache.get(alias);
  2289.     }

  2290.     public InvokerNodiRuntime getInvoker() {
  2291.         return this.invoker;
  2292.     }
  2293.    
  2294.    

  2295.     /* --- COSTRUTTORI --- */

  2296.     public static Boolean API = null;
  2297.     public static synchronized void initAPIMode() {
  2298.         if(API==null) {
  2299.             API = true;
  2300.         }
  2301.     }
  2302.     public static boolean isAPIMode() {
  2303.         return API!=null && API.booleanValue();
  2304.     }
  2305.        
  2306.     protected boolean usedByApi = false;
  2307.     public boolean isUsedByApi() {
  2308.         return this.usedByApi;
  2309.     }
  2310.        
  2311.     public ControlStationCore() throws DriverControlStationException {
  2312.         this(false,null,null);
  2313.     }
  2314.    
  2315.     public ControlStationCore(boolean initForApi, String confDir, String protocolloDefault) throws DriverControlStationException {

  2316.         this.usedByApi = initForApi;
  2317.        
  2318.         if(initForApi) {
  2319.             ControlStationCore.log = LoggerWrapperFactory.getLogger(ControlStationCore.class);
  2320.             if(API==null) {
  2321.                 ControlStationCore.initAPIMode();
  2322.             }
  2323.         }
  2324.         else {
  2325.             ControlStationCore.checkInitLogger();
  2326.         }

  2327.         try{
  2328.             if(!initForApi) {
  2329.                 this.initCore();
  2330.             }

  2331.             // inizializzo il DBManager
  2332.             this.initConnections();

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

  2335.             // inizializzo JMX/BYOK
  2336.             if(initForApi) {
  2337.                 initBYOK(ConfigurazioneNodiRuntime.getConfigurazioneNodiRuntime());
  2338.             }
  2339.             else {
  2340.                 this.initCoreJmxResources();
  2341.             }

  2342.             // inizializza l'AuditManager
  2343.             ControlStationCore.initializeAuditManager(this.tipoDB);

  2344.             // inizializzo Core SICAContext
  2345.             //this.contextSICA = new SICAtoOpenSPCoopContext("SICA");

  2346.             this.idAccordoFactory = IDAccordoFactory.getInstance();
  2347.             this.idAccordoCooperazioneFactory = IDAccordoCooperazioneFactory.getInstance();
  2348.             this.idServizioFactory = IDServizioFactory.getInstance();

  2349.             ConfigurazionePdD configPdD = new ConfigurazionePdD();
  2350.             configPdD.setLog(ControlStationCore.log);
  2351.             configPdD.setLoader(org.openspcoop2.utils.resources.Loader.getInstance());
  2352.             if(!initForApi) {
  2353.                 configPdD.setConfigurationDir(ConsoleProperties.getInstance().getConfDirectory());
  2354.             }
  2355.             else {
  2356.                 configPdD.setConfigurationDir(confDir);
  2357.             }
  2358.             configPdD.setAttesaAttivaJDBC(this.jdbcSerializableAttesaAttiva);
  2359.             configPdD.setCheckIntervalJDBC(this.jdbcSerializableCheck);
  2360.             configPdD.setTipoDatabase(TipiDatabase.toEnumConstant(DatasourceProperties.getInstance().getTipoDatabase()));
  2361.             ProtocolFactoryManager.initialize(ControlStationCore.log, configPdD, this.protocolloDefault);
  2362.             this.protocolFactoryManager = ProtocolFactoryManager.getInstance();
  2363.             if(initForApi) {
  2364.                 this.protocolloDefault = protocolloDefault;
  2365.             }
  2366.             if(this.protocolloDefault==null){
  2367.                 this.protocolloDefault = this.protocolFactoryManager.getDefaultProtocolFactory().getProtocol();
  2368.             }

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

  2449.         }catch(Exception e){
  2450.             ControlStationCore.logError("Errore di inizializzazione: "+e.getMessage(), e);
  2451.             throw new DriverControlStationException(e.getMessage(),e);
  2452.         }
  2453.     }

  2454.     public ControlStationCore(ControlStationCore core) throws DriverControlStationException {

  2455.         /** Impostazioni grafiche */
  2456.         this.consoleNomeSintesi = core.consoleNomeSintesi;
  2457.         this.consoleNomeEsteso = core.consoleNomeEsteso;
  2458.         this.consoleCSS = core.consoleCSS;
  2459.         this.consoleLanguage = core.consoleLanguage;
  2460.         this.consoleLunghezzaLabel = core.consoleLunghezzaLabel;
  2461.         this.logoHeaderImage = core.logoHeaderImage;
  2462.         this.logoHeaderLink = core.logoHeaderLink;
  2463.         this.logoHeaderTitolo = core.logoHeaderTitolo;
  2464.         this.visualizzaLinkHomeHeader = core.visualizzaLinkHomeHeader;
  2465.         this.defaultFont = core.defaultFont;
  2466.         this.affineTransform = core.affineTransform;
  2467.         this.fontRenderContext = core.fontRenderContext;

  2468.         /** Tipo del Database */
  2469.         this.tipoDB = core.tipoDB;

  2470.         /** Accesso alle code JMS: Smistatore */
  2471.         this.smistatoreQueue = core.smistatoreQueue;
  2472.         this.cfName = core.cfName;
  2473.         this.cfProp = core.cfProp;

  2474.         /** IDFactory */
  2475.         this.idAccordoFactory = core.idAccordoFactory;
  2476.         this.idAccordoCooperazioneFactory = core.idAccordoCooperazioneFactory;
  2477.         this.idServizioFactory = core.idServizioFactory;

  2478.         /** Protocollo */
  2479.         this.protocolloDefault = core.protocolloDefault;
  2480.         this.jdbcSerializableAttesaAttiva = core.jdbcSerializableAttesaAttiva;
  2481.         this.jdbcSerializableCheck = core.jdbcSerializableCheck;
  2482.         this.protocolFactoryManager = core.protocolFactoryManager;

  2483.         /** Visione oggetti globale o per utenti */
  2484.         this.visioneOggettiGlobale = core.visioneOggettiGlobale;
  2485.         this.utentiConVisioneGlobale = core.utentiConVisioneGlobale;

  2486.         /** Tracciamento */
  2487.         this.tracceShowConfigurazioneCustomAppender = core.tracceShowConfigurazioneCustomAppender;
  2488.         this.tracceSameDBWebUI = core.tracceSameDBWebUI;
  2489.         this.tracceShowSorgentiDatiDatabase = core.tracceShowSorgentiDatiDatabase;
  2490.         this.tracceDatasource = core.tracceDatasource;
  2491.         this.tracceTipoDatabase = core.tracceTipoDatabase;
  2492.         this.tracceCtxDatasource = core.tracceCtxDatasource;
  2493.         this.driverTracciamento = core.driverTracciamento;

  2494.         /** MsgDiagnostici */
  2495.         this.msgDiagnosticiShowConfigurazioneCustomAppender = core.msgDiagnosticiShowConfigurazioneCustomAppender;
  2496.         this.msgDiagnosticiSameDBWebUI = core.msgDiagnosticiSameDBWebUI;
  2497.         this.msgDiagnosticiShowSorgentiDatiDatabase = core.msgDiagnosticiShowSorgentiDatiDatabase;
  2498.         this.msgDiagnosticiDatasource = core.msgDiagnosticiDatasource;
  2499.         this.msgDiagnosticiTipoDatabase = core.msgDiagnosticiTipoDatabase;
  2500.         this.msgDiagnosticiCtxDatasource = core.msgDiagnosticiCtxDatasource;
  2501.         this.driverMSGDiagnostici = core.driverMSGDiagnostici;
  2502.        
  2503.         /** Dump */
  2504.         this.dumpShowConfigurazioneCustomAppender = core.dumpShowConfigurazioneCustomAppender;
  2505.         this.dumpShowConfigurazioneDumpRealtime = core.dumpShowConfigurazioneDumpRealtime;

  2506.         /** Gestione Pdd Abilitata */
  2507.         this.gestionePddAbilitata = core.gestionePddAbilitata;
  2508.        
  2509.         /** Registro Servizi locale/remoto */
  2510.         this.registroServiziLocale = core.registroServiziLocale;

  2511.         /** Modalita' Single PdD */
  2512.         this.singlePdD = core.singlePdD;

  2513.         /** J2EE Ambiente */
  2514.         this.showJ2eeOptions = core.showJ2eeOptions;

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

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

  2746.         /** Motori di Sincronizzazione */
  2747.         this.sincronizzazionePddEngineEnabled = core.sincronizzazionePddEngineEnabled;
  2748.         this.sincronizzazionePddEngineEnabled_prefissoNomeCodaConfigurazionePdd = core.sincronizzazionePddEngineEnabled_prefissoNomeCodaConfigurazionePdd;
  2749.         this.sincronizzazionePddEngineEnabled_scriptShell_Path = core.sincronizzazionePddEngineEnabled_scriptShell_Path;
  2750.         this.sincronizzazionePddEngineEnabled_scriptShell_Args = core.sincronizzazionePddEngineEnabled_scriptShell_Args;
  2751.         this.sincronizzazioneRegistroEngineEnabled = core.sincronizzazioneRegistroEngineEnabled;
  2752.         this.sincronizzazioneGEEngineEnabled = core.sincronizzazioneGEEngineEnabled;
  2753.         this.sincronizzazioneGE_TipoSoggetto = core.sincronizzazioneGE_TipoSoggetto;
  2754.         this.sincronizzazioneGE_NomeSoggetto = core.sincronizzazioneGE_NomeSoggetto;
  2755.         this.sincronizzazioneGE_NomeServizioApplicativo = core.sincronizzazioneGE_NomeServizioApplicativo;

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




  2947.     /* --- INIT METHOD --- */

  2948.     /**
  2949.      * Prova ad ottenere una istanza del DBManager per utilizzare le connessioni
  2950.      * del pool
  2951.      *
  2952.      * @throws DriverControlStationException
  2953.      */
  2954.     private void initConnections() throws ControlStationCoreException {

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

  2987.         if (!DBManager.isInitialized()) {
  2988.             int i = 0;
  2989.             while (!DBManager.isInitialized() && (i < 6)) {

  2990.                 try {
  2991.                     ControlStationCore.logDebug("jndiName=" + jndiName);
  2992.                     ControlStationCore.logDebug("jndiProp=" + jndiProp.toString());
  2993.                     DBManager.initialize(jndiName, jndiProp);
  2994.                     ControlStationCore.logInfo("Inizializzazione DBManager Effettuata.");
  2995.                 } catch (Exception e) {
  2996.                     ControlStationCore.logError("Inizializzazione DBManager fallita.", e);
  2997.                     ControlStationCore.logInfo("Ritento inizializzazione ...");
  2998.                 }

  2999.                 i++;
  3000.             }
  3001.         }

  3002.         if (!DBManager.isInitialized()) {
  3003.             throw new ControlStationCoreException("Inizializzazione DBManager fallita ripetutamente.");
  3004.         }

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

  3006.     }

  3007.     private void initCore() throws ControlStationCoreException {
  3008.         this.tipoDB = "";

  3009.         this.smistatoreQueue = "";
  3010.         this.cfName = "";
  3011.         this.cfProp = new Properties();

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

  3258.             /// Opzioni per Plugins
  3259.             this.pluginMenu = this.newIExtendedMenu(consoleProperties.getPluginsMenu());
  3260.             this.pluginConfigurazione = this.newIExtendedFormServlet(consoleProperties.getPluginsConfigurazione());
  3261.             if(this.pluginConfigurazione!=null){
  3262.                 for (IExtendedFormServlet formPluginConfigurazione : this.pluginConfigurazione) {
  3263.                     IExtendedListServlet listPluginConfigurazione = formPluginConfigurazione.getExtendedInternalList();
  3264.                     if(listPluginConfigurazione!=null){
  3265.                         this.pluginConfigurazioneList.put(formPluginConfigurazione.getUniqueID(), listPluginConfigurazione);
  3266.                     }
  3267.                 }
  3268.             }
  3269.             this.pluginConnettore = this.newIExtendedConnettore(consoleProperties.getPluginsConnettore());
  3270.             this.pluginPortaDelegata = this.newIExtendedListServlet(consoleProperties.getPluginsPortaDelegata());
  3271.             this.pluginPortaApplicativa = this.newIExtendedListServlet(consoleProperties.getPluginsPortaApplicativa());

  3272.         } catch (java.lang.Exception e) {
  3273.             ControlStationCore.logError("[ControlStationCore::initCore] Impossibile leggere i dati dal file console.properties:" + e.toString(),e);
  3274.             throw new ControlStationCoreException("[ControlStationCore::initCore] Impossibile leggere i dati dal file console.properties:" + e.toString(),e);
  3275.         }
  3276.        
  3277.        
  3278.        
  3279.         // Leggo le informazioni da queue.properties
  3280.         QueueProperties queueProperties = null;
  3281.         if(this.singlePdD==false){
  3282.             try {
  3283.    
  3284.                 queueProperties = QueueProperties.getInstance();
  3285.                
  3286.                 this.cfName = queueProperties.getConnectionFactory();
  3287.                 this.cfProp = queueProperties.getConnectionFactoryContext();
  3288.                
  3289.             } catch (java.lang.Exception e) {
  3290.                 ControlStationCore.logError("[ControlStationCore::initCore] Impossibile leggere i dati dal file queue.properties[" + e.toString() + "]", e);
  3291.                 throw new ControlStationCoreException("ControlStationCore: Impossibile leggere i dati dal file queue.properties[" + e.toString() + "]",e);
  3292.             }
  3293.         }
  3294.     }

  3295.     private void initBYOK(ConfigurazioneNodiRuntime configurazioneNodiRuntime) {
  3296.         this.configurazioneNodiRuntime = configurazioneNodiRuntime;
  3297.         this.invoker = new InvokerNodiRuntime(log, this.configurazioneNodiRuntime);
  3298.        
  3299.         this.driverBYOKUtilities = new DriverBYOKUtilities(false, log, this.configurazioneNodiRuntime);
  3300.        
  3301.         this.lockUtilities = new LockUtilities(this.driverBYOKUtilities,
  3302.                 this.isVisualizzaInformazioniCifrate(), this.getByokWarningMessage(), UtilsCostanti.SERVLET_NAME_SECRET_DECODER,
  3303.                 this.getNotaInformativaInformazioneMemorizzataInChiaro(), this.getNotaInformativaInformazioneCifrataSecurityPolicyDifferente(), this.isVisualizzaCampiPasswordComeLock());
  3304.        
  3305.     }
  3306.    
  3307.     private void initCoreJmxResources() throws ControlStationCoreException {

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

  3520.     /**
  3521.      * Inizializza il driver di tracciamento.
  3522.      *
  3523.      * @throws DriverControlStationException
  3524.      */
  3525.     private synchronized void initDriverTracciamento(String nomeDs, boolean forceChange) throws DriverControlStationException {
  3526.         if (this.driverTracciamento == null || forceChange) {
  3527.             try {
  3528.                 if (nomeDs == null || nomeDs.equals("") || nomeDs.equals(CostantiControlStation.DEFAULT_VALUE_NON_SELEZIONATO)) {
  3529.                     if(this.tracceSameDBWebUI){
  3530.                         this.driverTracciamento = new DriverTracciamento(ControlStationCore.dbM.getDataSourceName(),this.tipoDB,ControlStationCore.dbM.getDataSourceContext(),ControlStationCore.log);
  3531.                     }
  3532.                     else{
  3533.                         this.driverTracciamento = new DriverTracciamento(this.tracceDatasource, this.tracceTipoDatabase, this.tracceCtxDatasource,ControlStationCore.log);
  3534.                     }
  3535.                 } else {

  3536.                     Configurazione newConfigurazione = this.getConfigurazioneGenerale();
  3537.                     Tracciamento t = newConfigurazione.getTracciamento();
  3538.                     List<OpenspcoopSorgenteDati> lista = t.getOpenspcoopSorgenteDatiList();
  3539.                     OpenspcoopSorgenteDati od = null;
  3540.                     for (int j = 0; j < t.sizeOpenspcoopSorgenteDatiList(); j++) {
  3541.                         od = lista.get(j);
  3542.                         if (od!=null && nomeDs!=null && nomeDs.equals(od.getNome())) {
  3543.                             break;
  3544.                         }
  3545.                     }
  3546.                    
  3547.                     if(od==null) {
  3548.                         throw new Exception("Sorgente Dati non trovata");
  3549.                     }

  3550.                     //proprieta
  3551.                     Properties prop = new Properties();

  3552.                     if(od.getPropertyList()!=null && od.sizePropertyList()>0){
  3553.                         for (Property p : od.getPropertyList()) {
  3554.                             prop.put(p.getNome(), p.getValore());
  3555.                         }
  3556.                     }

  3557.                     this.driverTracciamento = new DriverTracciamento(
  3558.                             od.getNomeJndi(),
  3559.                             od.getTipoDatabase(),
  3560.                             prop,
  3561.                             ControlStationCore.log);
  3562.                 }
  3563.             } catch (java.lang.Exception e) {
  3564.                 ControlStationCore.logError("[pdd] Inizializzazione DriverTracciamento non riuscita : " + e.getMessage(),e);
  3565.                 throw new DriverControlStationException("[pdd] Inizializzazione DriverTracciamento non riuscita : " + e.getMessage(),e);
  3566.             }

  3567.         }

  3568.     }

  3569.     /**
  3570.      * Inizializza il driver della diagnostica.
  3571.      *
  3572.      * @throws DriverControlStationException
  3573.      */
  3574.     private synchronized void initDriverMSGDiagnostici(String nomeDs, boolean forceChange) throws DriverControlStationException {
  3575.         if (this.driverMSGDiagnostici == null || forceChange) {
  3576.             try {
  3577.                 if (nomeDs == null || nomeDs.equals("") || nomeDs.equals(CostantiControlStation.DEFAULT_VALUE_NON_SELEZIONATO)) {
  3578.                     if(this.msgDiagnosticiSameDBWebUI){
  3579.                         this.driverMSGDiagnostici = new DriverMsgDiagnostici(ControlStationCore.dbM.getDataSourceName(),this.tipoDB,ControlStationCore.dbM.getDataSourceContext(),ControlStationCore.log);
  3580.                     }
  3581.                     else{
  3582.                         this.driverMSGDiagnostici = new DriverMsgDiagnostici(this.msgDiagnosticiDatasource, this.msgDiagnosticiTipoDatabase, this.msgDiagnosticiCtxDatasource,ControlStationCore.log);
  3583.                     }
  3584.                 } else {

  3585.                     Configurazione newConfigurazione = this.getConfigurazioneGenerale();
  3586.                     MessaggiDiagnostici md = newConfigurazione.getMessaggiDiagnostici();
  3587.                     List<OpenspcoopSorgenteDati> lista = md.getOpenspcoopSorgenteDatiList();
  3588.                     OpenspcoopSorgenteDati od = null;
  3589.                     for (int j = 0; j < md.sizeOpenspcoopSorgenteDatiList(); j++) {
  3590.                         od = lista.get(j);
  3591.                         if (od!=null && nomeDs!=null && nomeDs.equals(od.getNome())) {
  3592.                             break;
  3593.                         }
  3594.                     }
  3595.                    
  3596.                     if(od==null) {
  3597.                         throw new DriverControlStationException("Sorgente Dati non trovata");
  3598.                     }
  3599.                    
  3600.                     //proprieta
  3601.                     Properties prop = new Properties();

  3602.                     if(od.getPropertyList()!=null && od.sizePropertyList()>0){
  3603.                         for (Property p : od.getPropertyList()) {
  3604.                             prop.put(p.getNome(), p.getValore());
  3605.                         }
  3606.                     }

  3607.                     this.driverMSGDiagnostici = new DriverMsgDiagnostici(
  3608.                             od.getNomeJndi(),
  3609.                             od.getTipoDatabase(),
  3610.                             prop,
  3611.                             ControlStationCore.log);
  3612.                 }
  3613.             } catch (java.lang.Exception e) {
  3614.                 ControlStationCore.logError("[pdd] Inizializzazione DriverMSGDiagnostici non riuscita : " + e.getMessage(),e);
  3615.                 throw new DriverControlStationException("[pdd] Inizializzazione DriverMSGDiagnostici non riuscita : " + e.getMessage(),e);
  3616.             }

  3617.         }

  3618.     }






  3619.     /* ----- SMISTAMENTO OPERAZIONE ------ */

  3620.     /**
  3621.      * Effettua transazionalmente le operazioni utilizzando il driver Ogni
  3622.      * oggetto passato ha un corrispondente tipo di operazione che deve essere
  3623.      * effettuato su di esso in modo tale da poter effettuare diverse operazioni
  3624.      * su diversi oggetti in maniera transazionale
  3625.      *
  3626.      * @param <Type>
  3627.      * @param operationType
  3628.      * @param superUser
  3629.      * @param oggetti
  3630.      * @throws DriverConfigurazioneException
  3631.      * @throws DriverControlStationException
  3632.      * @throws DriverRegistroServiziException
  3633.      * @throws ControlStationCoreException
  3634.      */
  3635.     private void performOperation(int[] operationTypes, String superUser, boolean smista, Object... oggetti) throws DriverConfigurazioneNotFound, DriverRegistroServiziNotFound, DriverConfigurazioneException, DriverControlStationException, DriverRegistroServiziException, ControlStationCoreException {
  3636.         Connection con = null;
  3637.         DriverControlStationDB driver = null;
  3638.         boolean doSetDati = false;
  3639.         List<OperazioneDaSmistare> operazioneDaSmistareList = null;
  3640.         OperazioneDaSmistare operazioneDaSmistare = null;

  3641.         try {

  3642.             operazioneDaSmistareList = new ArrayList<>();
  3643.             con = ControlStationCore.dbM.getConnection();
  3644.             if(con==null) {
  3645.                 throw new ControlStationCoreException("Connection is null");
  3646.             }

  3647.             // le operazioni da eseguire devono essere transazionali quindi
  3648.             // disabilito l'autocommit
  3649.             // e lo riabilito solo dopo aver terminato le operazioni
  3650.             con.setAutoCommit(false);
  3651.             PdDControlStation pddGestore = null;
  3652.             int pddGestoreTipoOperazione = -1;

  3653.             // creo il driver
  3654.             driver = new DriverControlStationDB(con, null, this.tipoDB);
  3655.            
  3656.             // BYOK
  3657.             activeBYOK(driver, true, false);
  3658.            
  3659.             SoggettiCore soggettiCore = new SoggettiCore(this);

  3660.             for (int i = 0; i < oggetti.length; i++) {
  3661.                 // prendo il tipo di operazione da effettuare su questo oggetto
  3662.                 int operationType = operationTypes[i];
  3663.                 Object oggetto = oggetti[i];
  3664.                
  3665.                 IExtendedBean extendedBean = null;
  3666.                 IExtendedCoreServlet extendedServlet = null;
  3667.                 if(oggetto instanceof WrapperExtendedBean){
  3668.                     WrapperExtendedBean w = (WrapperExtendedBean) oggetto;
  3669.                     if(w.isManageOriginalBean()){
  3670.                         oggetto = w.getOriginalBean();  
  3671.                     }
  3672.                     extendedBean = w.getExtendedBean();
  3673.                     extendedServlet = w.getExtendedServlet();
  3674.                 }
  3675.                
  3676.                
  3677.                 switch (operationType) {
  3678.                 case CostantiControlStation.PERFORM_OPERATION_CREATE:

  3679.                     // Performing CREATE operations
  3680.                     /* Eseguo l'operazione sull'oggetto */
  3681.                     /**
  3682.                      * Operazioni su ctrlstat
  3683.                      */
  3684.                     if (oggetto instanceof PdDControlStation) {
  3685.                         PdDControlStation pdd = (PdDControlStation) oggetto;
  3686.                         driver.createPdDControlStation(pdd);

  3687.                         // Una volta creata la PdD avvio il thread di
  3688.                         // gestione (a meno che non sia esterna)
  3689.                         pddGestore = pdd;
  3690.                         pddGestoreTipoOperazione = operationType;

  3691.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3692.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3693.                         operazioneDaSmistare.setIDTable(pdd.getId());
  3694.                         operazioneDaSmistare.setSuperuser(superUser);
  3695.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pdd);
  3696.                         operazioneDaSmistare.addParameter(OperationsParameter.PORTA_DOMINIO, pdd.getNome());

  3697.                         doSetDati = true;
  3698.                     }

  3699.                     if (oggetto instanceof MappingFruizionePortaDelegata) {
  3700.                         MappingFruizionePortaDelegata mapping = (MappingFruizionePortaDelegata) oggetto;
  3701.                         driver.createMappingFruizionePortaDelegata(mapping);
  3702.                        
  3703.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3704.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3705.                         operazioneDaSmistare.setIDTable(Integer.parseInt("" + mapping.getTableId()));
  3706.                         operazioneDaSmistare.setSuperuser(superUser);
  3707.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.mappingFruizionePD);

  3708.                         doSetDati = false;

  3709.                     }
  3710.                    
  3711.                     if (oggetto instanceof MappingErogazionePortaApplicativa) {
  3712.                         MappingErogazionePortaApplicativa mapping = (MappingErogazionePortaApplicativa) oggetto;
  3713.                         driver.createMappingErogazionePortaApplicativa(mapping);
  3714.                        
  3715.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3716.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3717.                         operazioneDaSmistare.setIDTable(Integer.parseInt("" + mapping.getTableId()));
  3718.                         operazioneDaSmistare.setSuperuser(superUser);
  3719.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.mappingErogazionePA);

  3720.                         doSetDati = false;

  3721.                     }

  3722.                     /***********************************************************
  3723.                      * Caso Speciale dei Soggetti *
  3724.                      **********************************************************/

  3725.                     // soggetto config/reg
  3726.                     if (oggetto instanceof SoggettoCtrlStat) {
  3727.                         SoggettoCtrlStat soggetto = (SoggettoCtrlStat) oggetto;
  3728.                         Soggetto sogConf = soggetto.getSoggettoConf();
  3729.                         if(this.registroServiziLocale){
  3730.                             driver.getDriverRegistroServiziDB().createSoggetto(soggetto.getSoggettoReg());

  3731.                             sogConf.setId(soggetto.getSoggettoReg().getId());
  3732.                             IDSoggetto oldIDSoggettoForUpdate = new IDSoggetto(sogConf.getTipo(), sogConf.getNome());
  3733.                             sogConf.setOldIDSoggettoForUpdate(oldIDSoggettoForUpdate);
  3734.                             driver.getDriverConfigurazioneDB().updateSoggetto(sogConf);
  3735.                         }
  3736.                         else{
  3737.                             driver.getDriverConfigurazioneDB().createSoggetto(sogConf);
  3738.                         }

  3739.                         // Chiedo la setDati
  3740.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3741.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3742.                         operazioneDaSmistare.setIDTable(sogConf.getId());
  3743.                         operazioneDaSmistare.setSuperuser(superUser);
  3744.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.soggetto);
  3745.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, soggetto.getTipo());
  3746.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, soggetto.getNome());

  3747.                         if(soggetto.getSoggettoReg()!=null){
  3748.                             operazioneDaSmistare.setPdd(soggetto.getSoggettoReg().getPortaDominio());
  3749.                         }

  3750.                         doSetDati = true;

  3751.                     }
  3752.                    
  3753.                     // soggetto config
  3754.                     if (oggetto instanceof org.openspcoop2.core.config.Soggetto) {
  3755.                        
  3756.                         org.openspcoop2.core.config.Soggetto sogConf = (org.openspcoop2.core.config.Soggetto) oggetto;
  3757.                         // anche se e' stato chiesta una create. Puo' darsi che serva una update essendomi arrivata una informazione puntuale su di un tipo di soggetto
  3758.                         IDSoggetto idSoggetto = new IDSoggetto(sogConf.getTipo(),sogConf.getNome());
  3759.                         if(driver.getDriverConfigurazioneDB().existsSoggetto(idSoggetto)){
  3760.                             IDSoggetto oldIDSoggettoForUpdate = new IDSoggetto(sogConf.getTipo(), sogConf.getNome());
  3761.                             sogConf.setOldIDSoggettoForUpdate(oldIDSoggettoForUpdate);
  3762.                             driver.getDriverConfigurazioneDB().updateSoggetto(sogConf);
  3763.                         }
  3764.                         else{
  3765.                             // lancio una eccezione.
  3766.                             // Anche nel caso di gestione singola degli oggetti deve comunque essere prima creato il soggetto sul registro.
  3767.                             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");
  3768.                         }
  3769.                        

  3770.                         // Chiedo la setDati
  3771.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3772.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3773.                         operazioneDaSmistare.setIDTable(sogConf.getId());
  3774.                         operazioneDaSmistare.setSuperuser(superUser);
  3775.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.soggetto);
  3776.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, sogConf.getTipo());
  3777.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, sogConf.getNome());

  3778.                         doSetDati = true;

  3779.                     }
  3780.                    
  3781.                     // soggetto reg
  3782.                     if (oggetto instanceof org.openspcoop2.core.registry.Soggetto) {
  3783.                        
  3784.                         org.openspcoop2.core.registry.Soggetto sogReg = (org.openspcoop2.core.registry.Soggetto) oggetto;
  3785.                         if(this.registroServiziLocale){
  3786.                             driver.getDriverRegistroServiziDB().createSoggetto(sogReg);
  3787.                         }

  3788.                         // Chiedo la setDati
  3789.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3790.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3791.                         operazioneDaSmistare.setIDTable(sogReg.getId());
  3792.                         operazioneDaSmistare.setSuperuser(superUser);
  3793.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.soggetto);
  3794.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, sogReg.getTipo());
  3795.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, sogReg.getNome());

  3796.                         operazioneDaSmistare.setPdd(sogReg.getPortaDominio());
  3797.                        
  3798.                         doSetDati = true;

  3799.                     }

  3800.                    
  3801.                     /***********************************************************
  3802.                      * Operazioni su ConfigurazioneDB *
  3803.                      **********************************************************/
  3804.                    
  3805.                     // ServizioApplicativo
  3806.                     if (oggetto instanceof ServizioApplicativo) {
  3807.                         ServizioApplicativo sa = (ServizioApplicativo) oggetto;
  3808.                        
  3809.                         driver.getDriverConfigurazioneDB().createServizioApplicativo(sa);
  3810.                         if (sa.getIdSoggetto() == null || sa.getIdSoggetto() < 0) {
  3811.                             sa.setIdSoggetto(DBUtils.getIdSoggetto(sa.getNomeSoggettoProprietario(), sa.getTipoSoggettoProprietario(), con, this.tipoDB, CostantiDB.SOGGETTI));
  3812.                         }

  3813.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3814.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3815.                         operazioneDaSmistare.setIDTable(sa.getId());
  3816.                         operazioneDaSmistare.setSuperuser(superUser);
  3817.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.servizioApplicativo);
  3818.                         if(this.isRegistroServiziLocale()){
  3819.                             org.openspcoop2.core.registry.Soggetto sog = driver.getDriverRegistroServiziDB().getSoggetto(sa.getIdSoggetto());
  3820.                             operazioneDaSmistare.setPdd(sog.getPortaDominio());
  3821.                         }
  3822.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SERVIZIO_APPLICATIVO, sa.getNome());
  3823.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, sa.getTipoSoggettoProprietario());
  3824.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, sa.getNomeSoggettoProprietario());

  3825.                         doSetDati = true;
  3826.                     }
  3827.                     // PortaDelegata
  3828.                     if (oggetto instanceof PortaDelegata) {
  3829.                         PortaDelegata pd = (PortaDelegata) oggetto;
  3830.                         if (pd.getIdSoggetto() == null || pd.getIdSoggetto() < 0) {
  3831.                             pd.setIdSoggetto(DBUtils.getIdSoggetto(pd.getNomeSoggettoProprietario(), pd.getTipoSoggettoProprietario(), con, this.tipoDB, CostantiDB.SOGGETTI));
  3832.                         }
  3833.                         driver.getDriverConfigurazioneDB().createPortaDelegata(pd);
  3834.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3835.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3836.                         operazioneDaSmistare.setIDTable(pd.getId());
  3837.                         operazioneDaSmistare.setSuperuser(superUser);
  3838.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pd);
  3839.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_PD, pd.getNome());
  3840.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, pd.getTipoSoggettoProprietario());
  3841.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, pd.getNomeSoggettoProprietario());
  3842.                         if(this.isRegistroServiziLocale()){
  3843.                             org.openspcoop2.core.registry.Soggetto sogg = driver.getDriverRegistroServiziDB().getSoggetto(pd.getIdSoggetto());
  3844.                             String server = sogg.getPortaDominio();
  3845.                             operazioneDaSmistare.setPdd(server);
  3846.                         }
  3847.                         doSetDati = true;
  3848.                     }
  3849.                     // PortaApplicativa
  3850.                     if (oggetto instanceof PortaApplicativa) {
  3851.                         PortaApplicativa pa = (PortaApplicativa) oggetto;
  3852.                         if (pa.getIdSoggetto() == null || pa.getIdSoggetto() < 0) {
  3853.                             pa.setIdSoggetto(DBUtils.getIdSoggetto(pa.getNomeSoggettoProprietario(), pa.getTipoSoggettoProprietario(), con, this.tipoDB, CostantiDB.SOGGETTI));
  3854.                         }

  3855.                         if(this.isRegistroServiziLocale()){
  3856.                             // fix id_servizio = -1
  3857.                             PortaApplicativaServizio paSE = pa.getServizio();
  3858.                             // controllo solo se id < 0
  3859.                             if (paSE != null && paSE.getId() <= 0) {
  3860.                                 String nomeSoggetto = pa.getNomeSoggettoProprietario();
  3861.                                 String tipoSoggetto = pa.getTipoSoggettoProprietario();
  3862.                                 String nomeServizio = paSE.getNome();
  3863.                                 String tipoServizio = paSE.getTipo();
  3864.                                 Integer versioneServizio = paSE.getVersione();

  3865.                                 // controllo presenza soggetto virtuale
  3866.                                 // se presente soggetto virtuale override di
  3867.                                 // tipoSoggetto e nomeSoggetto
  3868.                                 PortaApplicativaSoggettoVirtuale paSoggVirt = pa.getSoggettoVirtuale();
  3869.                                 if (paSoggVirt != null) {
  3870.                                     long idSoggettoVirt = paSoggVirt != null ? paSoggVirt.getId() : -1;

  3871.                                     if (idSoggettoVirt <= 0) {
  3872.                                         nomeSoggetto = paSoggVirt.getNome();
  3873.                                         tipoSoggetto = paSoggVirt.getTipo();
  3874.                                     } else {
  3875.                                         org.openspcoop2.core.registry.Soggetto soggVirt = driver.getDriverRegistroServiziDB().getSoggetto(idSoggettoVirt);
  3876.                                         nomeSoggetto = soggVirt.getNome();
  3877.                                         tipoSoggetto = soggVirt.getTipo();
  3878.                                     }
  3879.                                 }

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

  3882.                                 paSE.setId(idServizio);
  3883.                                 pa.setServizio(paSE);
  3884.                             }
  3885.                         }

  3886.                         driver.getDriverConfigurazioneDB().createPortaApplicativa(pa);
  3887.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3888.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3889.                         operazioneDaSmistare.setIDTable(pa.getId());
  3890.                         operazioneDaSmistare.setSuperuser(superUser);
  3891.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pa);
  3892.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_PA, pa.getNome());
  3893.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, pa.getTipoSoggettoProprietario());
  3894.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, pa.getNomeSoggettoProprietario());
  3895.                         if(this.isRegistroServiziLocale()){
  3896.                             org.openspcoop2.core.registry.Soggetto sogg = driver.getDriverRegistroServiziDB().getSoggetto(pa.getIdSoggetto());
  3897.                             String server = sogg.getPortaDominio();
  3898.                             operazioneDaSmistare.setPdd(server);
  3899.                         }
  3900.                         doSetDati = true;
  3901.                     }
  3902.                     // RoutingTable
  3903.                     if (oggetto instanceof RoutingTable) {
  3904.                         RoutingTable rt = (RoutingTable) oggetto;
  3905.                         driver.getDriverConfigurazioneDB().createRoutingTable(rt);
  3906.                         ControlStationCore.invalidateConfigurazioneGenerale();
  3907.                         doSetDati = false;
  3908.                     }
  3909.                     // GestioneErrore
  3910.                     if (oggetto instanceof GestioneErrore) {
  3911.                         GestioneErrore gestErrore = (GestioneErrore) oggetto;
  3912.                         driver.getDriverConfigurazioneDB().createGestioneErroreComponenteCooperazione(gestErrore);
  3913.                         ControlStationCore.invalidateConfigurazioneGenerale();

  3914.                         doSetDati = false;
  3915.                     }
  3916.                     // Configurazione
  3917.                     if (oggetto instanceof Configurazione) {
  3918.                         Configurazione conf = (Configurazione) oggetto;
  3919.                         driver.getDriverConfigurazioneDB().createConfigurazione(conf);
  3920.                         ControlStationCore.invalidateConfigurazioneGenerale();

  3921.                         doSetDati = false;
  3922.                     }
  3923.                     // ConfigurazioneAccessoRegistro
  3924.                     if (oggetto instanceof AccessoRegistro) {
  3925.                         AccessoRegistro cfgAccessoRegistro = (AccessoRegistro) oggetto;
  3926.                         driver.getDriverConfigurazioneDB().createAccessoRegistro(cfgAccessoRegistro);
  3927.                         ControlStationCore.invalidateConfigurazioneGenerale();

  3928.                         doSetDati = false;
  3929.                     }
  3930.                     // ConfigurazioneAccessoRegistroRegistro
  3931.                     if (oggetto instanceof AccessoRegistroRegistro) {
  3932.                         AccessoRegistroRegistro carr = (AccessoRegistroRegistro) oggetto;
  3933.                         driver.getDriverConfigurazioneDB().createAccessoRegistro(carr);
  3934.                         ControlStationCore.invalidateConfigurazioneGenerale();

  3935.                         doSetDati = false;
  3936.                     }
  3937.                     // ConfigurazioneAccessoConfigurazione
  3938.                     if (oggetto instanceof AccessoConfigurazione) {
  3939.                         AccessoConfigurazione accesso = (AccessoConfigurazione) oggetto;
  3940.                         driver.getDriverConfigurazioneDB().createAccessoConfigurazione(accesso);
  3941.                         ControlStationCore.invalidateConfigurazioneGenerale();

  3942.                         doSetDati = false;
  3943.                     }
  3944.                     // ConfigurazioneAccessoDatiAutorizzazione
  3945.                     if (oggetto instanceof AccessoDatiAutorizzazione) {
  3946.                         AccessoDatiAutorizzazione accesso = (AccessoDatiAutorizzazione) oggetto;
  3947.                         driver.getDriverConfigurazioneDB().createAccessoDatiAutorizzazione(accesso);
  3948.                         ControlStationCore.invalidateConfigurazioneGenerale();

  3949.                         doSetDati = false;
  3950.                     }
  3951.                     // ConfigurazioneSystemProperty
  3952.                     if (oggetto instanceof SystemProperties) {
  3953.                         SystemProperties sps = (SystemProperties) oggetto;
  3954.                         driver.getDriverConfigurazioneDB().createSystemPropertiesPdD(sps);
  3955.                         ControlStationCore.invalidateConfigurazioneGenerale();

  3956.                         doSetDati = false;
  3957.                     }
  3958.                     // ConfigurazioneUrlInvocazioneRegola
  3959.                     if (oggetto instanceof ConfigurazioneUrlInvocazioneRegola) {
  3960.                         ConfigurazioneUrlInvocazioneRegola regola = (ConfigurazioneUrlInvocazioneRegola) oggetto;
  3961.                         driver.getDriverConfigurazioneDB().createUrlInvocazioneRegola(regola);
  3962.                         ControlStationCore.invalidateConfigurazioneGenerale();
  3963.    
  3964.                         doSetDati = false;
  3965.                     }

  3966.                     /***********************************************************
  3967.                      * Operazioni su Registro *
  3968.                      **********************************************************/
  3969.                     // PortaDominio
  3970.                     if (oggetto instanceof PortaDominio && !(oggetto instanceof PdDControlStation)) {
  3971.                         PortaDominio pdd = (PortaDominio) oggetto;
  3972.                         driver.getDriverRegistroServiziDB().createPortaDominio(pdd);

  3973.                         operazioneDaSmistare = new OperazioneDaSmistare();
  3974.                         operazioneDaSmistare.setOperazione(Operazione.add);
  3975.                         operazioneDaSmistare.setIDTable(pdd.getId());
  3976.                         operazioneDaSmistare.setSuperuser(superUser);
  3977.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pdd);
  3978.                         operazioneDaSmistare.addParameter(OperationsParameter.PORTA_DOMINIO, pdd.getNome());

  3979.                         doSetDati = true;
  3980.                     }
  3981.                    
  3982.                     // Gruppo
  3983.                     if (oggetto instanceof Gruppo) {
  3984.                         Gruppo gruppo = (Gruppo) oggetto;
  3985.                         driver.getDriverRegistroServiziDB().createGruppo(gruppo);

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

  3992.                         doSetDati = true;
  3993.                     }
  3994.                    
  3995.                     // Ruolo
  3996.                     if (oggetto instanceof Ruolo) {
  3997.                         Ruolo ruolo = (Ruolo) oggetto;
  3998.                         driver.getDriverRegistroServiziDB().createRuolo(ruolo);

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

  4005.                         doSetDati = true;
  4006.                     }
  4007.                    
  4008.                     // Scope
  4009.                     if (oggetto instanceof Scope) {
  4010.                         Scope scope = (Scope) oggetto;
  4011.                         driver.getDriverRegistroServiziDB().createScope(scope);

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

  4018.                         doSetDati = true;
  4019.                     }

  4020.                     // AccordoServizio
  4021.                     if (oggetto instanceof AccordoServizioParteComune) {
  4022.                         AccordoServizioParteComune as = (AccordoServizioParteComune) oggetto;
  4023.                         driver.getDriverRegistroServiziDB().createAccordoServizioParteComune(as);

  4024.                         // voglio 2 operazioni in coda, 1 viene aggiunta
  4025.                         // alla
  4026.                         // fine dello switch e
  4027.                         // l altra viene aggiunta subito

  4028.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4029.                         operazioneDaSmistare.setOperazione(Operazione.add);
  4030.                         operazioneDaSmistare.setIDTable(as.getId());
  4031.                         operazioneDaSmistare.setSuperuser(superUser);
  4032.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordo);
  4033.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, as.getNome());
  4034.                         if(as.getVersione()!=null){
  4035.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, as.getVersione().intValue()+"");
  4036.                         }
  4037.                         if(as.getSoggettoReferente()!=null){
  4038.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, as.getSoggettoReferente().getTipo());
  4039.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, as.getSoggettoReferente().getNome());
  4040.                         }
  4041.                         // inserisco in lista l'operazione
  4042.                         operazioneDaSmistareList.add(operazioneDaSmistare);

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

  4060.                         // preparo l'altra operazione da aggiungere
  4061.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4062.                         operazioneDaSmistare.setOperazione(Operazione.add);
  4063.                         operazioneDaSmistare.setIDTable(as.getId());
  4064.                         operazioneDaSmistare.setSuperuser(superUser);
  4065.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordoRuolo);
  4066.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, as.getNome() + "Correlato");
  4067.                         if(as.getVersione()!=null){
  4068.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, as.getVersione().intValue()+"");
  4069.                         }
  4070.                         if(as.getSoggettoReferente()!=null){
  4071.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, as.getSoggettoReferente().getTipo());
  4072.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, as.getSoggettoReferente().getNome());
  4073.                         }
  4074.                         doSetDati = true;

  4075.                     }

  4076.                     // AccordoCooperazione
  4077.                     if (oggetto instanceof AccordoCooperazione) {
  4078.                         AccordoCooperazione ac = (AccordoCooperazione) oggetto;
  4079.                         driver.getDriverRegistroServiziDB().createAccordoCooperazione(ac);

  4080.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4081.                         operazioneDaSmistare.setOperazione(Operazione.add);
  4082.                         operazioneDaSmistare.setIDTable(ac.getId());
  4083.                         operazioneDaSmistare.setSuperuser(superUser);
  4084.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordoCooperazione);
  4085.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, ac.getNome());
  4086.                         if(ac.getSoggettoReferente()!=null){
  4087.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, ac.getSoggettoReferente().getTipo());
  4088.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, ac.getSoggettoReferente().getNome());
  4089.                         }
  4090.                         if(ac.getVersione()!=null){
  4091.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, ac.getVersione().intValue()+"");
  4092.                         }

  4093.                         doSetDati = true;
  4094.                     }

  4095.                     // Servizio
  4096.                     // Servizio Correlato
  4097.                     if (oggetto instanceof AccordoServizioParteSpecifica) {
  4098.                         AccordoServizioParteSpecifica asps = (AccordoServizioParteSpecifica) oggetto;

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

  4100.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4101.                         operazioneDaSmistare.setOperazione(Operazione.add);
  4102.                         operazioneDaSmistare.setIDTable(asps.getId());
  4103.                         operazioneDaSmistare.setSuperuser(superUser);
  4104.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.servizio);
  4105.                        
  4106.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, asps.getTipoSoggettoErogatore());
  4107.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, asps.getNomeSoggettoErogatore());
  4108.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SERVIZIO, asps.getTipo());
  4109.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SERVIZIO, asps.getNome());
  4110.                         if(asps.getVersione()!=null){
  4111.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, asps.getVersione().intValue()+"");
  4112.                         }

  4113.                         doSetDati = true;
  4114.                     }

  4115.                     /***********************************************************
  4116.                      * Operazioni su Users *
  4117.                      **********************************************************/
  4118.                     // User
  4119.                     if (oggetto instanceof User) {
  4120.                         User user = (User) oggetto;
  4121.                         driver.getDriverUsersDB().createUser(user);
  4122.                         doSetDati = false;
  4123.                     }

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

  4213.                 case CostantiControlStation.PERFORM_OPERATION_UPDATE:
  4214.                     // Performing UPDATE operations

  4215.                     /**
  4216.                      * Operazioni su ctrlstat
  4217.                      */
  4218.                     if (oggetto instanceof PdDControlStation) {
  4219.                         PdDControlStation pdd = (PdDControlStation) oggetto;
  4220.                         driver.updatePdDControlStation(pdd);

  4221.                         // Una volta modificata la PdD avvio il thread di
  4222.                         // gestione (a meno che non sia esterna)
  4223.                         pddGestore = pdd;
  4224.                         pddGestoreTipoOperazione = operationType;
  4225.                                                
  4226.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4227.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4228.                         operazioneDaSmistare.setIDTable(pdd.getId());
  4229.                         operazioneDaSmistare.setSuperuser(superUser);
  4230.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pdd);
  4231.                         operazioneDaSmistare.addParameter(OperationsParameter.PORTA_DOMINIO, pdd.getNome());
  4232.                         doSetDati = true;
  4233.                     }

  4234.                    
  4235.                     /***********************************************************
  4236.                      * Caso Speciale di update di proprieta oggetto *
  4237.                      **********************************************************/
  4238.                     if (oggetto instanceof UpdateProprietaOggetto) {
  4239.                         UpdateProprietaOggetto update = (UpdateProprietaOggetto) oggetto;
  4240.                        
  4241.                         if(update.getIdPortaApplicativa()!=null) {
  4242.                             driver.getDriverConfigurazioneDB().updateProprietaOggetto(update.getIdPortaApplicativa(), superUser);
  4243.                         }
  4244.                         else if(update.getIdPortaDelegata()!=null) {
  4245.                             driver.getDriverConfigurazioneDB().updateProprietaOggetto(update.getIdPortaDelegata(), superUser);
  4246.                         }
  4247.                         else if(update.getIdServizioApplicativo()!=null) {
  4248.                             driver.getDriverConfigurazioneDB().updateProprietaOggetto(update.getIdServizioApplicativo(), superUser);
  4249.                         }
  4250.                     }
  4251.                    

  4252.                     /***********************************************************
  4253.                      * Caso Speciale dei Soggetti *
  4254.                      **********************************************************/
  4255.                     // soggetto ctrlstat
  4256.                     if (oggetto instanceof SoggettoCtrlStat) {
  4257.                         SoggettoCtrlStat soggetto = (SoggettoCtrlStat) oggetto;
  4258.                        
  4259.                         // prima chiamo il driver registro in quanto la
  4260.                         // modifica
  4261.                         // del soggetto riflette
  4262.                         // i cambiamenti sui connettori
  4263.                         if(this.registroServiziLocale){
  4264.                             driver.getDriverRegistroServiziDB().updateSoggetto(soggetto.getSoggettoReg());
  4265.                         }

  4266.                         Soggetto sogConf = soggetto.getSoggettoConf();
  4267.                         // imposto i valori old del soggetto configurazione
  4268.                         // con
  4269.                         // i nuovi valori
  4270.                         // in quanto sono stati gia' modificati dalla
  4271.                         // updateSoggetto (config) precedente
  4272.                         if(this.registroServiziLocale){
  4273.                             sogConf.setOldIDSoggettoForUpdate(new IDSoggetto(soggetto.getTipo(), soggetto.getNome()));
  4274.                         }
  4275.                         driver.getDriverConfigurazioneDB().updateSoggetto(sogConf);

  4276.                         // Chiedo la setDati
  4277.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4278.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4279.                         operazioneDaSmistare.setIDTable(soggetto.getId());
  4280.                         operazioneDaSmistare.setSuperuser(superUser);
  4281.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.soggetto);
  4282.                         if(this.registroServiziLocale){
  4283.                             operazioneDaSmistare.setPdd(soggetto.getSoggettoReg().getPortaDominio());
  4284.                         }

  4285.                         operazioneDaSmistare.addParameter(OperationsParameter.OLD_TIPO_SOGGETTO, soggetto.getOldTipoForUpdate());
  4286.                         operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_SOGGETTO, soggetto.getOldNomeForUpdate());
  4287.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, soggetto.getTipo());
  4288.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, soggetto.getNome());

  4289.                         doSetDati = true;
  4290.                     }
  4291.                    
  4292.                    
  4293.                     // soggetto config
  4294.                     if (oggetto instanceof org.openspcoop2.core.config.Soggetto) {
  4295.                        
  4296.                         org.openspcoop2.core.config.Soggetto sogConf = (org.openspcoop2.core.config.Soggetto) oggetto;
  4297.                         driver.getDriverConfigurazioneDB().updateSoggetto(sogConf);

  4298.                         // Chiedo la setDati
  4299.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4300.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4301.                         operazioneDaSmistare.setIDTable(sogConf.getId());
  4302.                         operazioneDaSmistare.setSuperuser(superUser);
  4303.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.soggetto);
  4304.                         if(sogConf.getOldIDSoggettoForUpdate()!=null){
  4305.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_TIPO_SOGGETTO, sogConf.getOldIDSoggettoForUpdate().getTipo());
  4306.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_SOGGETTO, sogConf.getOldIDSoggettoForUpdate().getNome());
  4307.                         }
  4308.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, sogConf.getTipo());
  4309.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, sogConf.getNome());

  4310.                         doSetDati = true;

  4311.                     }
  4312.                    
  4313.                     // soggetto reg
  4314.                     if (oggetto instanceof org.openspcoop2.core.registry.Soggetto) {
  4315.                        
  4316.                         org.openspcoop2.core.registry.Soggetto sogReg = (org.openspcoop2.core.registry.Soggetto) oggetto;

  4317.                         if(this.registroServiziLocale){
  4318.                             driver.getDriverRegistroServiziDB().updateSoggetto(sogReg);
  4319.                         }

  4320.                         // Chiedo la setDati
  4321.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4322.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4323.                         operazioneDaSmistare.setIDTable(sogReg.getId());
  4324.                         operazioneDaSmistare.setSuperuser(superUser);
  4325.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.soggetto);
  4326.                         if(sogReg.getOldIDSoggettoForUpdate()!=null){
  4327.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_TIPO_SOGGETTO, sogReg.getOldIDSoggettoForUpdate().getTipo());
  4328.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_SOGGETTO, sogReg.getOldIDSoggettoForUpdate().getNome());
  4329.                         }
  4330.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, sogReg.getTipo());
  4331.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, sogReg.getNome());

  4332.                         operazioneDaSmistare.setPdd(sogReg.getPortaDominio());
  4333.                        
  4334.                         doSetDati = true;

  4335.                     }
  4336.                    
  4337.                     /***********************************************************
  4338.                      * Operazioni su ConfigurazioneDB *
  4339.                      **********************************************************/
  4340.                    
  4341.                     // ServizioApplicativo
  4342.                     if (oggetto instanceof ServizioApplicativo) {
  4343.                         ServizioApplicativo sa = (ServizioApplicativo) oggetto;
  4344.                        
  4345.                         driver.getDriverConfigurazioneDB().updateServizioApplicativo(sa);
  4346.                         if (sa.getIdSoggetto() == null || sa.getIdSoggetto() < 0) {
  4347.                             sa.setIdSoggetto(DBUtils.getIdSoggetto(sa.getNomeSoggettoProprietario(), sa.getTipoSoggettoProprietario(), con, this.tipoDB, CostantiDB.SOGGETTI));
  4348.                         }

  4349.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4350.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4351.                         operazioneDaSmistare.setIDTable(sa.getId());
  4352.                         operazioneDaSmistare.setSuperuser(superUser);
  4353.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.servizioApplicativo);
  4354.                        
  4355.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SERVIZIO_APPLICATIVO, sa.getNome());
  4356.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, sa.getTipoSoggettoProprietario());
  4357.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, sa.getNomeSoggettoProprietario());
  4358.                        
  4359.                         if(sa.getOldIDServizioApplicativoForUpdate()!=null){
  4360.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_SERVIZIO_APPLICATIVO, sa.getOldIDServizioApplicativoForUpdate().getNome());
  4361.                             if(sa.getOldIDServizioApplicativoForUpdate().getIdSoggettoProprietario()!=null){
  4362.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_TIPO_SOGGETTO, sa.getOldIDServizioApplicativoForUpdate().getIdSoggettoProprietario().getTipo());
  4363.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_SOGGETTO, sa.getOldIDServizioApplicativoForUpdate().getIdSoggettoProprietario().getNome());
  4364.                             }
  4365.                         }

  4366.                         if(this.isRegistroServiziLocale()){
  4367.                             org.openspcoop2.core.registry.Soggetto sogg = driver.getDriverRegistroServiziDB().getSoggetto(sa.getIdSoggetto());
  4368.                             operazioneDaSmistare.setPdd(sogg.getPortaDominio());
  4369.                         }

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

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

  4509.                     /***********************************************************
  4510.                      * Operazioni su Registro *
  4511.                      **********************************************************/
  4512.                     // PortaDominio
  4513.                     if (oggetto instanceof PortaDominio && !(oggetto instanceof PdDControlStation)) {
  4514.                         PortaDominio pdd = (PortaDominio) oggetto;
  4515.                         driver.getDriverRegistroServiziDB().updatePortaDominio(pdd);

  4516.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4517.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4518.                         operazioneDaSmistare.setIDTable(pdd.getId());
  4519.                         operazioneDaSmistare.setSuperuser(superUser);
  4520.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pdd);
  4521.                         operazioneDaSmistare.addParameter(OperationsParameter.PORTA_DOMINIO, pdd.getNome());

  4522.                         doSetDati = true;
  4523.                     }
  4524.                    
  4525.                     // Gruppo
  4526.                     if (oggetto instanceof Gruppo) {
  4527.                         Gruppo gruppo = (Gruppo) oggetto;
  4528.                         driver.getDriverRegistroServiziDB().updateGruppo(gruppo);
  4529.                         // Chiedo la setDati
  4530.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4531.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4532.                         operazioneDaSmistare.setIDTable(gruppo.getId());
  4533.                         operazioneDaSmistare.setSuperuser(superUser);
  4534.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.gruppo);
  4535.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_GRUPPO, gruppo.getNome());
  4536.                         IDGruppo idGruppoOLD = gruppo.getOldIDGruppoForUpdate();
  4537.                         if(idGruppoOLD!=null){
  4538.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_GRUPPO, idGruppoOLD.getNome());
  4539.                         }
  4540.                         doSetDati = true;
  4541.                     }

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

  4612.                     // AccordoCooperazione
  4613.                     if (oggetto instanceof AccordoCooperazione) {
  4614.                         AccordoCooperazione ac = (AccordoCooperazione) oggetto;
  4615.                         driver.getDriverRegistroServiziDB().updateAccordoCooperazione(ac);

  4616.                         // Chiedo la setDati
  4617.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4618.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4619.                         operazioneDaSmistare.setIDTable(ac.getId());
  4620.                         operazioneDaSmistare.setSuperuser(superUser);
  4621.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordoCooperazione);
  4622.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, ac.getNome());
  4623.                         if(ac.getVersione()!=null){
  4624.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, ac.getVersione().intValue()+"");
  4625.                         }
  4626.                         if(ac.getSoggettoReferente()!=null){
  4627.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, ac.getSoggettoReferente().getTipo());
  4628.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, ac.getSoggettoReferente().getNome());
  4629.                         }

  4630.                         IDAccordoCooperazione idAccordoOLD = ac.getOldIDAccordoForUpdate();
  4631.                         if(idAccordoOLD!=null){
  4632.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_ACCORDO, idAccordoOLD.getNome());
  4633.                             if(idAccordoOLD.getVersione()!=null){
  4634.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_VERSIONE_ACCORDO, idAccordoOLD.getVersione().intValue()+"");
  4635.                             }
  4636.                             if(idAccordoOLD.getSoggettoReferente()!=null){
  4637.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_TIPO_REFERENTE, idAccordoOLD.getSoggettoReferente().getTipo());
  4638.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_REFERENTE, idAccordoOLD.getSoggettoReferente().getNome());
  4639.                             }else{
  4640.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_TIPO_REFERENTE, null);
  4641.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_REFERENTE, null);
  4642.                             }
  4643.                         }

  4644.                         doSetDati = true;
  4645.                     }

  4646.                     // Servizio
  4647.                     // Servizio Correlato
  4648.                     if (oggetto instanceof AccordoServizioParteSpecifica) {
  4649.                         AccordoServizioParteSpecifica asps = (AccordoServizioParteSpecifica) oggetto;

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

  4651.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4652.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4653.                         operazioneDaSmistare.setIDTable(asps.getId());
  4654.                         operazioneDaSmistare.setSuperuser(superUser);
  4655.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.servizio);
  4656.                        
  4657.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, asps.getTipoSoggettoErogatore());
  4658.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, asps.getNomeSoggettoErogatore());
  4659.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SERVIZIO, asps.getTipo());
  4660.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SERVIZIO, asps.getNome());
  4661.                         if(asps.getVersione()!=null){
  4662.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, asps.getVersione().intValue()+"");
  4663.                         }
  4664.                        
  4665.                         if(asps.getOldIDServizioForUpdate()!=null){
  4666.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_TIPO_SERVIZIO, asps.getOldIDServizioForUpdate().getTipo());
  4667.                             operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_SERVIZIO, asps.getOldIDServizioForUpdate().getNome());
  4668.                             if(asps.getOldIDServizioForUpdate().getSoggettoErogatore()!=null){
  4669.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_TIPO_SOGGETTO, asps.getOldIDServizioForUpdate().getSoggettoErogatore().getTipo());
  4670.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_NOME_SOGGETTO, asps.getOldIDServizioForUpdate().getSoggettoErogatore().getNome());
  4671.                             }
  4672.                             if(asps.getOldIDServizioForUpdate().getVersione()!=null){
  4673.                                 operazioneDaSmistare.addParameter(OperationsParameter.OLD_VERSIONE_ACCORDO, asps.getOldIDServizioForUpdate().getVersione().intValue()+"");
  4674.                             }
  4675.                         }

  4676.                         doSetDati = true;

  4677.                     }

  4678.                     // PortType
  4679.                     if (oggetto instanceof PortType) {
  4680.                         PortType pt = (PortType) oggetto;
  4681.                         driver.getDriverRegistroServiziDB().updatePortType(pt, superUser);

  4682.                         // Chiedo la setDati per l'accordo servizio
  4683.                         long idAcc = pt.getIdAccordo();
  4684.                         AccordoServizioParteComune as = driver.getDriverRegistroServiziDB().getAccordoServizioParteComune(idAcc);
  4685.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4686.                         operazioneDaSmistare.setOperazione(Operazione.change);
  4687.                         operazioneDaSmistare.setIDTable(pt.getIdAccordo().intValue());
  4688.                         operazioneDaSmistare.setSuperuser(superUser);
  4689.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordo);
  4690.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, as.getNome());
  4691.                         if(as.getVersione()!=null){
  4692.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, as.getVersione().intValue()+"");
  4693.                         }
  4694.                         if(as.getSoggettoReferente()!=null){
  4695.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, as.getSoggettoReferente().getTipo());
  4696.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, as.getSoggettoReferente().getNome());
  4697.                         }

  4698.                         doSetDati = true;
  4699.                     }

  4700.                     /***********************************************************
  4701.                      * Operazioni su Users *
  4702.                      **********************************************************/
  4703.                     // User
  4704.                     if (oggetto instanceof User) {
  4705.                         User user = (User) oggetto;
  4706.                         driver.getDriverUsersDB().updateUser(user);
  4707.                         doSetDati = false;
  4708.                     }

  4709.                     /***********************************************************
  4710.                      * Operazioni su Audit *
  4711.                      **********************************************************/
  4712.                     // Configurazione
  4713.                     if (oggetto instanceof org.openspcoop2.web.lib.audit.dao.Configurazione) {
  4714.                         org.openspcoop2.web.lib.audit.dao.Configurazione confAudit =
  4715.                                 (org.openspcoop2.web.lib.audit.dao.Configurazione) oggetto;
  4716.                         driver.getDriverAuditDB().updateConfigurazione(confAudit);
  4717.                         doSetDati = false;
  4718.                     }

  4719.                     // Filtro
  4720.                     if (oggetto instanceof Filtro) {
  4721.                         Filtro filtro = (Filtro) oggetto;
  4722.                         driver.getDriverAuditDB().updateFiltro(filtro);
  4723.                         doSetDati = false;
  4724.                     }
  4725.                    
  4726.                     /***********************************************************
  4727.                      * Operazioni su Controllo Traffico *
  4728.                      **********************************************************/

  4729.                     // Configurazione Controllo Traffico
  4730.                     if(oggetto instanceof ConfigurazioneGenerale) {
  4731.                         ConfigurazioneGenerale configurazioneControlloTraffico = (ConfigurazioneGenerale) oggetto;
  4732.                         driver.updateConfigurazioneControlloTraffico(configurazioneControlloTraffico);
  4733.                         doSetDati = false;
  4734.                     }

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

  4810.                 case CostantiControlStation.PERFORM_OPERATION_DELETE:
  4811.                     // Performing DELETE operations

  4812.                     /**
  4813.                      * Operazioni su ctrlstat
  4814.                      */
  4815.                     if (oggetto instanceof PdDControlStation) {
  4816.                         PdDControlStation pdd = (PdDControlStation) oggetto;
  4817.                         driver.deletePdDControlStation(pdd);

  4818.                         // Una volta modificata la PdD avvio il thread di
  4819.                         // gestione (a meno che non sia esterna)
  4820.                         pddGestore = pdd;
  4821.                         pddGestoreTipoOperazione = operationType;
  4822.                        
  4823.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4824.                         operazioneDaSmistare.setOperazione(Operazione.del);
  4825.                         operazioneDaSmistare.setIDTable(pdd.getId());
  4826.                         operazioneDaSmistare.setSuperuser(superUser);
  4827.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pdd);
  4828.                         operazioneDaSmistare.addParameter(OperationsParameter.PORTA_DOMINIO, pdd.getNome());

  4829.                         doSetDati = true;
  4830.                     }

  4831.                     if (oggetto instanceof MappingFruizionePortaDelegata) {
  4832.                         MappingFruizionePortaDelegata mapping = (MappingFruizionePortaDelegata) oggetto;
  4833.                         driver.deleteMappingFruizionePortaDelegata(mapping);
  4834.                        
  4835.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4836.                         operazioneDaSmistare.setOperazione(Operazione.del);
  4837.                         operazioneDaSmistare.addParameter(OperationsParameter.MAPPING_ID_FRUITORE, "" + driver.getTableIdSoggetto(mapping.getIdFruitore()));
  4838.                         operazioneDaSmistare.addParameter(OperationsParameter.MAPPING_ID_SERVIZIO, "" + driver.getTableIdAccordoServizioParteSpecifica(mapping.getIdServizio()));
  4839.                         operazioneDaSmistare.addParameter(OperationsParameter.MAPPING_ID_PORTA_DELEGATA, "" + driver.getTableIdPortaDelegata(mapping.getIdPortaDelegata()));
  4840.                         operazioneDaSmistare.setSuperuser(superUser);
  4841.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.mappingFruizionePD);

  4842.                         if(mapping.getIdServizio()!=null && mapping.getIdFruitore()!=null) {
  4843.                             driver.updateProprietaOggettoFruizione(mapping.getIdServizio(), mapping.getIdFruitore() ,superUser ,false);
  4844.                         }
  4845.                        
  4846.                         doSetDati = false;

  4847.                     }
  4848.                    
  4849.                     if (oggetto instanceof MappingErogazionePortaApplicativa) {
  4850.                         MappingErogazionePortaApplicativa mapping = (MappingErogazionePortaApplicativa) oggetto;
  4851.                         driver.deleteMappingErogazionePortaApplicativa(mapping);
  4852.                        
  4853.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4854.                         operazioneDaSmistare.setOperazione(Operazione.del);
  4855.                         operazioneDaSmistare.addParameter(OperationsParameter.MAPPING_ID_SERVIZIO, "" + driver.getTableIdAccordoServizioParteSpecifica(mapping.getIdServizio()));
  4856.                         operazioneDaSmistare.addParameter(OperationsParameter.MAPPING_ID_PORTA_APPLICATIVA, "" + driver.getTableIdPortaApplicativa(mapping.getIdPortaApplicativa()));
  4857.                         operazioneDaSmistare.setSuperuser(superUser);
  4858.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.mappingErogazionePA);

  4859.                         if(mapping.getIdServizio()!=null) {
  4860.                             driver.updateProprietaOggettoErogazione(mapping.getIdServizio() ,superUser ,false);
  4861.                         }
  4862.                        
  4863.                         doSetDati = false;

  4864.                     }
  4865.                    
  4866.                    
  4867.                     /***********************************************************
  4868.                      * Caso Speciale dei Soggetti *
  4869.                      **********************************************************/
  4870.            
  4871.                     // soggetto ctrlstat
  4872.                     if (oggetto instanceof SoggettoCtrlStat) {
  4873.                         SoggettoCtrlStat soggetto = (SoggettoCtrlStat) oggetto;

  4874.                         // la delete basta farla solo una volta
  4875.                         if(this.registroServiziLocale){
  4876.                             driver.getDriverRegistroServiziDB().deleteSoggetto(soggetto.getSoggettoReg());
  4877.                         }
  4878.                         else{
  4879.                             driver.getDriverConfigurazioneDB().deleteSoggetto(soggetto.getSoggettoConf());
  4880.                         }

  4881.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4882.                         operazioneDaSmistare.setOperazione(Operazione.del);
  4883.                         operazioneDaSmistare.setIDTable(soggetto.getId());
  4884.                         operazioneDaSmistare.setSuperuser(superUser);
  4885.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.soggetto);
  4886.                         if(soggetto.getSoggettoReg()!=null){
  4887.                             operazioneDaSmistare.setPdd(soggetto.getSoggettoReg().getPortaDominio());
  4888.                         }

  4889.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, soggetto.getTipo());
  4890.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, soggetto.getNome());

  4891.                         doSetDati = true;
  4892.                     }
  4893.                    
  4894.                     // soggetto config
  4895.                     if (oggetto instanceof org.openspcoop2.core.config.Soggetto) {
  4896.                        
  4897.                         org.openspcoop2.core.config.Soggetto sogConf = (org.openspcoop2.core.config.Soggetto) oggetto;
  4898.                         driver.getDriverConfigurazioneDB().deleteSoggetto(sogConf);

  4899.                         // Chiedo la setDati
  4900.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4901.                         operazioneDaSmistare.setOperazione(Operazione.del);
  4902.                         operazioneDaSmistare.setIDTable(sogConf.getId());
  4903.                         operazioneDaSmistare.setSuperuser(superUser);
  4904.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.soggetto);
  4905.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, sogConf.getTipo());
  4906.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, sogConf.getNome());

  4907.                         doSetDati = true;

  4908.                     }
  4909.                    
  4910.                     // soggetto reg
  4911.                     if (oggetto instanceof org.openspcoop2.core.registry.Soggetto) {
  4912.                        
  4913.                         org.openspcoop2.core.registry.Soggetto sogReg = (org.openspcoop2.core.registry.Soggetto) oggetto;

  4914.                         if(this.registroServiziLocale){
  4915.                             driver.getDriverRegistroServiziDB().deleteSoggetto(sogReg);
  4916.                         }

  4917.                         // Chiedo la setDati
  4918.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4919.                         operazioneDaSmistare.setOperazione(Operazione.del);
  4920.                         operazioneDaSmistare.setIDTable(sogReg.getId());
  4921.                         operazioneDaSmistare.setSuperuser(superUser);
  4922.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.soggetto);
  4923.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, sogReg.getTipo());
  4924.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, sogReg.getNome());

  4925.                         operazioneDaSmistare.setPdd(sogReg.getPortaDominio());
  4926.                        
  4927.                         doSetDati = true;

  4928.                     }
  4929.                    
  4930.                    
  4931.                    
  4932.                     /***********************************************************
  4933.                      * Operazioni su ConfigurazioneDB *
  4934.                      **********************************************************/

  4935.                     // ServizioApplicativo
  4936.                     if (oggetto instanceof ServizioApplicativo) {
  4937.                         ServizioApplicativo sa = (ServizioApplicativo) oggetto;
  4938.                         driver.getDriverConfigurazioneDB().deleteServizioApplicativo(sa);

  4939.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4940.                         operazioneDaSmistare.setOperazione(Operazione.del);
  4941.                         operazioneDaSmistare.setIDTable(sa.getId());
  4942.                         operazioneDaSmistare.setSuperuser(superUser);
  4943.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.servizioApplicativo);
  4944.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SERVIZIO_APPLICATIVO, sa.getNome());
  4945.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, sa.getNomeSoggettoProprietario());
  4946.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, sa.getTipoSoggettoProprietario());
  4947.                         if(this.isRegistroServiziLocale()){
  4948.                             org.openspcoop2.core.registry.Soggetto sogg = null;
  4949.                             if(sa.getIdSoggetto()!=null && sa.getIdSoggetto()>0){
  4950.                                 sogg = driver.getDriverRegistroServiziDB().getSoggetto(sa.getIdSoggetto());
  4951.                             }
  4952.                             else{
  4953.                                 sogg = driver.getDriverRegistroServiziDB().getSoggetto(new IDSoggetto(sa.getTipoSoggettoProprietario(), sa.getNomeSoggettoProprietario()));
  4954.                             }  
  4955.                             operazioneDaSmistare.setPdd(sogg.getPortaDominio());
  4956.                         }

  4957.                         doSetDati = true;
  4958.                     }
  4959.                     // PortaDelegata
  4960.                     if (oggetto instanceof PortaDelegata) {
  4961.                         PortaDelegata pd = (PortaDelegata) oggetto;
  4962.                         driver.getDriverConfigurazioneDB().deletePortaDelegata(pd);
  4963.                         // Chiedo la setDati
  4964.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4965.                         operazioneDaSmistare.setOperazione(Operazione.del);
  4966.                         operazioneDaSmistare.setIDTable(pd.getId());
  4967.                         operazioneDaSmistare.setSuperuser(superUser);
  4968.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pd);
  4969.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_PD, pd.getNome());
  4970.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, pd.getNomeSoggettoProprietario());
  4971.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, pd.getTipoSoggettoProprietario());
  4972.                         if(this.isRegistroServiziLocale()){
  4973.                             org.openspcoop2.core.registry.Soggetto sogg = soggettiCore.getSoggettoRegistro(new IDSoggetto(pd.getTipoSoggettoProprietario(), pd.getNomeSoggettoProprietario()));
  4974.                             String server = sogg.getPortaDominio();
  4975.                             operazioneDaSmistare.setPdd(server);
  4976.                         }
  4977.                         doSetDati = true;
  4978.                     }
  4979.                     // PortaApplivativa
  4980.                     if (oggetto instanceof PortaApplicativa) {
  4981.                         PortaApplicativa pa = (PortaApplicativa) oggetto;
  4982.                         driver.getDriverConfigurazioneDB().deletePortaApplicativa(pa);
  4983.                         operazioneDaSmistare = new OperazioneDaSmistare();
  4984.                         operazioneDaSmistare.setOperazione(Operazione.del);
  4985.                         operazioneDaSmistare.setIDTable(pa.getId());
  4986.                         operazioneDaSmistare.setSuperuser(superUser);
  4987.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pa);
  4988.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_PA, pa.getNome());
  4989.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, pa.getNomeSoggettoProprietario());
  4990.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, pa.getTipoSoggettoProprietario());
  4991.                         if(this.isRegistroServiziLocale()){
  4992.                             org.openspcoop2.core.registry.Soggetto sogg = soggettiCore.getSoggettoRegistro(new IDSoggetto(pa.getTipoSoggettoProprietario(), pa.getNomeSoggettoProprietario()));
  4993.                             String server = sogg.getPortaDominio();
  4994.                             operazioneDaSmistare.setPdd(server);
  4995.                         }

  4996.                         doSetDati = true;
  4997.                     }
  4998.                     // RoutingTable
  4999.                     if (oggetto instanceof RoutingTable) {
  5000.                         RoutingTable rt = (RoutingTable) oggetto;
  5001.                         driver.getDriverConfigurazioneDB().deleteRoutingTable(rt);
  5002.                         ControlStationCore.invalidateConfigurazioneGenerale();
  5003.                         doSetDati = false;
  5004.                     }
  5005.                     // GestioneErrore
  5006.                     if (oggetto instanceof GestioneErrore) {
  5007.                         GestioneErrore gestErrore = (GestioneErrore) oggetto;
  5008.                         driver.getDriverConfigurazioneDB().deleteGestioneErroreComponenteCooperazione(gestErrore);
  5009.                         ControlStationCore.invalidateConfigurazioneGenerale();
  5010.                         doSetDati = false;
  5011.                     }
  5012.                     // Configurazione
  5013.                     if (oggetto instanceof Configurazione) {
  5014.                         Configurazione conf = (Configurazione) oggetto;
  5015.                         driver.getDriverConfigurazioneDB().deleteConfigurazione(conf);
  5016.                         ControlStationCore.invalidateConfigurazioneGenerale();
  5017.                         doSetDati = false;
  5018.                     }
  5019.                     // ConfigurazioneAccessoRegistro
  5020.                     if (oggetto instanceof AccessoRegistro) {
  5021.                         AccessoRegistro cfgAccessoRegistro = (AccessoRegistro) oggetto;
  5022.                         driver.getDriverConfigurazioneDB().deleteAccessoRegistro(cfgAccessoRegistro);
  5023.                         ControlStationCore.invalidateConfigurazioneGenerale();
  5024.                         doSetDati = false;
  5025.                     }
  5026.                     // ConfigurazioneAccessoRegistroRegistro
  5027.                     if (oggetto instanceof AccessoRegistroRegistro) {
  5028.                         AccessoRegistroRegistro carr = (AccessoRegistroRegistro) oggetto;
  5029.                         driver.getDriverConfigurazioneDB().deleteAccessoRegistro(carr);
  5030.                         ControlStationCore.invalidateConfigurazioneGenerale();
  5031.                         doSetDati = false;
  5032.                     }
  5033.                     // ConfigurazioneAccessoConfigurazione
  5034.                     if (oggetto instanceof AccessoConfigurazione) {
  5035.                         AccessoConfigurazione accesso = (AccessoConfigurazione) oggetto;
  5036.                         driver.getDriverConfigurazioneDB().deleteAccessoConfigurazione(accesso);
  5037.                         ControlStationCore.invalidateConfigurazioneGenerale();
  5038.                         doSetDati = false;
  5039.                     }
  5040.                     // ConfigurazioneAccessoDatiAutorizzazione
  5041.                     if (oggetto instanceof AccessoDatiAutorizzazione) {
  5042.                         AccessoDatiAutorizzazione accesso = (AccessoDatiAutorizzazione) oggetto;
  5043.                         driver.getDriverConfigurazioneDB().deleteAccessoDatiAutorizzazione(accesso);
  5044.                         ControlStationCore.invalidateConfigurazioneGenerale();
  5045.                         doSetDati = false;
  5046.                     }
  5047.                     // SystemProperties
  5048.                     if (oggetto instanceof SystemProperties) {
  5049.                         SystemProperties sps = (SystemProperties) oggetto;
  5050.                         driver.getDriverConfigurazioneDB().deleteSystemPropertiesPdD(sps);
  5051.                         ControlStationCore.invalidateConfigurazioneGenerale();
  5052.                         doSetDati = false;
  5053.                     }
  5054.                     // ConfigurazioneUrlInvocazioneRegola
  5055.                     if (oggetto instanceof ConfigurazioneUrlInvocazioneRegola) {
  5056.                         ConfigurazioneUrlInvocazioneRegola regola = (ConfigurazioneUrlInvocazioneRegola) oggetto;
  5057.                         driver.getDriverConfigurazioneDB().deleteUrlInvocazioneRegola(regola);
  5058.                         ControlStationCore.invalidateConfigurazioneGenerale();
  5059.                         doSetDati = false;
  5060.                     }

  5061.                     /***********************************************************
  5062.                      * Operazioni su Registro *
  5063.                      **********************************************************/
  5064.                     // PortaDominio
  5065.                     if (oggetto instanceof PortaDominio && !(oggetto instanceof PdDControlStation)) {
  5066.                         PortaDominio pdd = (PortaDominio) oggetto;
  5067.                         driver.getDriverRegistroServiziDB().deletePortaDominio(pdd);

  5068.                         operazioneDaSmistare = new OperazioneDaSmistare();
  5069.                         operazioneDaSmistare.setOperazione(Operazione.del);
  5070.                         operazioneDaSmistare.setIDTable(pdd.getId());
  5071.                         operazioneDaSmistare.setSuperuser(superUser);
  5072.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.pdd);
  5073.                         operazioneDaSmistare.addParameter(OperationsParameter.PORTA_DOMINIO, pdd.getNome());

  5074.                         doSetDati = true;
  5075.                     }
  5076.                    
  5077.                     // Ruolo
  5078.                     if (oggetto instanceof Gruppo) {
  5079.                         Gruppo gruppo = (Gruppo) oggetto;
  5080.                         driver.getDriverRegistroServiziDB().deleteGruppo(gruppo);
  5081.                         operazioneDaSmistare = new OperazioneDaSmistare();
  5082.                         operazioneDaSmistare.setOperazione(Operazione.del);
  5083.                         operazioneDaSmistare.setIDTable(gruppo.getId());
  5084.                         operazioneDaSmistare.setSuperuser(superUser);
  5085.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.gruppo);
  5086.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_GRUPPO, gruppo.getNome());
  5087.                         operazioneDaSmistareList.add(operazioneDaSmistare);
  5088.                     }

  5089.                     // Ruolo
  5090.                     if (oggetto instanceof Ruolo) {
  5091.                         Ruolo ruolo = (Ruolo) oggetto;
  5092.                         driver.getDriverRegistroServiziDB().deleteRuolo(ruolo);
  5093.                         operazioneDaSmistare = new OperazioneDaSmistare();
  5094.                         operazioneDaSmistare.setOperazione(Operazione.del);
  5095.                         operazioneDaSmistare.setIDTable(ruolo.getId());
  5096.                         operazioneDaSmistare.setSuperuser(superUser);
  5097.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.ruolo);
  5098.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_RUOLO, ruolo.getNome());
  5099.                         operazioneDaSmistareList.add(operazioneDaSmistare);
  5100.                     }
  5101.                    
  5102.                     // Scope
  5103.                     if (oggetto instanceof Scope) {
  5104.                         Scope scope = (Scope) oggetto;
  5105.                         driver.getDriverRegistroServiziDB().deleteScope(scope);
  5106.                         operazioneDaSmistare = new OperazioneDaSmistare();
  5107.                         operazioneDaSmistare.setOperazione(Operazione.del);
  5108.                         operazioneDaSmistare.setIDTable(scope.getId());
  5109.                         operazioneDaSmistare.setSuperuser(superUser);
  5110.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.scope);
  5111.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SCOPE, scope.getNome());
  5112.                         operazioneDaSmistareList.add(operazioneDaSmistare);
  5113.                     }
  5114.                    
  5115.                     // AccordoServizio
  5116.                     if (oggetto instanceof AccordoServizioParteComune) {
  5117.                         AccordoServizioParteComune as = (AccordoServizioParteComune) oggetto;
  5118.                         driver.getDriverRegistroServiziDB().deleteAccordoServizioParteComune(as);
  5119.                         operazioneDaSmistare = new OperazioneDaSmistare();
  5120.                         operazioneDaSmistare.setOperazione(Operazione.del);
  5121.                         operazioneDaSmistare.setIDTable(as.getId());
  5122.                         operazioneDaSmistare.setSuperuser(superUser);
  5123.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordo);
  5124.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, as.getNome());
  5125.                         if(as.getVersione()!=null){
  5126.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, as.getVersione().intValue()+"");
  5127.                         }
  5128.                         if(as.getSoggettoReferente()!=null){
  5129.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, as.getSoggettoReferente().getTipo());
  5130.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, as.getSoggettoReferente().getNome());
  5131.                         }
  5132.                         operazioneDaSmistareList.add(operazioneDaSmistare);

  5133.                         // OPERAZIONI PER RepositoryAutorizzazioni
  5134.                         // preparo operazione da smistare
  5135.                         operazioneDaSmistare = new OperazioneDaSmistare();
  5136.                         operazioneDaSmistare.setOperazione(Operazione.del);
  5137.                         operazioneDaSmistare.setIDTable(as.getId());
  5138.                         operazioneDaSmistare.setSuperuser(superUser);
  5139.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordoRuolo);
  5140.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, as.getNome());
  5141.                         if(as.getVersione()!=null){
  5142.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, as.getVersione().intValue()+"");
  5143.                         }
  5144.                         if(as.getSoggettoReferente()!=null){
  5145.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, as.getSoggettoReferente().getTipo());
  5146.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, as.getSoggettoReferente().getNome());
  5147.                         }
  5148.                         // inserisco in lista l'operazione
  5149.                         operazioneDaSmistareList.add(operazioneDaSmistare);

  5150.                         // preparo l'altra operazione da aggiungere
  5151.                         operazioneDaSmistare = new OperazioneDaSmistare();
  5152.                         operazioneDaSmistare.setOperazione(Operazione.del);
  5153.                         operazioneDaSmistare.setIDTable(as.getId());
  5154.                         operazioneDaSmistare.setSuperuser(superUser);
  5155.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordoRuolo);
  5156.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, as.getNome() + "Correlato");
  5157.                         if(as.getVersione()!=null){
  5158.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, as.getVersione().intValue()+"");
  5159.                         }
  5160.                         if(as.getSoggettoReferente()!=null){
  5161.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, as.getSoggettoReferente().getTipo());
  5162.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, as.getSoggettoReferente().getNome());
  5163.                         }

  5164.                         doSetDati = true;
  5165.                     }

  5166.                     // AccordoCooperazione
  5167.                     if (oggetto instanceof AccordoCooperazione) {
  5168.                         AccordoCooperazione ac = (AccordoCooperazione) oggetto;
  5169.                         driver.getDriverRegistroServiziDB().deleteAccordoCooperazione(ac);

  5170.                         operazioneDaSmistare = new OperazioneDaSmistare();
  5171.                         operazioneDaSmistare.setOperazione(Operazione.del);
  5172.                         operazioneDaSmistare.setIDTable(ac.getId());
  5173.                         operazioneDaSmistare.setSuperuser(superUser);
  5174.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.accordoCooperazione);
  5175.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_ACCORDO, ac.getNome());
  5176.                         if(ac.getVersione()!=null){
  5177.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, ac.getVersione().intValue()+"");
  5178.                         }
  5179.                         if(ac.getSoggettoReferente()!=null){
  5180.                             operazioneDaSmistare.addParameter(OperationsParameter.TIPO_REFERENTE, ac.getSoggettoReferente().getTipo());
  5181.                             operazioneDaSmistare.addParameter(OperationsParameter.NOME_REFERENTE, ac.getSoggettoReferente().getNome());
  5182.                         }

  5183.                         doSetDati = true;
  5184.                     }

  5185.                     // Servizio
  5186.                     // Servizio Correlato
  5187.                     if (oggetto instanceof AccordoServizioParteSpecifica) {
  5188.                         AccordoServizioParteSpecifica asps = (AccordoServizioParteSpecifica) oggetto;
  5189.                        
  5190.                         driver.getDriverRegistroServiziDB().deleteAccordoServizioParteSpecifica(asps);

  5191.                         operazioneDaSmistare = new OperazioneDaSmistare();
  5192.                         operazioneDaSmistare.setOperazione(Operazione.del);
  5193.                         operazioneDaSmistare.setIDTable(asps.getId());
  5194.                         operazioneDaSmistare.setSuperuser(superUser);
  5195.                         operazioneDaSmistare.setOggetto(TipoOggettoDaSmistare.servizio);
  5196.                        
  5197.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SOGGETTO, asps.getTipoSoggettoErogatore());
  5198.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SOGGETTO, asps.getNomeSoggettoErogatore());
  5199.                         operazioneDaSmistare.addParameter(OperationsParameter.TIPO_SERVIZIO, asps.getTipo());
  5200.                         operazioneDaSmistare.addParameter(OperationsParameter.NOME_SERVIZIO, asps.getNome());
  5201.                         if(asps.getVersione()!=null){
  5202.                             operazioneDaSmistare.addParameter(OperationsParameter.VERSIONE_ACCORDO, asps.getVersione().intValue()+"");
  5203.                         }

  5204.                         doSetDati = true;

  5205.                     }

  5206.                     /***********************************************************
  5207.                      * Operazioni su Users *
  5208.                      **********************************************************/
  5209.                     // User
  5210.                     if (oggetto instanceof User) {
  5211.                         User user = (User) oggetto;
  5212.                         driver.getDriverUsersDB().deleteUser(user);
  5213.                         doSetDati = false;
  5214.                     }

  5215.                     /***********************************************************
  5216.                      * Operazioni su Audit *
  5217.                      **********************************************************/
  5218.                     // Filtro
  5219.                     if (oggetto instanceof Filtro) {
  5220.                         Filtro filtro = (Filtro) oggetto;
  5221.                         driver.getDriverAuditDB().deleteFiltro(filtro);
  5222.                         doSetDati = false;
  5223.                     }

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

  5343.                 default:
  5344.                     // Unkown operation type
  5345.                     throw new ControlStationCoreException("[ControlStationCore::performOperation] Unkown operation type :" + operationType);

  5346.                 }// fine switch

  5347.                 // inserisco l'operazione nella lista
  5348.                 if (doSetDati) {
  5349.                     operazioneDaSmistareList.add(operazioneDaSmistare);
  5350.                 }

  5351.             }// chiudo for

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

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

  5359.                         // il rollback viene gestito da dal blocco di catch
  5360.                         throw new ControlStationCoreException("[ControlStationCore::performOperation]Operazione da smistare non valida.");
  5361.                     } else {
  5362.                         ControlStationJMSCore.setDati(operazione, this.smistatoreQueue, this.cfName, this.cfProp);
  5363.                     }
  5364.                 }

  5365.             }

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

  5411.         } catch (Exception e) {
  5412.             ControlStationCore.logError(e.getMessage(),e);

  5413.             try {
  5414.                 ControlStationCore.logDebug("[ControlStationCore::performOperation] rollback on error :" + e.getMessage(), e);
  5415.                 if(con!=null)
  5416.                     con.rollback();
  5417.             } catch (Exception ex) {
  5418.                 // ignore
  5419.             }

  5420.             throw new ControlStationCoreException(e.getMessage(),e);
  5421.         } finally {
  5422.             // qui posso riabilitare l'auto commit
  5423.             // e rilasciare la connessione
  5424.             try {
  5425.                 if(con!=null) {
  5426.                     con.setAutoCommit(true);
  5427.                     ControlStationCore.dbM.releaseConnection(con);
  5428.                 }
  5429.             } catch (Exception e) {
  5430.                 // ignore
  5431.             }
  5432.         }

  5433.     }

  5434.     public void performOperationMultiTypes(String superUser, boolean smista,int[] operationTypes,Object ... oggetti) throws DriverConfigurazioneNotFound, DriverConfigurazioneException, DriverRegistroServiziNotFound, DriverControlStationException, DriverRegistroServiziException, ControlStationCoreException, UtilsException {
  5435.         String nomeMetodo = "performOperationIbrido";
  5436.         ControlStationCore.logInfo(getPrefixMethod(nomeMetodo)+"performing operation on objects " + this.getClassNames(oggetti));
  5437.         Tipologia[] tipoOperazione = new Tipologia[oggetti.length];
  5438.         for (int i = 0; i < oggetti.length; i++) {
  5439.             if(operationTypes[i]==CostantiControlStation.PERFORM_OPERATION_CREATE) {
  5440.                 tipoOperazione[i] = Tipologia.ADD;
  5441.             }
  5442.             else if(operationTypes[i]==CostantiControlStation.PERFORM_OPERATION_UPDATE) {
  5443.                 tipoOperazione[i] = Tipologia.CHANGE;
  5444.             }
  5445.             else {
  5446.                 tipoOperazione[i] = Tipologia.DEL;
  5447.             }
  5448.         }

  5449.         this.cryptPassword(tipoOperazione, oggetti);
  5450.        
  5451.         IDOperazione [] idOperazione = null;
  5452.         boolean auditDisabiltato = false;
  5453.         try{
  5454.             idOperazione = this.performAuditRequest(tipoOperazione, superUser, oggetti);
  5455.         }catch(AuditDisabilitatoException disabilitato){
  5456.             auditDisabiltato = true;
  5457.         }
  5458.         try{
  5459.             this.performOperation(operationTypes, superUser, smista, oggetti);
  5460.             if(!auditDisabiltato){
  5461.                 this.performAuditComplete(idOperazione, tipoOperazione, superUser, oggetti);
  5462.             }
  5463.         }catch(Exception e){
  5464.             if(!auditDisabiltato){
  5465.                 this.performAuditError(idOperazione, e.getMessage(), tipoOperazione, superUser, oggetti);
  5466.             }
  5467.             throw e;
  5468.         }

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

  5471.     /**
  5472.      * Crea un nuovo oggetto nella govwayConsole e si occupa di inoltrare
  5473.      * l'operazione nella coda dello Smistatore
  5474.      * @throws UtilsException
  5475.      */
  5476.     public void performCreateOperation(String superUser, boolean smista, Object ... oggetti) throws DriverConfigurazioneNotFound, DriverConfigurazioneException, DriverRegistroServiziNotFound, DriverControlStationException, DriverRegistroServiziException, ControlStationCoreException, UtilsException {
  5477.         String nomeMetodo = "performCreateOperation";
  5478.         String operationType = "CREATE";
  5479.         ControlStationCore.logInfo(getPrefixMethod(nomeMetodo)+"performing operation type [" + operationType + "] on objects " + this.getClassNames(oggetti));
  5480.         int[] operationTypes = new int[oggetti.length];
  5481.         for (int i = 0; i < oggetti.length; i++) {
  5482.             operationTypes[i] = CostantiControlStation.PERFORM_OPERATION_CREATE;
  5483.         }
  5484.         Tipologia[] tipoOperazione = new Tipologia[oggetti.length];
  5485.         for (int i = 0; i < oggetti.length; i++) {
  5486.             tipoOperazione[i] = Tipologia.ADD;
  5487.         }

  5488.         this.cryptPassword(tipoOperazione, oggetti);
  5489.        
  5490.         this.setProprietaOggetto(superUser, tipoOperazione, oggetti);
  5491.        
  5492.         IDOperazione [] idOperazione = null;
  5493.         boolean auditDisabiltato = false;
  5494.         try{
  5495.             idOperazione = this.performAuditRequest(tipoOperazione, superUser, oggetti);
  5496.         }catch(AuditDisabilitatoException disabilitato){
  5497.             auditDisabiltato = true;
  5498.         }
  5499.         try{
  5500.             this.performOperation(operationTypes, superUser, smista, oggetti);
  5501.             if(!auditDisabiltato){
  5502.                 this.performAuditComplete(idOperazione, tipoOperazione, superUser, oggetti);
  5503.             }
  5504.         }catch(Exception e){
  5505.             if(!auditDisabiltato){
  5506.                 this.performAuditError(idOperazione, e.getMessage(), tipoOperazione, superUser, oggetti);
  5507.             }
  5508.             throw e;
  5509.         }

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

  5512.     /**
  5513.      * Aggiorna un oggetto nella govwayConsole e si occupa di inoltrare
  5514.      * l'operazione nella coda dello Smistatore
  5515.      * @throws UtilsException
  5516.      */
  5517.     public void performUpdateOperation(String superUser, boolean smista, Object ... oggetti) throws DriverConfigurazioneNotFound, DriverConfigurazioneException, DriverRegistroServiziNotFound, DriverControlStationException, DriverRegistroServiziException, ControlStationCoreException, UtilsException {
  5518.         String nomeMetodo = "performUpdateOperation";
  5519.         String operationType = "UPDATE";

  5520.         ControlStationCore.logInfo(getPrefixMethod(nomeMetodo)+"performing operation type [" + operationType + "] on objects " + this.getClassNames(oggetti));
  5521.         int[] operationTypes = new int[oggetti.length];
  5522.         for (int i = 0; i < oggetti.length; i++) {
  5523.             operationTypes[i] = CostantiControlStation.PERFORM_OPERATION_UPDATE;
  5524.         }
  5525.         Tipologia[] tipoOperazione = new Tipologia[oggetti.length];
  5526.         for (int i = 0; i < oggetti.length; i++) {
  5527.             tipoOperazione[i] = Tipologia.CHANGE;
  5528.         }

  5529.         this.cryptPassword(tipoOperazione, oggetti);
  5530.        
  5531.         this.setProprietaOggetto(superUser, tipoOperazione, oggetti);
  5532.        
  5533.         IDOperazione [] idOperazione = null;
  5534.         boolean auditDisabiltato = false;
  5535.         try{
  5536.             idOperazione = this.performAuditRequest(tipoOperazione, superUser, oggetti);
  5537.         }catch(AuditDisabilitatoException disabilitato){
  5538.             auditDisabiltato = true;
  5539.         }
  5540.         try{
  5541.             this.performOperation(operationTypes, superUser, smista, oggetti);
  5542.             if(!auditDisabiltato){
  5543.                 this.performAuditComplete(idOperazione, tipoOperazione, superUser, oggetti);
  5544.             }
  5545.         }catch(Exception e){
  5546.             if(!auditDisabiltato){
  5547.                 this.performAuditError(idOperazione, e.getMessage(), tipoOperazione, superUser, oggetti);
  5548.             }
  5549.             throw e;
  5550.         }

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

  5552.     }

  5553.     /**
  5554.      * Cancella un oggetto nella govwayConsole e si occupa di inoltrare
  5555.      * l'operazione nella coda dello Smistatore
  5556.      * @throws UtilsException
  5557.      */
  5558.     public void performDeleteOperation(String superUser, boolean smista, Object ... oggetti) throws DriverConfigurazioneNotFound, DriverConfigurazioneException, DriverRegistroServiziNotFound, DriverControlStationException, DriverRegistroServiziException, ControlStationCoreException, UtilsException {
  5559.         String nomeMetodo = "performDeleteOperation";
  5560.         String operationType = "DELETE";

  5561.         ControlStationCore.logInfo(getPrefixMethod(nomeMetodo)+"performing operation type [" + operationType + "] on objects " + this.getClassNames(oggetti));
  5562.         int[] operationTypes = new int[oggetti.length];
  5563.         for (int i = 0; i < oggetti.length; i++) {
  5564.             operationTypes[i] = CostantiControlStation.PERFORM_OPERATION_DELETE;
  5565.         }
  5566.         Tipologia[] tipoOperazione = new Tipologia[oggetti.length];
  5567.         for (int i = 0; i < oggetti.length; i++) {
  5568.             tipoOperazione[i] = Tipologia.DEL;
  5569.         }
  5570.        
  5571.         this.cryptPassword(tipoOperazione, oggetti);
  5572.        
  5573.         IDOperazione [] idOperazione = null;
  5574.         boolean auditDisabiltato = false;
  5575.         try{
  5576.             idOperazione = this.performAuditRequest(tipoOperazione, superUser, oggetti);
  5577.         }catch(AuditDisabilitatoException disabilitato){
  5578.             auditDisabiltato = true;
  5579.         }
  5580.         try{
  5581.             this.performOperation(operationTypes, superUser, smista, oggetti);
  5582.             if(!auditDisabiltato){
  5583.                 this.performAuditComplete(idOperazione, tipoOperazione, superUser, oggetti);
  5584.             }
  5585.         }catch(Exception e){
  5586.             if(!auditDisabiltato){
  5587.                 this.performAuditError(idOperazione, e.getMessage(), tipoOperazione, superUser, oggetti);
  5588.             }
  5589.             throw e;
  5590.         }

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

  5592.     }

  5593.     private <T> ArrayList<String> getClassNames(T[] array) {
  5594.         ArrayList<String> c = new ArrayList<>();
  5595.         for (T type : array) {
  5596.             c.add(type.getClass().getName());
  5597.         }

  5598.         return c;
  5599.     }



  5600.     /* ************** VERIFICA CONSISTENZA PROTOCOLLI ***************** */

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




  5702.     /* ************** AUDIT ***************** */

  5703.     // Gestione audit
  5704.     private static AuditAppender auditManager = null;
  5705.     private static Semaphore semaphoreAuditLock = new Semaphore("ControlStationCoreAudit");
  5706.     public static void clearAuditManager(){
  5707.         SemaphoreLock lock = ControlStationCore.semaphoreAuditLock.acquireThrowRuntime("clearAuditManager");
  5708.         try {
  5709.             ControlStationCore.auditManager = null;
  5710.         }finally {
  5711.             ControlStationCore.semaphoreAuditLock.release(lock, "clearAuditManager");
  5712.         }
  5713.     }
  5714.     private static synchronized void initializeAuditManager(String tipoDatabase) throws DriverControlStationException{
  5715.         SemaphoreLock lock = ControlStationCore.semaphoreAuditLock.acquireThrowRuntime("initializeAuditManager");
  5716.         try {
  5717.             if(ControlStationCore.auditManager==null){
  5718.                 ControlStationCore.auditManager= new AuditAppender();

  5719.                 Connection con = null;
  5720.                 org.openspcoop2.web.lib.audit.dao.Configurazione configurazioneAuditing = null;
  5721.                 try{
  5722.                     con = ControlStationCore.dbM.getConnection();
  5723.                     if (con == null)
  5724.                         throw new Exception("Connessione non disponibile");

  5725.                     DriverAudit driverAudit = new DriverAudit(con,tipoDatabase);
  5726.                     configurazioneAuditing = driverAudit.getConfigurazione();
  5727.                     ControlStationCore.checkAuditDBAppender(configurazioneAuditing, tipoDatabase);

  5728.                 }catch(Exception e){
  5729.                     throw new DriverControlStationException("Inizializzazione auditManager non riuscita (LetturaConfigurazione): "+e.getMessage(),e);
  5730.                 }finally{
  5731.                     try{
  5732.                         JDBCUtilities.closeConnection(DriverControlStationDB.getCheckLogger(), con, DriverControlStationDB.isCheckAutocommit(), DriverControlStationDB.isCheckIsClosed());
  5733.                     }catch(Exception e){
  5734.                         // close
  5735.                     }
  5736.                 }

  5737.                 try{
  5738.                     ControlStationCore.auditManager.initializeAudit(configurazioneAuditing, IDBuilder.getIDBuilder());
  5739.                 }catch(Exception e){
  5740.                     throw new DriverControlStationException("Inizializzazione auditManager non riuscita: "+e.getMessage(),e);
  5741.                 }
  5742.             }
  5743.         }finally {
  5744.             ControlStationCore.semaphoreAuditLock.release(lock, "initializeAuditManager");
  5745.         }
  5746.     }
  5747.     public static synchronized void updateAuditManagerConfiguration(String tipoDatabase) throws DriverControlStationException{
  5748.         if(ControlStationCore.auditManager==null){
  5749.             throw new DriverControlStationException("AuditManager non inizializzato");
  5750.         }
  5751.         SemaphoreLock lock = ControlStationCore.semaphoreAuditLock.acquireThrowRuntime("updateAuditManagerConfiguration");
  5752.         try {
  5753.             Connection con = null;
  5754.             org.openspcoop2.web.lib.audit.dao.Configurazione configurazioneAuditing = null;
  5755.             try{
  5756.                 con = ControlStationCore.dbM.getConnection();
  5757.                 if (con == null)
  5758.                     throw new DriverControlStationException("Connessione non disponibile");

  5759.                 DriverAudit driverAudit = new DriverAudit(con,tipoDatabase);
  5760.                 configurazioneAuditing = driverAudit.getConfigurazione();
  5761.                 ControlStationCore.checkAuditDBAppender(configurazioneAuditing, tipoDatabase);

  5762.             }catch(Exception e){
  5763.                 throw new DriverControlStationException("Aggiornamento configurazione auditManager non riuscita (LetturaConfigurazione): "+e.getMessage(),e);
  5764.             }finally{
  5765.                 try{
  5766.                     JDBCUtilities.closeConnection(DriverControlStationDB.getCheckLogger(), con, DriverControlStationDB.isCheckAutocommit(), DriverControlStationDB.isCheckIsClosed());
  5767.                 }catch(Exception e){
  5768.                     // close
  5769.                 }
  5770.             }

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

  5823.     public void performAuditLogin(String user){

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

  5825.         // loggo tramite auditManager
  5826.         boolean auditAbilitato = true;
  5827.         try{
  5828.             AuditAppender auditManager = ControlStationCore.getAuditManagerInstance(this.tipoDB);
  5829.             auditManager.registraOperazioneAccesso(Tipologia.LOGIN, user,msg, this.isAuditingRegistrazioneElementiBinari,
  5830.                     this.driverBYOKUtilities);
  5831.         }catch(AuditDisabilitatoException disabilitato){
  5832.             ControlStationCore.logDebug("Auditing dell'operazione ["+msg+"] non effettuato: "+disabilitato.getMessage());
  5833.             auditAbilitato = false;
  5834.         }catch(Exception e){
  5835.             ControlStationCore.logError("Auditing dell'operazione ["+msg+"] non riuscito: "+e.getMessage(),e);
  5836.         }

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

  5841.     public void performAuditLogout(String user){

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

  5843.         // loggo tramite auditManager
  5844.         boolean auditAbilitato = true;
  5845.         try{
  5846.             AuditAppender auditManager = ControlStationCore.getAuditManagerInstance(this.tipoDB);
  5847.             auditManager.registraOperazioneAccesso(Tipologia.LOGOUT, user,msg, this.isAuditingRegistrazioneElementiBinari,
  5848.                     this.driverBYOKUtilities);

  5849.         }catch(AuditDisabilitatoException disabilitato){
  5850.             ControlStationCore.logDebug("Auditing dell'operazione ["+msg+"] non effettuato: "+disabilitato.getMessage());
  5851.             auditAbilitato = false;
  5852.         }catch(Exception e){
  5853.             ControlStationCore.logError("Auditing dell'operazione ["+msg+"] non riuscito: "+e.getMessage(),e);
  5854.         }

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

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

  5860.         IDOperazione[] idOperazione = new IDOperazione[obj.length];
  5861.         for (int i = 0; i < obj.length; i++) {
  5862.             Tipologia tipoOperazione = operationTypes[i];
  5863.             Object oggetto = obj[i];

  5864.             if(oggetto instanceof WrapperExtendedBean){
  5865.                 WrapperExtendedBean w = (WrapperExtendedBean) oggetto;
  5866.                 if(w.isManageOriginalBean()){
  5867.                     oggetto = w.getOriginalBean();  
  5868.                 }
  5869.                 // altrimenti viene gestito come IExtendedBean
  5870.                 else{
  5871.                     oggetto = w.getExtendedBean();
  5872.                 }
  5873.             }
  5874.            
  5875.             String msg = null;
  5876.             try{
  5877.                 msg = this.generaMsgAuditing(user, Stato.REQUESTING, tipoOperazione, oggetto);
  5878.             }catch(Exception e){
  5879.                 ControlStationCore.logError("GenerazioneIDOperazione non riuscita: "+e.getMessage(),e);
  5880.                 msg = "GenerazioneIDOperazione non riuscita: "+e.getMessage();
  5881.             }

  5882.             // loggo tramite auditManager
  5883.             boolean auditAbilitato = true;
  5884.             try{
  5885.                 AuditAppender auditManager = ControlStationCore.getAuditManagerInstance(this.tipoDB);

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

  5888.                     AccordoServizioParteComune asClone = (AccordoServizioParteComune) ((AccordoServizioParteComune)oggetto).clone();
  5889.                     for(int k=0; k<asClone.sizeAllegatoList(); k++){
  5890.                         Documento d = asClone.getAllegato(k);
  5891.                         if(d.getByteContenuto()==null){
  5892.                             // Inserisco contenuto per checksum
  5893.                             d.setByteContenuto(this.readContenutoAllegato(d.getId()));
  5894.                         }
  5895.                     }
  5896.                     for(int k=0; k<asClone.sizeSpecificaSemiformaleList(); k++){
  5897.                         Documento d = asClone.getSpecificaSemiformale(k);
  5898.                         if(d.getByteContenuto()==null){
  5899.                             // Inserisco contenuto per checksum
  5900.                             d.setByteContenuto(this.readContenutoAllegato(d.getId()));
  5901.                         }
  5902.                     }
  5903.                     if(asClone.getServizioComposto()!=null){
  5904.                         for(int k=0; k<asClone.getServizioComposto().sizeSpecificaCoordinamentoList(); k++){
  5905.                             Documento d = asClone.getServizioComposto().getSpecificaCoordinamento(k);
  5906.                             if(d.getByteContenuto()==null){
  5907.                                 // Inserisco contenuto per checksum
  5908.                                 d.setByteContenuto(this.readContenutoAllegato(d.getId()));
  5909.                             }
  5910.                         }
  5911.                     }

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

  5914.                 }else if(oggetto instanceof AccordoCooperazione){

  5915.                     AccordoCooperazione acClone = (AccordoCooperazione) ((AccordoCooperazione)oggetto).clone();
  5916.                     for(int k=0; k<acClone.sizeAllegatoList(); k++){
  5917.                         Documento d = acClone.getAllegato(k);
  5918.                         if(d.getByteContenuto()==null){
  5919.                             // Inserisco contenuto per checksum
  5920.                             d.setByteContenuto(this.readContenutoAllegato(d.getId()));
  5921.                         }
  5922.                     }
  5923.                     for(int k=0; k<acClone.sizeSpecificaSemiformaleList(); k++){
  5924.                         Documento d = acClone.getSpecificaSemiformale(k);
  5925.                         if(d.getByteContenuto()==null){
  5926.                             // Inserisco contenuto per checksum
  5927.                             d.setByteContenuto(this.readContenutoAllegato(d.getId()));
  5928.                         }
  5929.                     }

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

  5932.                 }else if(oggetto instanceof AccordoServizioParteSpecifica){

  5933.                     AccordoServizioParteSpecifica sClone = (AccordoServizioParteSpecifica) ((AccordoServizioParteSpecifica)oggetto).clone();
  5934.                     for(int k=0; k<sClone.sizeAllegatoList(); k++){
  5935.                         Documento d = sClone.getAllegato(k);
  5936.                         if(d.getByteContenuto()==null){
  5937.                             // Inserisco contenuto per checksum
  5938.                             d.setByteContenuto(this.readContenutoAllegato(d.getId()));
  5939.                         }
  5940.                     }
  5941.                     for(int k=0; k<sClone.sizeSpecificaSemiformaleList(); k++){
  5942.                         Documento d = sClone.getSpecificaSemiformale(k);
  5943.                         if(d.getByteContenuto()==null){
  5944.                             // Inserisco contenuto per checksum
  5945.                             d.setByteContenuto(this.readContenutoAllegato(d.getId()));
  5946.                         }
  5947.                     }
  5948.                     for(int k=0; k<sClone.sizeSpecificaSicurezzaList(); k++){
  5949.                         Documento d = sClone.getSpecificaSicurezza(k);
  5950.                         if(d.getByteContenuto()==null){
  5951.                             // Inserisco contenuto per checksum
  5952.                             d.setByteContenuto(this.readContenutoAllegato(d.getId()));
  5953.                         }
  5954.                     }
  5955.                     for(int k=0; k<sClone.sizeSpecificaLivelloServizioList(); k++){
  5956.                         Documento d = sClone.getSpecificaLivelloServizio(k);
  5957.                         if(d.getByteContenuto()==null){
  5958.                             // Inserisco contenuto per checksum
  5959.                             d.setByteContenuto(this.readContenutoAllegato(d.getId()));
  5960.                         }
  5961.                     }

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

  5964.                 }else {
  5965.                     idOperazione[i] = auditManager.registraOperazioneInFaseDiElaborazione(tipoOperazione, oggetto, user,msg, this.isAuditingRegistrazioneElementiBinari,
  5966.                             this.driverBYOKUtilities);
  5967.                 }

  5968.             }catch(AuditDisabilitatoException disabilitato){
  5969.                 ControlStationCore.logDebug("Auditing dell'operazione ["+msg+"] non effettuato: "+disabilitato.getMessage());
  5970.                 auditAbilitato = false;
  5971.                 throw disabilitato;
  5972.             }catch(Exception e){
  5973.                 ControlStationCore.logError("Auditing dell'operazione ["+msg+"] non riuscito: "+e.getMessage(),e);
  5974.             }

  5975.             // loggo su file dell'interfaccia (dopo chiamata ad auditManager, in modo che viene registrato il msg solo se abilitato l'audit)
  5976.             if(auditAbilitato)
  5977.                 ControlStationCore.logInfo(msg);
  5978.         }
  5979.         return idOperazione;
  5980.     }

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

  5982.         Connection con = null;
  5983.         String nomeMetodo = "readContenutoAllegato";
  5984.         DriverRegistroServiziDB driver = null;
  5985.         try {
  5986.             // prendo una connessione
  5987.             con = ControlStationCore.dbM.getConnection();
  5988.             // istanzio il driver
  5989.             driver = new DriverRegistroServiziDB(con, ControlStationCore.log, this.tipoDB);

  5990.             Documento doc = driver.getDocumento(idDocumento, true);
  5991.             if(doc!=null)
  5992.                 return doc.getByteContenuto();
  5993.             else
  5994.                 return null;

  5995.         }  catch (DriverRegistroServiziException e) {
  5996.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  5997.             throw e;
  5998.         } catch (Exception e) {
  5999.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6000.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e), e);
  6001.         } finally {
  6002.             ControlStationCore.dbM.releaseConnection(con);
  6003.         }
  6004.     }

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

  6006.         for (int i = 0; i < obj.length; i++) {
  6007.             Tipologia tipoOperazione = operationTypes[i];
  6008.             Object oggetto = obj[i];

  6009.             //loggo su file dell'interfaccia
  6010.             String msg = null;
  6011.             try{
  6012.                 msg = this.generaMsgAuditing(user, Stato.COMPLETED, tipoOperazione, oggetto);
  6013.             }catch(Exception e){
  6014.                 ControlStationCore.logError("GenerazioneIDOperazione non riuscita: "+e.getMessage(),e);
  6015.                 msg = "GenerazioneIDOperazione non riuscita: "+e.getMessage();
  6016.             }

  6017.             // loggo tramite auditManager
  6018.             boolean auditAbilitato = true;
  6019.             try{
  6020.                 AuditAppender auditManager = ControlStationCore.getAuditManagerInstance(this.tipoDB);
  6021.                 auditManager.registraOperazioneCompletataConSuccesso(idOperazione[i],msg);

  6022.             }catch(AuditDisabilitatoException disabilitato){
  6023.                 ControlStationCore.logDebug("Auditing dell'operazione ["+msg+"] non effettuato: "+disabilitato.getMessage());
  6024.                 auditAbilitato = false;
  6025.             }catch(Exception e){
  6026.                 ControlStationCore.logError("Auditing dell'operazione ["+msg+"] non riuscito: "+e.getMessage(),e);
  6027.             }

  6028.             // loggo su file dell'interfaccia (dopo chiamata ad auditManager, in modo che viene registrato il msg solo se abilitato l'audit)
  6029.             if(auditAbilitato)
  6030.                 ControlStationCore.logInfo(msg);
  6031.         }
  6032.     }

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

  6035.         for (int i = 0; i < obj.length; i++) {
  6036.             Tipologia tipoOperazione = operationTypes[i];
  6037.             Type oggetto = obj[i];

  6038.             //loggo su file dell'interfaccia
  6039.             String msg = null;
  6040.             try{
  6041.                 msg = this.generaMsgAuditing(user, Stato.ERROR, tipoOperazione, oggetto);
  6042.             }catch(Exception e){
  6043.                 ControlStationCore.logError("GenerazioneIDOperazione non riuscita: "+e.getMessage(),e);
  6044.                 msg = "GenerazioneIDOperazione non riuscita: "+e.getMessage();
  6045.             }

  6046.             // loggo tramite auditManager
  6047.             boolean auditAbilitato = true;
  6048.             try{
  6049.                 AuditAppender auditManager = ControlStationCore.getAuditManagerInstance(this.tipoDB);
  6050.                 auditManager.registraOperazioneTerminataConErrore(idOperazione[i], motivoErrore,msg);

  6051.             }catch(AuditDisabilitatoException disabilitato){
  6052.                 ControlStationCore.logDebug("Auditing dell'operazione ["+msg+"] non effettuato: "+disabilitato.getMessage());
  6053.                 auditAbilitato = false;
  6054.             }catch(Exception e){
  6055.                 ControlStationCore.logError("Auditing dell'operazione ["+msg+"] non riuscito: "+e.getMessage(),e);
  6056.             }

  6057.             // loggo su file dell'interfaccia (dopo chiamata ad auditManager, in modo che viene registrato il msg solo se abilitato l'audit)
  6058.             if(auditAbilitato)
  6059.                 ControlStationCore.logError(msg+", errore avvenuto:"+motivoErrore);
  6060.         }
  6061.     }

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

  6064.         // ControlStation
  6065.         if (oggetto instanceof PdDControlStation) {
  6066.             PdDControlStation pdd = (PdDControlStation) oggetto;
  6067.             msg+=":"+oggetto.getClass().getSimpleName();
  6068.             msg+=":<"+pdd.getNome()+">";
  6069.         }
  6070.         else if(oggetto instanceof MappingFruizionePortaDelegata){
  6071.             MappingFruizionePortaDelegata mapping = (MappingFruizionePortaDelegata) oggetto;
  6072.             msg+=":"+oggetto.getClass().getSimpleName();
  6073.             StringBuilder bf = new StringBuilder();
  6074.             bf.append("FR[");
  6075.             bf.append(mapping.getIdFruitore().getTipo()+"/"+mapping.getIdFruitore().getNome());
  6076.             bf.append("] SERV[");
  6077.             bf.append(mapping.getIdServizio().toString());
  6078.             bf.append("] PD["+mapping.getIdPortaDelegata().getNome());
  6079.             bf.append("]");
  6080.             msg+=":<"+bf.toString()+">";
  6081.         }
  6082.         else if(oggetto instanceof MappingErogazionePortaApplicativa){
  6083.             MappingErogazionePortaApplicativa mapping = (MappingErogazionePortaApplicativa) oggetto;
  6084.             msg+=":"+oggetto.getClass().getSimpleName();
  6085.             StringBuilder bf = new StringBuilder();
  6086.             bf.append("SERV[");
  6087.             bf.append(mapping.getIdServizio().toString());
  6088.             bf.append("] PA["+mapping.getIdPortaApplicativa().getNome());
  6089.             bf.append("]");
  6090.             msg+=":<"+bf.toString()+">";
  6091.         }
  6092.         else if (oggetto instanceof SoggettoCtrlStat) {
  6093.             SoggettoCtrlStat soggetto = (SoggettoCtrlStat) oggetto;
  6094.             msg+=":"+oggetto.getClass().getSimpleName();
  6095.             msg+=":<"+soggetto.getTipo()+"/"+soggetto.getNome()+">";
  6096.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6097.                 String oldTipo = soggetto.getOldTipoForUpdate()!=null ? soggetto.getOldTipoForUpdate() : soggetto.getTipo();
  6098.                 String oldNome = soggetto.getOldNomeForUpdate()!=null ? soggetto.getOldNomeForUpdate() : soggetto.getNome();
  6099.                 if( (oldTipo.equals(soggetto.getTipo())==false) || (oldNome.equals(soggetto.getNome())==false) )
  6100.                     msg+=":OLD<"+oldTipo+"/"+oldNome+">";
  6101.             }
  6102.         }

  6103.         // RegistroServizi
  6104.        
  6105.         // Gruppo
  6106.         else if (oggetto instanceof Gruppo) {
  6107.             Gruppo g = (Gruppo) oggetto;
  6108.             msg+=":"+oggetto.getClass().getSimpleName();
  6109.             msg+=":<"+g.getNome()+">";
  6110.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6111.                 if(g.getOldIDGruppoForUpdate()!=null && g.getNome().equals(g.getOldIDGruppoForUpdate().getNome())==false){
  6112.                     msg+=":OLD<"+g.getOldIDGruppoForUpdate().getNome()+">";
  6113.                 }
  6114.             }
  6115.         }

  6116.         // Ruolo
  6117.         else if (oggetto instanceof Ruolo) {
  6118.             Ruolo r = (Ruolo) oggetto;
  6119.             msg+=":"+oggetto.getClass().getSimpleName();
  6120.             msg+=":<"+r.getNome()+">";
  6121.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6122.                 if(r.getOldIDRuoloForUpdate()!=null && r.getNome().equals(r.getOldIDRuoloForUpdate().getNome())==false){
  6123.                     msg+=":OLD<"+r.getOldIDRuoloForUpdate().getNome()+">";
  6124.                 }
  6125.             }
  6126.         }
  6127.        
  6128.         // Scope
  6129.         else if (oggetto instanceof Scope) {
  6130.             Scope r = (Scope) oggetto;
  6131.             msg+=":"+oggetto.getClass().getSimpleName();
  6132.             msg+=":<"+r.getNome()+">";
  6133.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6134.                 if(r.getOldIDScopeForUpdate()!=null && r.getNome().equals(r.getOldIDScopeForUpdate().getNome())==false){
  6135.                     msg+=":OLD<"+r.getOldIDScopeForUpdate().getNome()+">";
  6136.                 }
  6137.             }
  6138.         }
  6139.        
  6140.         // AccordoCooperazione
  6141.         else if (oggetto instanceof AccordoCooperazione) {
  6142.             AccordoCooperazione ac = (AccordoCooperazione) oggetto;
  6143.             msg+=":"+oggetto.getClass().getSimpleName();
  6144.             msg+=":<"+this.idAccordoCooperazioneFactory.getUriFromAccordo(ac)+">";
  6145.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6146.                 String oldnome = ac.getOldIDAccordoForUpdate()!=null ? this.idAccordoCooperazioneFactory.getUriFromIDAccordo(ac.getOldIDAccordoForUpdate()) : this.idAccordoCooperazioneFactory.getUriFromAccordo(ac);
  6147.                 if(oldnome.equals(this.idAccordoCooperazioneFactory.getUriFromAccordo(ac))==false)
  6148.                     msg+=":OLD<"+oldnome+">";
  6149.             }
  6150.         }

  6151.         // AccordoServizio
  6152.         else if (oggetto instanceof AccordoServizioParteComune) {
  6153.             AccordoServizioParteComune as = (AccordoServizioParteComune) oggetto;
  6154.             msg+=":"+oggetto.getClass().getSimpleName();
  6155.             msg+=":<"+this.idAccordoFactory.getUriFromAccordo(as)+">";
  6156.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6157.                 String oldnome = as.getOldIDAccordoForUpdate()!=null ? this.idAccordoFactory.getUriFromIDAccordo(as.getOldIDAccordoForUpdate()) : this.idAccordoFactory.getUriFromAccordo(as);
  6158.                 if(oldnome.equals(this.idAccordoFactory.getUriFromAccordo(as))==false)
  6159.                     msg+=":OLD<"+oldnome+">";
  6160.             }
  6161.         }

  6162.         // Soggetto
  6163.         else if (oggetto instanceof org.openspcoop2.core.registry.Soggetto) {
  6164.             org.openspcoop2.core.registry.Soggetto soggetto = (org.openspcoop2.core.registry.Soggetto) oggetto;
  6165.             msg+=":"+oggetto.getClass().getSimpleName();
  6166.             msg+=":<"+soggetto.getTipo()+"/"+soggetto.getNome()+">";
  6167.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6168.                 String oldTipo = (soggetto.getOldIDSoggettoForUpdate()!=null && soggetto.getOldIDSoggettoForUpdate().getTipo()!=null) ?
  6169.                         soggetto.getOldIDSoggettoForUpdate().getTipo() : soggetto.getTipo();
  6170.                 String oldNome = (soggetto.getOldIDSoggettoForUpdate()!=null && soggetto.getOldIDSoggettoForUpdate().getNome()!=null) ?
  6171.                         soggetto.getOldIDSoggettoForUpdate().getNome() : soggetto.getNome();
  6172.                 if( (oldTipo.equals(soggetto.getTipo())==false) || (oldNome.equals(soggetto.getNome())==false) )
  6173.                     msg+=":OLD<"+oldTipo+"/"+oldNome+">";
  6174.             }
  6175.         }

  6176.         // Servizio
  6177.         else if (oggetto instanceof AccordoServizioParteSpecifica) {
  6178.             AccordoServizioParteSpecifica asps = (AccordoServizioParteSpecifica) oggetto;
  6179.             msg+=":"+oggetto.getClass().getSimpleName();
  6180.             msg+=":<"+this.idServizioFactory.getUriFromAccordo(asps)+">";
  6181.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6182.                 String oldnome = asps.getOldIDServizioForUpdate()!=null ? this.idServizioFactory.getUriFromIDServizio(asps.getOldIDServizioForUpdate()) : this.idServizioFactory.getUriFromAccordo(asps);
  6183.                 if(oldnome.equals(this.idServizioFactory.getUriFromAccordo(asps))==false)
  6184.                     msg+=":OLD<"+oldnome+">";
  6185.             }
  6186.         }

  6187.         // PortaDominio
  6188.         else if (oggetto instanceof PortaDominio) {
  6189.             PortaDominio pdd = (PortaDominio) oggetto;
  6190.             msg+=":"+oggetto.getClass().getSimpleName();
  6191.             msg+=":<"+pdd.getNome()+">";

  6192.         }

  6193.         // PortType
  6194.         else if (oggetto instanceof PortType) {
  6195.             PortType pt = (PortType) oggetto;

  6196.             long idAcc = pt.getIdAccordo();
  6197.             String nomeAS = "notdefined";
  6198.             try{
  6199.                 AccordiServizioParteComuneCore apcCore = new AccordiServizioParteComuneCore(this);
  6200.                 IDAccordo idAccordo = apcCore.getIdAccordoServizio(idAcc);
  6201.                 nomeAS = idAccordo.getNome();
  6202.             }catch (Exception e) {
  6203.                 // ignore
  6204.             }

  6205.             msg+=":"+oggetto.getClass().getSimpleName();
  6206.             msg+=":<"+pt.getNome()+"_"+nomeAS+">";
  6207.         }



  6208.         // config
  6209.         //Soggetto
  6210.         if (oggetto instanceof Soggetto) {
  6211.             Soggetto soggetto = (Soggetto) oggetto;
  6212.             msg+=":"+oggetto.getClass().getSimpleName();
  6213.             msg+=":<"+soggetto.getTipo()+"/"+soggetto.getNome()+">";
  6214.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6215.                 String oldTipo = (soggetto.getOldIDSoggettoForUpdate()!=null && soggetto.getOldIDSoggettoForUpdate().getTipo()!=null) ?
  6216.                         soggetto.getOldIDSoggettoForUpdate().getTipo() : soggetto.getTipo();
  6217.                 String oldNome = (soggetto.getOldIDSoggettoForUpdate()!=null && soggetto.getOldIDSoggettoForUpdate().getNome()!=null) ?
  6218.                         soggetto.getOldIDSoggettoForUpdate().getNome() : soggetto.getNome();
  6219.                 if( (oldTipo.equals(soggetto.getTipo())==false) || (oldNome.equals(soggetto.getNome())==false) )
  6220.                     msg+=":OLD<"+oldTipo+"/"+oldNome+">";
  6221.             }
  6222.         }

  6223.         // ServizioApplicativo
  6224.         else if (oggetto instanceof ServizioApplicativo) {
  6225.             ServizioApplicativo sa = (ServizioApplicativo) oggetto;
  6226.             msg+=":"+oggetto.getClass().getSimpleName();
  6227.             msg+=":<"+sa.getTipoSoggettoProprietario()+"/"+sa.getNomeSoggettoProprietario()+"_"+sa.getNome()+">";
  6228.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6229.                 String oldTipoProp = (sa.getOldIDServizioApplicativoForUpdate()!=null && sa.getOldIDServizioApplicativoForUpdate().getIdSoggettoProprietario()!=null &&
  6230.                         sa.getOldIDServizioApplicativoForUpdate().getIdSoggettoProprietario().getTipo()!=null) ?
  6231.                         sa.getOldIDServizioApplicativoForUpdate().getIdSoggettoProprietario().getTipo() : sa.getTipoSoggettoProprietario();
  6232.                 String oldNomeProp = (sa.getOldIDServizioApplicativoForUpdate()!=null && sa.getOldIDServizioApplicativoForUpdate().getIdSoggettoProprietario()!=null &&
  6233.                         sa.getOldIDServizioApplicativoForUpdate().getIdSoggettoProprietario().getNome()!=null) ?
  6234.                         sa.getOldIDServizioApplicativoForUpdate().getIdSoggettoProprietario().getNome() : sa.getNomeSoggettoProprietario();
  6235.                 String oldNome = (sa.getOldIDServizioApplicativoForUpdate()!=null && sa.getOldIDServizioApplicativoForUpdate().getNome()!=null) ?
  6236.                         sa.getOldIDServizioApplicativoForUpdate().getNome() : sa.getNome();
  6237.                 if(  (oldNome.equals(sa.getNome())==false) || (oldTipoProp.equals(sa.getTipoSoggettoProprietario())==false) || (oldNomeProp.equals(sa.getNomeSoggettoProprietario())==false) )
  6238.                     msg+=":OLD<"+oldTipoProp+"/"+oldNomeProp+"_"+oldNome+">";
  6239.             }
  6240.         }

  6241.         // PortaDelegata
  6242.         else if (oggetto instanceof PortaDelegata) {
  6243.             PortaDelegata pd = (PortaDelegata) oggetto;
  6244.             msg+=":"+oggetto.getClass().getSimpleName();
  6245.             msg+=":<"+pd.getTipoSoggettoProprietario()+"/"+pd.getNomeSoggettoProprietario()+"_"+pd.getNome()+">";
  6246.             if(Tipologia.CHANGE.equals(tipoOperazione)){
  6247.                 String oldNome = (pd.getOldIDPortaDelegataForUpdate()!=null && pd.getOldIDPortaDelegataForUpdate().getNome()!=null) ?
  6248.                         pd.getOldIDPortaDelegataForUpdate().getNome() : pd.getNome();
  6249.                 if(  (oldNome.equals(pd.getNome())==false) )
  6250.                     msg+=":OLD<"+pd.getTipoSoggettoProprietario()+"/"+pd.getNomeSoggettoProprietario()+"_"+oldNome+">";
  6251.             }
  6252.         }

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

  6265.         // RoutingTable
  6266.         else if (oggetto instanceof RoutingTable) {
  6267.             //RoutingTable rt = (RoutingTable) oggetto;
  6268.             msg+=":"+oggetto.getClass().getSimpleName();
  6269.         }

  6270.         // Configurazione
  6271.         else if (oggetto instanceof Configurazione) {
  6272.             //Configurazione conf = (Configurazione) oggetto;
  6273.             msg+=":"+oggetto.getClass().getSimpleName();
  6274.         }

  6275.         // AccessoRegistro
  6276.         else if (oggetto instanceof AccessoRegistro) {
  6277.             //AccessoRegistro cfgAccessoRegistro = (AccessoRegistro) oggetto;
  6278.             msg+=":"+oggetto.getClass().getSimpleName();
  6279.         }

  6280.         // User
  6281.         else if (oggetto instanceof User) {
  6282.             User utente = (User) oggetto;
  6283.             msg+=":"+oggetto.getClass().getSimpleName();
  6284.             msg+=":<"+utente.getLogin()+">";
  6285.         }

  6286.         // auditing
  6287.         else if(oggetto instanceof org.openspcoop2.web.lib.audit.dao.Configurazione){
  6288.             msg+=":"+oggetto.getClass().getSimpleName();
  6289.         }
  6290.         else if(oggetto instanceof org.openspcoop2.web.lib.audit.dao.Filtro){
  6291.             org.openspcoop2.web.lib.audit.dao.Filtro filtro = (org.openspcoop2.web.lib.audit.dao.Filtro) oggetto;
  6292.             msg+=":"+oggetto.getClass().getSimpleName();
  6293.             msg+=":<"+filtro.toString()+">";
  6294.         }

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

  6404.    











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

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

  6484.         } catch (Exception e) {
  6485.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6486.             throw new DriverConfigurazioneException(getPrefixError(nomeMetodo,  e),e);
  6487.         }
  6488.     }
  6489.    
  6490.     public IConfigIntegrationReader getConfigIntegrationReader(IProtocolFactory<?> protocolFactory) throws DriverConfigurazioneException{
  6491.         String nomeMetodo = "getConfigIntegrationReader";
  6492.        
  6493.         try {
  6494.             // istanzio il driver
  6495.             DriverConfigurazioneDB driver = new DriverConfigurazioneDB(ControlStationCore.dbM.getDataSourceName(),ControlStationCore.dbM.getDataSourceContext(),ControlStationCore.log, this.tipoDB);
  6496.             return protocolFactory.getConfigIntegrationReader(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 void initMappingErogazione(boolean forceMapping,Logger log) throws DriverConfigurazioneException {
  6504.         Connection con = null;
  6505.         String nomeMetodo = "initMappingErogazione";
  6506.         DriverControlStationDB driver = null;
  6507.         try {
  6508.             // prendo una connessione
  6509.             con = ControlStationCore.dbM.getConnection();
  6510.             // istanzio il driver
  6511.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  6512.             driver.initMappingErogazione(forceMapping,log);

  6513.         } catch (Exception e) {
  6514.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6515.             throw new DriverConfigurazioneException(getPrefixError(nomeMetodo,  e),e);
  6516.         } finally {
  6517.             ControlStationCore.dbM.releaseConnection(con);
  6518.         }

  6519.     }
  6520.    
  6521.     public void initMappingFruizione(boolean forceMapping,Logger log) throws DriverConfigurazioneException {
  6522.         Connection con = null;
  6523.         String nomeMetodo = "initMappingFruizione";
  6524.         DriverControlStationDB driver = null;

  6525.         try {
  6526.             // prendo una connessione
  6527.             con = ControlStationCore.dbM.getConnection();
  6528.             // istanzio il driver
  6529.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  6530.             driver.initMappingFruizione(forceMapping,log);

  6531.         } catch (Exception e) {
  6532.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6533.             throw new DriverConfigurazioneException(getPrefixError(nomeMetodo,  e),e);
  6534.         } finally {
  6535.             ControlStationCore.dbM.releaseConnection(con);
  6536.         }

  6537.     }
  6538.    

  6539.     /**
  6540.      * Accesso alla configurazione generale della Pdd
  6541.      *
  6542.      * @return configurazione generale della Pdd
  6543.      * @throws DriverConfigurazioneNotFound
  6544.      * @throws DriverConfigurazioneException
  6545.      */
  6546.     private static Configurazione configurazioneInstance = null;
  6547.     private static final Semaphore configurazioneInstanceSemaphore = new Semaphore("configurazioneGenerale");
  6548.     public static void invalidateConfigurazioneGenerale() {
  6549.         if(ControlStationCore.configurazioneInstance!=null) {
  6550.             invalidateConfigurazioneGeneraleEngine();
  6551.         }
  6552.     }
  6553.     public static void invalidateConfigurazioneGeneraleEngine() {
  6554.         SemaphoreLock lock = ControlStationCore.configurazioneInstanceSemaphore.acquireThrowRuntime("invalidateConfigurazioneGenerale");
  6555.         try {
  6556.             ControlStationCore.configurazioneInstance=null;
  6557.         }finally {
  6558.             ControlStationCore.configurazioneInstanceSemaphore.release(lock, "invalidateConfigurazioneGenerale");
  6559.         }
  6560.     }
  6561.     public Configurazione getConfigurazioneGenerale() throws DriverConfigurazioneNotFound, DriverConfigurazioneException {
  6562.         if(ControlStationCore.configurazioneInstance==null) {
  6563.             initSyncConfigurazioneGenerale();
  6564.         }
  6565.         return ControlStationCore.configurazioneInstance;
  6566.     }
  6567.     private void initSyncConfigurazioneGenerale() throws DriverConfigurazioneNotFound, DriverConfigurazioneException {
  6568.         if(ControlStationCore.configurazioneInstance==null) {
  6569.             SemaphoreLock lock = ControlStationCore.configurazioneInstanceSemaphore.acquireThrowRuntime("initConfigurazioneGenerale");
  6570.             try {
  6571.                 initConfigurazioneGenerale();
  6572.             }finally {
  6573.                 ControlStationCore.configurazioneInstanceSemaphore.release(lock, "initConfigurazioneGenerale");
  6574.             }
  6575.         }
  6576.     }
  6577.     private void initConfigurazioneGenerale() throws DriverConfigurazioneNotFound, DriverConfigurazioneException {
  6578.         Connection con = null;
  6579.         String nomeMetodo = "getConfigurazioneGenerale";
  6580.         DriverControlStationDB driver = null;

  6581.         try {
  6582.             // prendo una connessione
  6583.             con = ControlStationCore.dbM.getConnection();
  6584.             // istanzio il driver
  6585.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  6586.             Configurazione config = driver.getDriverConfigurazioneDB().getConfigurazioneGenerale();
  6587.             StatoFunzionalita statoMultitenant = (config.getMultitenant()==null || config.getMultitenant().getStato()==null) ? StatoFunzionalita.DISABILITATO :  config.getMultitenant().getStato();
  6588.             if(StatoFunzionalita.DISABILITATO.equals(statoMultitenant)) {
  6589.                 // Fix #20
  6590.                 SoggettiCore soggettiCore = new SoggettiCore(this);
  6591.                 List<IDSoggetto> l = soggettiCore.getIdSoggettiOperativi();
  6592.                 boolean existsMoreThanOneSoggettoOperativoPerProtocollo = false;
  6593.                 Map<String, Integer> countSoggettoOperativiByProtocol = new HashMap<>();
  6594.                 if(l!=null && !l.isEmpty()) {
  6595.                     for (IDSoggetto soggetto : l) {
  6596.                         String protocol = soggettiCore.getProtocolloAssociatoTipoSoggetto(soggetto.getTipo());
  6597.                         int count = 0;
  6598.                         if(countSoggettoOperativiByProtocol.containsKey(protocol)) {
  6599.                             count = countSoggettoOperativiByProtocol.remove(protocol);
  6600.                         }
  6601.                         count ++;
  6602.                         if(count>1) {
  6603.                             existsMoreThanOneSoggettoOperativoPerProtocollo = true;
  6604.                             break;
  6605.                         }
  6606.                         countSoggettoOperativiByProtocol.put(protocol, count);
  6607.                     }
  6608.                 }
  6609.                 if(existsMoreThanOneSoggettoOperativoPerProtocollo) {
  6610.                     // 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
  6611.                     if(config.getMultitenant()==null) {
  6612.                         config.setMultitenant(new ConfigurazioneMultitenant());
  6613.                     }
  6614.                     config.getMultitenant().setStato(StatoFunzionalita.ABILITATO);
  6615.                 }
  6616.             }
  6617.            
  6618.             ControlStationCore.configurazioneInstance = config;

  6619.         } catch (DriverConfigurazioneNotFound de) {
  6620.             ControlStationCore.logError(getPrefixError(nomeMetodo,  de),de);
  6621.             throw de;
  6622.         } catch (Exception e) {
  6623.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6624.             throw new DriverConfigurazioneException(getPrefixError(nomeMetodo,  e),e);
  6625.         } finally {
  6626.             ControlStationCore.dbM.releaseConnection(con);
  6627.         }

  6628.     }
  6629.    
  6630.     /**
  6631.      * Accesso alla configurazione dei canali
  6632.      *
  6633.      * @return configurazione dei canali
  6634.      * @throws DriverConfigurazioneNotFound
  6635.      * @throws DriverConfigurazioneException
  6636.      */
  6637.     public CanaliConfigurazione getCanaliConfigurazione(boolean readNodi) throws DriverConfigurazioneNotFound, DriverConfigurazioneException {
  6638.         Connection con = null;
  6639.         String nomeMetodo = "getCanaliConfigurazione";
  6640.         DriverControlStationDB driver = null;

  6641.         try {
  6642.             // prendo una connessione
  6643.             con = ControlStationCore.dbM.getConnection();
  6644.             // istanzio il driver
  6645.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  6646.             CanaliConfigurazione config = driver.getDriverConfigurazioneDB().getCanaliConfigurazione(readNodi);
  6647.             return config;

  6648.         } catch (DriverConfigurazioneNotFound de) {
  6649.             ControlStationCore.logError(getPrefixError(nomeMetodo,  de),de);
  6650.             throw de;
  6651.         } catch (Exception e) {
  6652.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6653.             throw new DriverConfigurazioneException(getPrefixError(nomeMetodo,  e),e);
  6654.         } finally {
  6655.             ControlStationCore.dbM.releaseConnection(con);
  6656.         }

  6657.     }
  6658.    
  6659.     public List<String> getAllGruppiOrdinatiPerDataRegistrazione() throws DriverRegistroServiziException {
  6660.         FiltroRicercaGruppi filtroRicercaGruppi = new FiltroRicercaGruppi();
  6661.         filtroRicercaGruppi.setOrdinaDataRegistrazione(true);
  6662.         List<String> returnList = new ArrayList<>();
  6663.         List<IDGruppo> list = this.getAllIdGruppi(filtroRicercaGruppi);
  6664.         for (IDGruppo idGruppo : list) {
  6665.             returnList.add(idGruppo.getNome());
  6666.         }
  6667.         return returnList;
  6668.     }
  6669.    
  6670.     public List<String> getAllGruppi(FiltroRicercaGruppi filtroRicerca) throws DriverRegistroServiziException {
  6671.         List<String> returnList = new ArrayList<>();
  6672.         List<IDGruppo> list = this.getAllIdGruppi(filtroRicerca);
  6673.         for (IDGruppo idGruppo : list) {
  6674.             returnList.add(idGruppo.getNome());
  6675.         }
  6676.         return returnList;
  6677.     }
  6678.     public List<IDGruppo> getAllIdGruppi(FiltroRicercaGruppi filtroRicerca) throws DriverRegistroServiziException {
  6679.         Connection con = null;
  6680.         String nomeMetodo = "getAllIdGruppi";
  6681.         DriverControlStationDB driver = null;

  6682.         try {
  6683.             if(this.isRegistroServiziLocale()){
  6684.                 // prendo una connessione
  6685.                 con = ControlStationCore.dbM.getConnection();
  6686.                 // istanzio il driver
  6687.                 driver = new DriverControlStationDB(con, null, this.tipoDB);
  6688.    
  6689.                 return driver.getDriverRegistroServiziDB().getAllIdGruppi(filtroRicerca);
  6690.             }
  6691.             else{
  6692.                 return GestoreRegistroServiziRemoto.getDriverRegistroServizi(ControlStationCore.log).getAllIdGruppi(filtroRicerca);
  6693.             }

  6694.         } catch (DriverRegistroServiziNotFound de) {
  6695.             ControlStationCore.logDebug(getPrefixError(nomeMetodo,  de),de);
  6696.             return new ArrayList<>();
  6697.         } catch (Exception e) {
  6698.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6699.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  6700.         } finally {
  6701.             ControlStationCore.dbM.releaseConnection(con);
  6702.         }
  6703.     }

  6704.     public List<String> getAllRuoli(FiltroRicercaRuoli filtroRicerca) throws DriverRegistroServiziException {
  6705.         List<String> returnList = new ArrayList<>();
  6706.         List<IDRuolo> list = this.getAllIdRuoli(filtroRicerca);
  6707.         for (IDRuolo idRuolo : list) {
  6708.             returnList.add(idRuolo.getNome());
  6709.         }
  6710.         return returnList;
  6711.     }
  6712.     public List<IDRuolo> getAllIdRuoli(FiltroRicercaRuoli filtroRicerca) throws DriverRegistroServiziException {
  6713.         Connection con = null;
  6714.         String nomeMetodo = "getAllIdRuoli";
  6715.         DriverControlStationDB driver = null;

  6716.         try {
  6717.             if(this.isRegistroServiziLocale()){
  6718.                 // prendo una connessione
  6719.                 con = ControlStationCore.dbM.getConnection();
  6720.                 // istanzio il driver
  6721.                 driver = new DriverControlStationDB(con, null, this.tipoDB);
  6722.    
  6723.                 return driver.getDriverRegistroServiziDB().getAllIdRuoli(filtroRicerca);
  6724.             }
  6725.             else{
  6726.                 return GestoreRegistroServiziRemoto.getDriverRegistroServizi(ControlStationCore.log).getAllIdRuoli(filtroRicerca);
  6727.             }

  6728.         } catch (DriverRegistroServiziNotFound de) {
  6729.             ControlStationCore.logDebug(getPrefixError(nomeMetodo,  de),de);
  6730.             return new ArrayList<>();
  6731.         } catch (Exception e) {
  6732.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6733.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  6734.         } finally {
  6735.             ControlStationCore.dbM.releaseConnection(con);
  6736.         }
  6737.     }
  6738.    
  6739.     public List<String> getAllScope(FiltroRicercaScope filtroRicerca) throws DriverRegistroServiziException {
  6740.         List<String> returnList = new ArrayList<>();
  6741.         List<IDScope> list = this.getAllIdScope(filtroRicerca);
  6742.         for (IDScope idScope : list) {
  6743.             returnList.add(idScope.getNome());
  6744.         }
  6745.         return returnList;
  6746.     }
  6747.     public List<IDScope> getAllIdScope(FiltroRicercaScope filtroRicerca) throws DriverRegistroServiziException {
  6748.         Connection con = null;
  6749.         String nomeMetodo = "getAllIdScope";
  6750.         DriverControlStationDB driver = null;

  6751.         try {
  6752.             if(this.isRegistroServiziLocale()){
  6753.                 // prendo una connessione
  6754.                 con = ControlStationCore.dbM.getConnection();
  6755.                 // istanzio il driver
  6756.                 driver = new DriverControlStationDB(con, null, this.tipoDB);
  6757.    
  6758.                 return driver.getDriverRegistroServiziDB().getAllIdScope(filtroRicerca);
  6759.             }
  6760.             else{
  6761.                 return GestoreRegistroServiziRemoto.getDriverRegistroServizi(ControlStationCore.log).getAllIdScope(filtroRicerca);
  6762.             }

  6763.         } catch (DriverRegistroServiziNotFound de) {
  6764.             ControlStationCore.logDebug(getPrefixError(nomeMetodo,  de),de);
  6765.             return new ArrayList<>();
  6766.         } catch (Exception e) {
  6767.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  6768.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  6769.         } finally {
  6770.             ControlStationCore.dbM.releaseConnection(con);
  6771.         }
  6772.     }

  6773.     public int countProtocolli(HttpServletRequest request, HttpSession session) throws  DriverRegistroServiziException {
  6774.         return this.countProtocolli(request, session, false);
  6775.     }
  6776.     public int countProtocolli(HttpServletRequest request, HttpSession session, boolean ignoreProtocolloSelezionato) throws  DriverRegistroServiziException {
  6777.         List<String> l = this.getProtocolli(request, session, ignoreProtocolloSelezionato);
  6778.         return l.size();
  6779.     }
  6780.     public List<String> getProtocolli(HttpServletRequest request, HttpSession session) throws  DriverRegistroServiziException {
  6781.         return this.getProtocolli(request, session, false);
  6782.     }
  6783.     public List<String> getProtocolli(HttpServletRequest request, HttpSession session, boolean ignoreProtocolloSelezionato) throws  DriverRegistroServiziException {
  6784.         return this.getProtocolli(request, session, ignoreProtocolloSelezionato, false);
  6785.     }
  6786.     public List<String> getProtocolli(HttpServletRequest request, HttpSession session, boolean ignoreProtocolloSelezionato,
  6787.             boolean consideraProtocolliCompatibiliSoggettoSelezionato) throws  DriverRegistroServiziException {
  6788.         String getProtocolli = "getProtocolli";
  6789.         try{

  6790.             List<String> protocolliList = new ArrayList<>();
  6791.            
  6792.             User u =ServletUtils.getUserFromSession(request, session);
  6793.            
  6794.             if(!ignoreProtocolloSelezionato) {
  6795.                 if(u.getProtocolloSelezionatoPddConsole()!=null) {
  6796.                     protocolliList.add(u.getProtocolloSelezionatoPddConsole());
  6797.                     return protocolliList;
  6798.                 }
  6799.                 else if(consideraProtocolliCompatibiliSoggettoSelezionato &&
  6800.                         u.getSoggettoSelezionatoPddConsole()!=null && !"".equals(u.getSoggettoSelezionatoPddConsole())) {
  6801.                     String tipoSoggetto = u.getSoggettoSelezionatoPddConsole().split("/")[0];
  6802.                     SoggettiCore soggettiCore = new SoggettiCore(this);
  6803.                     String protocollo = soggettiCore.getProtocolloAssociatoTipoSoggetto(tipoSoggetto);
  6804.                     protocolliList.add(protocollo);
  6805.                     return protocolliList;
  6806.                 }
  6807.             }
  6808.            
  6809.             if(u.getProtocolliSupportati()!=null && u.getProtocolliSupportati().size()>0) {
  6810.                 return ProtocolUtils.orderProtocolli(u.getProtocolliSupportati());
  6811.             }
  6812.            
  6813.             return this.getProtocolli(); // ordinato dentro il metodo

  6814.         }catch (Exception e) {
  6815.             String errorMsg = getPrefixError(getProtocolli,  e);
  6816.             ControlStationCore.logError(errorMsg, e);
  6817.             throw new DriverRegistroServiziException(errorMsg,e);
  6818.         }
  6819.     }
  6820.     public List<String> getProtocolli(){
  6821.        
  6822.         List<String> protocolliList = new ArrayList<>();
  6823.        
  6824.         MapReader<String, IProtocolFactory<?>> protocolFactories = this.protocolFactoryManager.getProtocolFactories();
  6825.         Enumeration<String> protocolli = protocolFactories.keys();
  6826.         while (protocolli.hasMoreElements()) {

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

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

  7035.         try {
  7036.             // prendo una connessione
  7037.             con = ControlStationCore.dbM.getConnection();
  7038.             // istanzio il driver
  7039.             driver = new DriverControlStationDB(con, null, this.tipoDB);

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

  7041.         } catch (Exception e) {
  7042.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7043.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7044.         } finally {
  7045.             ControlStationCore.dbM.releaseConnection(con);
  7046.         }
  7047.     }
  7048.    
  7049.     public List<IDSoggetto> idSoggettiRegistroList(String superuser, ISearch ricerca) throws DriverRegistroServiziException {
  7050.         Connection con = null;
  7051.         String nomeMetodo = "idSoggettiRegistroList";
  7052.         DriverControlStationDB driver = null;

  7053.         try {
  7054.             // prendo una connessione
  7055.             con = ControlStationCore.dbM.getConnection();
  7056.             // istanzio il driver
  7057.             driver = new DriverControlStationDB(con, null, this.tipoDB);

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

  7059.         } catch (Exception e) {
  7060.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7061.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7062.         } finally {
  7063.             ControlStationCore.dbM.releaseConnection(con);
  7064.         }
  7065.     }
  7066.    
  7067.     public List<IDSoggetto> getSoggettiDefault() throws DriverRegistroServiziException {
  7068.         Connection con = null;
  7069.         String nomeMetodo = "getSoggettiDefault";
  7070.         DriverControlStationDB driver = null;

  7071.         try {
  7072.             // prendo una connessione
  7073.             con = ControlStationCore.dbM.getConnection();
  7074.             // istanzio il driver
  7075.             driver = new DriverControlStationDB(con, null, this.tipoDB);

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

  7077.         } catch (Exception e) {
  7078.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7079.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7080.         } finally {
  7081.             ControlStationCore.dbM.releaseConnection(con);
  7082.         }
  7083.     }
  7084.    
  7085.     public List<AccordoServizioParteComuneSintetico> accordiList(String superuser, ISearch ricerca) throws DriverRegistroServiziException {
  7086.         Connection con = null;
  7087.         String nomeMetodo = "accordiList";
  7088.         DriverControlStationDB driver = null;

  7089.         try {
  7090.             // prendo una connessione
  7091.             con = ControlStationCore.dbM.getConnection();
  7092.             // istanzio il driver
  7093.             driver = new DriverControlStationDB(con, null, this.tipoDB);

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

  7095.         } catch (Exception e) {
  7096.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7097.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7098.         } finally {
  7099.             ControlStationCore.dbM.releaseConnection(con);
  7100.         }

  7101.     }
  7102.    
  7103.     public List<IDAccordoDB> idAccordiList(String superuser, ISearch ricerca,
  7104.             boolean soloAccordiConsistentiRest, boolean soloAccordiConsistentiSoap) throws DriverRegistroServiziException {
  7105.         Connection con = null;
  7106.         String nomeMetodo = "idAccordiList";
  7107.         DriverControlStationDB driver = null;

  7108.         try {
  7109.             // prendo una connessione
  7110.             con = ControlStationCore.dbM.getConnection();
  7111.             // istanzio il driver
  7112.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  7113.             return driver.getDriverRegistroServiziDB().idAccordiList(superuser, ricerca,
  7114.                     soloAccordiConsistentiRest, soloAccordiConsistentiSoap);

  7115.         } catch (Exception e) {
  7116.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7117.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7118.         } finally {
  7119.             ControlStationCore.dbM.releaseConnection(con);
  7120.         }

  7121.     }
  7122.    
  7123.     public List<AccordoCooperazione> accordiCooperazioneList(String superuser, ISearch ricerca) throws DriverRegistroServiziException {
  7124.         Connection con = null;
  7125.         String nomeMetodo = "accordiCooperazioneList";
  7126.         DriverControlStationDB driver = null;

  7127.         try {
  7128.             // prendo una connessione
  7129.             con = ControlStationCore.dbM.getConnection();
  7130.             // istanzio il driver
  7131.             driver = new DriverControlStationDB(con, null, this.tipoDB);

  7132.             return driver.getDriverRegistroServiziDB().accordiCooperazioneList(superuser, ricerca);
  7133.         } catch (DriverRegistroServiziException e) {
  7134.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7135.             throw e;
  7136.         } catch (Exception e) {
  7137.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7138.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e), e);
  7139.         } finally {
  7140.             ControlStationCore.dbM.releaseConnection(con);
  7141.         }
  7142.     }
  7143.    
  7144.     public IDServizio getLabelNomeServizioApplicativo(String servizioApplicativo) throws DriverConfigurazioneException {
  7145.         Connection con = null;
  7146.         String nomeMetodo = "getLabelNomeServizioApplicativo";
  7147.         DriverControlStationDB driver = null;

  7148.         try {
  7149.             // prendo una connessione
  7150.             con = ControlStationCore.dbM.getConnection();
  7151.             // istanzio il driver
  7152.             driver = new DriverControlStationDB(con, null, this.tipoDB);

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

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

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

  7509.         }catch (Exception e) {
  7510.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7511.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7512.         }
  7513.     }
  7514.    
  7515.     public String[] getProfiliDiCollaborazioneSupportatiDalProtocollo(String protocollo,ServiceBinding serviceBinding) throws DriverRegistroServiziNotFound, DriverRegistroServiziException {
  7516.         String nomeMetodo = "getProfiliDiCollaborazioneSupportatiDalProtocollo";
  7517.         List<String> lstProt = new ArrayList<>();
  7518.         try{
  7519.             if(isProfiloDiCollaborazioneSupportatoDalProtocollo(protocollo, serviceBinding, ProfiloDiCollaborazione.ONEWAY))
  7520.                 lstProt.add(CostantiRegistroServizi.ONEWAY.toString());

  7521.             if(isProfiloDiCollaborazioneSupportatoDalProtocollo(protocollo, serviceBinding, ProfiloDiCollaborazione.SINCRONO))
  7522.                 lstProt.add(CostantiRegistroServizi.SINCRONO.toString());
  7523.            
  7524.             if(isProfiloDiCollaborazioneSupportatoDalProtocollo(protocollo, serviceBinding, ProfiloDiCollaborazione.ASINCRONO_SIMMETRICO))
  7525.                 lstProt.add(CostantiRegistroServizi.ASINCRONO_SIMMETRICO.toString());
  7526.            
  7527.             if(isProfiloDiCollaborazioneSupportatoDalProtocollo(protocollo, serviceBinding, ProfiloDiCollaborazione.ASINCRONO_ASIMMETRICO))
  7528.                 lstProt.add(CostantiRegistroServizi.ASINCRONO_ASIMMETRICO.toString());
  7529.            
  7530.             return lstProt.toArray(new String[lstProt.size()]);
  7531.         }catch (Exception e) {
  7532.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7533.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7534.         }
  7535.     }
  7536.    
  7537.     public String[] getProfiliDiCollaborazioneSupportatiDalProtocolloDefault(ServiceBinding serviceBinding) throws DriverRegistroServiziNotFound, DriverRegistroServiziException {
  7538.         String nomeMetodo = "getProfiliDiCollaborazioneSupportatiDalProtocolloDefault";
  7539.         List<String> lstProt = new ArrayList<>();
  7540.         try{
  7541.             if(isProfiloDiCollaborazioneSupportatoDalProtocolloDefault(serviceBinding, ProfiloDiCollaborazione.ONEWAY))
  7542.                 lstProt.add(CostantiRegistroServizi.ONEWAY.toString());

  7543.             if(isProfiloDiCollaborazioneSupportatoDalProtocolloDefault(serviceBinding, ProfiloDiCollaborazione.SINCRONO))
  7544.                 lstProt.add(CostantiRegistroServizi.SINCRONO.toString());
  7545.            
  7546.             if(isProfiloDiCollaborazioneSupportatoDalProtocolloDefault(serviceBinding, ProfiloDiCollaborazione.ASINCRONO_SIMMETRICO))
  7547.                 lstProt.add(CostantiRegistroServizi.ASINCRONO_SIMMETRICO.toString());
  7548.            
  7549.             if(isProfiloDiCollaborazioneSupportatoDalProtocolloDefault(serviceBinding, ProfiloDiCollaborazione.ASINCRONO_ASIMMETRICO))
  7550.                 lstProt.add(CostantiRegistroServizi.ASINCRONO_ASIMMETRICO.toString());
  7551.            
  7552.             return lstProt.toArray(new String[lstProt.size()]);
  7553.         }catch (Exception e) {
  7554.             ControlStationCore.logError(getPrefixError(nomeMetodo,  e), e);
  7555.             throw new DriverRegistroServiziException(getPrefixError(nomeMetodo,  e),e);
  7556.         }
  7557.     }
  7558.    
  7559.     public String getVersioneDefaultProtocollo(String protocollo) throws DriverRegistroServiziNotFound, DriverRegistroServiziException {
  7560.         String nomeMetodo = "getVersioneDefaultProtocollo";
  7561.         try{

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

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

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

  7895.         return this.defaultFont;
  7896.     }
  7897.     public void setDefaultFont(Font defaultFont) {
  7898.         this.defaultFont = defaultFont;
  7899.     }
  7900.    
  7901.     // UTILITIES misurazione dimensione text
  7902.     public Integer getFontWidth(String text){
  7903.         return getFontWidth(text, this.getDefaultFont());
  7904.     }
  7905.    
  7906.     public Integer getFontWidth(String text, int fontSize){
  7907.         Font defaultFont2 = this.getDefaultFont();
  7908.         return getFontWidth(text, defaultFont2.getFontName(), defaultFont2.getStyle(), fontSize);
  7909.     }
  7910.    
  7911.     public Integer getFontWidth(String text, int fontStyle, int fontSize){
  7912.         Font defaultFont2 = this.getDefaultFont();
  7913.         return getFontWidth(text, defaultFont2.getFontName(), fontStyle, fontSize);
  7914.     }

  7915.     public Integer getFontWidth(String text, String fontName, int fontStyle, int fontSize){
  7916.         Font fontToCheck = new Font(fontName,  fontStyle , fontSize);
  7917.         return getFontWidth(text, fontToCheck);
  7918.     }


  7919.     public Integer getFontWidth(String text, Font fontToCheck){
  7920.         if(this.fontRenderContext == null){
  7921.             if(this.affineTransform == null)
  7922.                 this.affineTransform = new AffineTransform();

  7923.             this.fontRenderContext = new FontRenderContext(this.affineTransform,true,true);
  7924.         }

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

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

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

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

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


  8675.     protected void activeBYOK(DriverControlStationDB driver, boolean wrap, boolean unwrap) throws UtilsException{
  8676.         DriverBYOK driverBYOK = this.driverBYOKUtilities.getDriverBYOKManagerNode(wrap, unwrap);
  8677.         if(driverBYOK!=null && driver.getDriverConfigurazioneDB() instanceof IDriverBYOKConfig) {
  8678.             IDriverBYOKConfig c = driver.getDriverConfigurazioneDB();
  8679.             c.initialize(driverBYOK, wrap, unwrap);
  8680.         }
  8681.         if(driverBYOK!=null && driver.getDriverRegistroServiziDB() instanceof IDriverBYOKConfig) {
  8682.             IDriverBYOKConfig c = driver.getDriverRegistroServiziDB();
  8683.             c.initialize(driverBYOK, wrap, unwrap);
  8684.         }
  8685.     }
  8686.        
  8687. }