PorteApplicativeConnettoriMultipliConfigAzioniChange.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.servlet.pa;

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

  24. import javax.servlet.http.HttpServletRequest;
  25. import javax.servlet.http.HttpServletResponse;
  26. import javax.servlet.http.HttpSession;

  27. import org.apache.struts.action.Action;
  28. import org.apache.struts.action.ActionForm;
  29. import org.apache.struts.action.ActionForward;
  30. import org.apache.struts.action.ActionMapping;
  31. import org.openspcoop2.core.config.PortaApplicativa;
  32. import org.openspcoop2.core.config.PortaApplicativaServizioApplicativo;
  33. import org.openspcoop2.core.registry.AccordoServizioParteSpecifica;
  34. import org.openspcoop2.core.registry.beans.AccordoServizioParteComuneSintetico;
  35. import org.openspcoop2.core.registry.driver.IDAccordoFactory;
  36. import org.openspcoop2.message.constants.ServiceBinding;
  37. import org.openspcoop2.pdd.core.behaviour.conditional.ConfigurazioneSelettoreCondizioneRegola;
  38. import org.openspcoop2.web.ctrlstat.core.ControlStationCore;
  39. import org.openspcoop2.web.ctrlstat.core.ConsoleSearch;
  40. import org.openspcoop2.web.ctrlstat.costanti.CostantiControlStation;
  41. import org.openspcoop2.web.ctrlstat.servlet.GeneralHelper;
  42. import org.openspcoop2.web.ctrlstat.servlet.apc.AccordiServizioParteComuneCore;
  43. import org.openspcoop2.web.ctrlstat.servlet.aps.AccordiServizioParteSpecificaCore;
  44. import org.openspcoop2.web.ctrlstat.servlet.aps.erogazioni.ErogazioniCostanti;
  45. import org.openspcoop2.web.ctrlstat.servlet.soggetti.SoggettiCore;
  46. import org.openspcoop2.web.lib.mvc.Costanti;
  47. import org.openspcoop2.web.lib.mvc.DataElement;
  48. import org.openspcoop2.web.lib.mvc.ForwardParams;
  49. import org.openspcoop2.web.lib.mvc.GeneralData;
  50. import org.openspcoop2.web.lib.mvc.PageData;
  51. import org.openspcoop2.web.lib.mvc.Parameter;
  52. import org.openspcoop2.web.lib.mvc.ServletUtils;
  53. import org.openspcoop2.web.lib.mvc.TipoOperazione;

  54. /**
  55.  * PorteApplicativeConnettoriMultipliConfigAzioniChange
  56.  *
  57.  * @author Andrea Poli (apoli@link.it)
  58.  * @author Giuliano Pintori (pintori@link.it)
  59.  * @author $Author$
  60.  * @version $Rev$, $Date$
  61.  *
  62.  */
  63. public final class PorteApplicativeConnettoriMultipliConfigAzioniChange extends Action {

  64.     @Override
  65.     public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {

  66.         HttpSession session = request.getSession(true);

  67.         // Inizializzo PageData
  68.         PageData pd = new PageData();

  69.         GeneralHelper generalHelper = new GeneralHelper(session);

  70.         // Inizializzo GeneralData
  71.         GeneralData gd = generalHelper.initGeneralData(request);

  72.         try {
  73.             PorteApplicativeHelper porteApplicativeHelper = new PorteApplicativeHelper(request, pd, session);
  74.             // prelevo il flag che mi dice da quale pagina ho acceduto la sezione delle porte applicative
  75.             Integer parentPA = ServletUtils.getIntegerAttributeFromSession(PorteApplicativeCostanti.ATTRIBUTO_PORTE_APPLICATIVE_PARENT, session, request);
  76.             if(parentPA == null) parentPA = PorteApplicativeCostanti.ATTRIBUTO_PORTE_APPLICATIVE_PARENT_NONE;
  77.            
  78.             String idPorta = porteApplicativeHelper.getParameter(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_ID);
  79.             int idInt = Integer.parseInt(idPorta);
  80.             String idsogg = porteApplicativeHelper.getParameter(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_ID_SOGGETTO);
  81.             String oldNome = porteApplicativeHelper.getParameter(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_AZIONI_OLD_NOME);
  82.             String nome = porteApplicativeHelper.getParameter(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_AZIONI_NOME);
  83.             String patternOperazione = porteApplicativeHelper.getParameter(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_AZIONI_PATTERN_OPERAZIONE);
  84.             String identificazioneCondizionale = porteApplicativeHelper.getParameter(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_AZIONI_IDENTIFICAZIONE_CONDIZIONALE);
  85.             String identificazioneCondizionalePattern = porteApplicativeHelper.getParameter(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_AZIONI_IDENTIFICAZIONE_CONDIZIONALE_PATTERN);
  86.             String identificazioneCondizionalePrefisso = porteApplicativeHelper.getParameter(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_AZIONI_IDENTIFICAZIONE_CONDIZIONALE_PREFISSO);
  87.             String identificazioneCondizionaleSuffisso = porteApplicativeHelper.getParameter(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_AZIONI_IDENTIFICAZIONE_CONDIZIONALE_SUFFISSO);
  88.             String idAsps = porteApplicativeHelper.getParameter(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_ID_ASPS);
  89.             if(idAsps == null)
  90.                 idAsps = "";
  91.            
  92.             PorteApplicativeCore porteApplicativeCore = new PorteApplicativeCore();
  93.             AccordiServizioParteSpecificaCore apsCore = new AccordiServizioParteSpecificaCore(porteApplicativeCore);
  94.             AccordiServizioParteComuneCore apcCore = new AccordiServizioParteComuneCore(porteApplicativeCore);
  95.             SoggettiCore soggettiCore = new SoggettiCore(porteApplicativeCore);
  96.            
  97.             // Preparo il menu
  98.             porteApplicativeHelper.makeMenu();

  99.             // Prendo nome della porta applicativa
  100.             PortaApplicativa pa = porteApplicativeCore.getPortaApplicativa(idInt);
  101.             String nomePorta = pa.getNome();
  102.             String protocollo = soggettiCore.getProtocolloAssociatoTipoSoggetto(pa.getTipoSoggettoProprietario());
  103.            
  104.             long idAspsLong = Long.parseLong(idAsps);
  105.             AccordoServizioParteSpecifica asps = apsCore.getAccordoServizioParteSpecifica(idAspsLong);
  106.             AccordoServizioParteComuneSintetico as = null;
  107.             if(porteApplicativeCore.isRegistroServiziLocale()){
  108.                 int idAcc = asps.getIdAccordo().intValue();
  109.                 as = apcCore.getAccordoServizioSintetico(idAcc);
  110.             }
  111.             else{
  112.                 as = apcCore.getAccordoServizioSintetico(IDAccordoFactory.getInstance().getIDAccordoFromUri(asps.getAccordoServizioParteComune()));
  113.             }
  114.            
  115.             ServiceBinding serviceBinding = porteApplicativeCore.toMessageServiceBinding(as.getServiceBinding());
  116.            
  117.             String idTabP = porteApplicativeHelper.getParameter(CostantiControlStation.PARAMETRO_ID_TAB);
  118.             Parameter pIdPorta = new Parameter(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_ID, idPorta);
  119.             Parameter pNomePorta = new Parameter(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_NOME, nomePorta);
  120.             Parameter pIdSogg = new Parameter(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_ID_SOGGETTO, idsogg);
  121.             Parameter pIdAsps = new Parameter(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_ID_ASPS, idAsps);
  122.             String accessoDaAPSParametro = porteApplicativeHelper.getParameter(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_CONNETTORE_DA_LISTA_APS);
  123.             Parameter pAccessoDaAPS = new Parameter(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_CONNETTORE_DA_LISTA_APS, accessoDaAPSParametro != null ? accessoDaAPSParametro : "");
  124.             String connettoreAccessoGruppi = porteApplicativeHelper.getParameter(CostantiControlStation.PARAMETRO_VERIFICA_CONNETTORE_ACCESSO_DA_GRUPPI);
  125.             Parameter pConnettoreAccessoDaGruppi = new Parameter(CostantiControlStation.PARAMETRO_VERIFICA_CONNETTORE_ACCESSO_DA_GRUPPI, connettoreAccessoGruppi);
  126.             String connettoreRegistro = porteApplicativeHelper.getParameter(CostantiControlStation.PARAMETRO_VERIFICA_CONNETTORE_REGISTRO);
  127.             Parameter pConnettoreRegistro = new Parameter(CostantiControlStation.PARAMETRO_VERIFICA_CONNETTORE_REGISTRO, connettoreRegistro);
  128.             String connettoreAccessoCM = porteApplicativeHelper.getParameter(CostantiControlStation.PARAMETRO_VERIFICA_CONNETTORE_ACCESSO_DA_LISTA_CONNETTORI_MULTIPLI);
  129.             Parameter pConnettoreAccessoCM = new Parameter(CostantiControlStation.PARAMETRO_VERIFICA_CONNETTORE_ACCESSO_DA_LISTA_CONNETTORI_MULTIPLI, connettoreAccessoCM);
  130.            
  131.             boolean accessoDaListaAPS = false;
  132.             if(Costanti.CHECK_BOX_ENABLED_TRUE.equals(accessoDaAPSParametro)) {
  133.                 accessoDaListaAPS = true;
  134.             }
  135.            
  136.             org.openspcoop2.pdd.core.behaviour.conditional.ConfigurazioneCondizionale configurazioneCondizionale = org.openspcoop2.pdd.core.behaviour.conditional.ConditionalUtils.read(pa, ControlStationCore.getLog());
  137.            
  138.             Set<String> regoleEsistenti = configurazioneCondizionale.getRegoleOrdinate();
  139.             ConfigurazioneSelettoreCondizioneRegola oldRegola = configurazioneCondizionale.getRegola(oldNome);
  140.            
  141.             boolean selezioneConnettoreByFiltro = configurazioneCondizionale.isByFilter();
  142.             // select list connettori in caso di selezione by nome
  143.             List<String> connettoriValues = new ArrayList<>();
  144.             List<String> connettoriLabels = new ArrayList<>();
  145.             if(!selezioneConnettoreByFiltro) {
  146.                 List<PortaApplicativaServizioApplicativo> servizioApplicativoList = pa.getServizioApplicativoList();
  147.                 if(servizioApplicativoList != null) {
  148.                     for (PortaApplicativaServizioApplicativo paSA : servizioApplicativoList) {
  149.                         String nomeConnettorePaSA = porteApplicativeHelper.getLabelNomePortaApplicativaServizioApplicativo(paSA);
  150.    
  151.                         connettoriValues.add(nomeConnettorePaSA);
  152.                         connettoriLabels.add(nomeConnettorePaSA);
  153.                     }
  154.                 }
  155.             }
  156.            
  157.             String postBackElementName = porteApplicativeHelper.getPostBackElementName();
  158.             if(postBackElementName != null &&
  159.                 postBackElementName.equals(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_AZIONI_IDENTIFICAZIONE_CONDIZIONALE)) {
  160.                 identificazioneCondizionalePattern = "";
  161.                 identificazioneCondizionalePrefisso = "";
  162.                 identificazioneCondizionaleSuffisso = "";
  163.             }
  164.            
  165.             boolean isModalitaCompleta = porteApplicativeHelper.isModalitaCompleta();
  166.             Boolean vistaErogazioni = ServletUtils.getBooleanAttributeFromSession(ErogazioniCostanti.ASPS_EROGAZIONI_ATTRIBUTO_VISTA_EROGAZIONI, session, request).getValue();
  167.             // setto la barra del titolo
  168.             List<Parameter> lstParam = porteApplicativeHelper.getTitoloPA(parentPA, idsogg, idAsps);
  169.            
  170.             String labelPerPorta = null;
  171.             if(parentPA!=null && (parentPA.intValue() == PorteApplicativeCostanti.ATTRIBUTO_PORTE_APPLICATIVE_PARENT_CONFIGURAZIONE)) {
  172.                 if(accessoDaListaAPS) {
  173.                     if(!isModalitaCompleta) {
  174.                         if(vistaErogazioni != null && vistaErogazioni.booleanValue()) {
  175.                             labelPerPorta = PorteApplicativeCostanti.LABEL_PARAMETRO_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_CONFIG;
  176.                         } else {
  177.                             labelPerPorta = PorteApplicativeCostanti.LABEL_PARAMETRO_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_CONFIG_DI+
  178.                                     porteApplicativeHelper.getLabelIdServizio(asps);
  179.                         }
  180.                     }
  181.                     else {
  182.                         labelPerPorta = PorteApplicativeCostanti.LABEL_PARAMETRO_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_CONFIG;
  183.                     }
  184.                 }
  185.                 else {
  186.                     labelPerPorta = porteApplicativeCore.getLabelRegolaMappingErogazionePortaApplicativa(
  187.                             PorteApplicativeCostanti.LABEL_PARAMETRO_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_CONFIG_DI,
  188.                             PorteApplicativeCostanti.LABEL_PARAMETRO_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_CONFIG,
  189.                             pa);
  190.                 }
  191.             }
  192.             else {
  193.                 labelPerPorta = PorteApplicativeCostanti.LABEL_PARAMETRO_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_CONFIG_DI+nomePorta;
  194.             }
  195.            
  196.             if(accessoDaListaAPS) {
  197.                 lstParam.remove(lstParam.size()-1);
  198.             }
  199.            
  200.             lstParam.add(new Parameter(labelPerPorta,PorteApplicativeCostanti.SERVLET_NAME_PORTE_APPLICATIVE_CONFIGURAZIONE_CONNETTORI_MULTIPLI, pIdSogg, pIdPorta, pIdAsps,
  201.                     pAccessoDaAPS, pConnettoreAccessoDaGruppi,  pConnettoreRegistro, pConnettoreAccessoCM));
  202.            
  203.             String labelPagLista = PorteApplicativeCostanti.LABEL_PARAMETRO_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_CONFIG_AZIONI_REGOLE;
  204.            
  205.             List<Parameter> listaParametriServletProprietaCustom = new ArrayList<>();
  206.             listaParametriServletProprietaCustom.add(pIdSogg);
  207.             listaParametriServletProprietaCustom.add(pIdPorta);
  208.             listaParametriServletProprietaCustom.add(pNomePorta);
  209.             listaParametriServletProprietaCustom.add(pIdAsps);
  210.             listaParametriServletProprietaCustom.add(pAccessoDaAPS);
  211.             listaParametriServletProprietaCustom.add(pConnettoreAccessoDaGruppi);
  212.             listaParametriServletProprietaCustom.add(pConnettoreRegistro);
  213.             listaParametriServletProprietaCustom.add(pConnettoreAccessoCM);
  214.             lstParam.add(new Parameter(labelPagLista, PorteApplicativeCostanti.SERVLET_NAME_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_CONFIG_AZIONI_LIST,   listaParametriServletProprietaCustom.toArray(new Parameter[listaParametriServletProprietaCustom.size()])));
  215.            
  216.             lstParam.add(new Parameter(oldRegola.getRegola(), null));

  217.             // Se servizioApplicativohid = null, devo visualizzare la pagina per
  218.             // l'inserimento dati
  219.             if (porteApplicativeHelper.isEditModeInProgress()) {
  220.                 // setto la barra del titolo
  221.                 ServletUtils.setPageDataTitle(pd, lstParam);
  222.                
  223.                 if(nome == null) {
  224.                     nome = oldRegola.getRegola();
  225.                     patternOperazione = oldRegola.getPatternOperazione();
  226.                    
  227.                     if(oldRegola.getStaticInfo() == null) {
  228.                         identificazioneCondizionale = oldRegola.getTipoSelettore().getValue();
  229.                         identificazioneCondizionalePattern = oldRegola.getPattern();
  230.                     } else {
  231.                         identificazioneCondizionale = PorteApplicativeCostanti.VALUE_PARAMETRO_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_AZIONI_IDENTIFICAZIONE_CONDIZIONALE_STATIC_INFO;
  232.                         identificazioneCondizionalePattern = oldRegola.getStaticInfo();
  233.                     }
  234.                     identificazioneCondizionalePrefisso = oldRegola.getPrefix();
  235.                     identificazioneCondizionaleSuffisso = oldRegola.getSuffix();
  236.                 }

  237.                 // preparo i campi
  238.                 List<DataElement> dati = new ArrayList<>();
  239.                 dati.add(ServletUtils.getDataElementForEditModeFinished());

  240.                 dati = porteApplicativeHelper.addAzioneConnettoriMultipliConfigToDati(dati, TipoOperazione.CHANGE, protocollo, serviceBinding, oldNome, nome,
  241.                         patternOperazione,  selezioneConnettoreByFiltro, identificazioneCondizionale, identificazioneCondizionalePattern,
  242.                         identificazioneCondizionalePrefisso, identificazioneCondizionaleSuffisso,
  243.                         connettoriValues, connettoriLabels
  244.                         );
  245.                
  246.                 dati = porteApplicativeHelper.addHiddenFieldsToDati(TipoOperazione.CHANGE, idPorta, idsogg, idPorta,idAsps,  dati);
  247.                
  248.                 dati = porteApplicativeHelper.addInformazioniGruppiAsHiddenToDati(TipoOperazione.OTHER, dati, idTabP, null, accessoDaAPSParametro != null ? accessoDaAPSParametro : "",
  249.                         connettoreAccessoGruppi, connettoreRegistro, null);

  250.                 pd.setDati(dati);

  251.                 ServletUtils.setGeneralAndPageDataIntoSession(request, session, gd, pd);

  252.                 return ServletUtils.getStrutsForwardEditModeInProgress(mapping, PorteApplicativeCostanti.OBJECT_NAME_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_CONFIG_AZIONI,
  253.                         ForwardParams.CHANGE());
  254.             }

  255.             // Controlli sui campi immessi
  256.             boolean isOk = porteApplicativeHelper.azioneConnettoriMultipliConfigCheckData(TipoOperazione.CHANGE, serviceBinding, idPorta, oldNome, nome,
  257.                     patternOperazione,  selezioneConnettoreByFiltro, identificazioneCondizionale, identificazioneCondizionalePattern,
  258.                     identificazioneCondizionalePrefisso, identificazioneCondizionaleSuffisso, regoleEsistenti);
  259.             if (!isOk) {
  260.                
  261.                 // setto la barra del titolo
  262.                 ServletUtils.setPageDataTitle(pd, lstParam);

  263.                 // preparo i campi
  264.                 List<DataElement> dati = new ArrayList<>();

  265.                 dati.add(ServletUtils.getDataElementForEditModeFinished());
  266.                
  267.                 dati = porteApplicativeHelper.addAzioneConnettoriMultipliConfigToDati(dati, TipoOperazione.CHANGE, protocollo, serviceBinding, oldNome, nome,
  268.                         patternOperazione,  selezioneConnettoreByFiltro, identificazioneCondizionale, identificazioneCondizionalePattern,
  269.                         identificazioneCondizionalePrefisso, identificazioneCondizionaleSuffisso,
  270.                         connettoriValues, connettoriLabels
  271.                         );
  272.                
  273.                 dati = porteApplicativeHelper.addHiddenFieldsToDati(TipoOperazione.CHANGE, idPorta, idsogg, idPorta, idAsps, dati);
  274.                
  275.                 dati = porteApplicativeHelper.addInformazioniGruppiAsHiddenToDati(TipoOperazione.OTHER, dati, idTabP, null, accessoDaAPSParametro != null ? accessoDaAPSParametro : "",
  276.                         connettoreAccessoGruppi, connettoreRegistro, null);

  277.                 pd.setDati(dati);

  278.                 ServletUtils.setGeneralAndPageDataIntoSession(request, session, gd, pd);

  279.                 return ServletUtils.getStrutsForwardEditModeCheckError(mapping, PorteApplicativeCostanti.OBJECT_NAME_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_CONFIG_AZIONI,
  280.                         ForwardParams.CHANGE());
  281.             }

  282.             // Inserisco il ruolo nel db
  283.             configurazioneCondizionale = org.openspcoop2.pdd.core.behaviour.conditional.ConditionalUtils.read(pa, ControlStationCore.getLog());
  284.            
  285.             ConfigurazioneSelettoreCondizioneRegola regola = new ConfigurazioneSelettoreCondizioneRegola();
  286.            
  287.             regola.setRegola(nome);
  288.             regola.setPatternOperazione(patternOperazione);
  289.            
  290.             if(!identificazioneCondizionale.equals(PorteApplicativeCostanti.VALUE_PARAMETRO_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_AZIONI_IDENTIFICAZIONE_CONDIZIONALE_STATIC_INFO)) {
  291.                 regola.setTipoSelettore(org.openspcoop2.pdd.core.behaviour.conditional.TipoSelettore.toEnumConstant(identificazioneCondizionale));
  292.                 regola.setPattern(identificazioneCondizionalePattern);
  293.             } else {
  294.                 regola.setStaticInfo(identificazioneCondizionalePattern);
  295.             }
  296.             regola.setPrefix(identificazioneCondizionalePrefisso);
  297.             regola.setSuffix(identificazioneCondizionaleSuffisso);
  298.            
  299.             configurazioneCondizionale.removeRegola(oldNome);
  300.             configurazioneCondizionale.addRegola(regola);
  301.            
  302.             org.openspcoop2.pdd.core.behaviour.conditional.ConditionalUtils.save(pa, configurazioneCondizionale);

  303.             String userLogin = ServletUtils.getUserLoginFromSession(session);

  304.             porteApplicativeCore.performUpdateOperation(userLogin, porteApplicativeHelper.smista(), pa);

  305.             // ricarico la configurazione
  306.             pa = porteApplicativeCore.getPortaApplicativa(idInt);

  307.             configurazioneCondizionale = org.openspcoop2.pdd.core.behaviour.conditional.ConditionalUtils.read(pa, ControlStationCore.getLog());
  308.            
  309.             Set<String> lista = null;
  310.             if(configurazioneCondizionale != null) {
  311.                 lista = configurazioneCondizionale.getRegoleOrdinate();
  312.             }

  313.             // Preparo la lista
  314.             ConsoleSearch ricerca = null;
  315.                        
  316.             porteApplicativeHelper.preparePorteApplicativeConnettoriMultipliConfigAzioniList(pa, configurazioneCondizionale, ricerca, lista);

  317.             ServletUtils.setGeneralAndPageDataIntoSession(request, session, gd, pd);
  318.             // Forward control to the specified success URI
  319.             return ServletUtils.getStrutsForwardEditModeFinished(mapping, PorteApplicativeCostanti.OBJECT_NAME_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_CONFIG_AZIONI,
  320.                     ForwardParams.CHANGE());
  321.         } catch (Exception e) {
  322.             return ServletUtils.getStrutsForwardError(ControlStationCore.getLog(), e, pd, request, session, gd, mapping,
  323.                     PorteApplicativeCostanti.OBJECT_NAME_PORTE_APPLICATIVE_CONNETTORI_MULTIPLI_CONFIG_AZIONI,
  324.                     ForwardParams.CHANGE());
  325.         }
  326.     }
  327.    
  328. }