PorteDelegateTrasformazioniServizioApplicativoAdd.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.pd;

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

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

  26. import org.apache.commons.lang.StringUtils;
  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.commons.Liste;
  32. import org.openspcoop2.core.config.PortaDelegata;
  33. import org.openspcoop2.core.config.TrasformazioneRegola;
  34. import org.openspcoop2.core.config.TrasformazioneRegolaApplicabilitaRichiesta;
  35. import org.openspcoop2.core.config.TrasformazioneRegolaApplicabilitaServizioApplicativo;
  36. import org.openspcoop2.core.config.Trasformazioni;
  37. import org.openspcoop2.core.config.constants.CredenzialeTipo;
  38. import org.openspcoop2.core.config.driver.db.IDServizioApplicativoDB;
  39. import org.openspcoop2.core.id.IDSoggetto;
  40. import org.openspcoop2.web.ctrlstat.core.ControlStationCore;
  41. import org.openspcoop2.web.ctrlstat.core.ConsoleSearch;
  42. import org.openspcoop2.web.ctrlstat.costanti.CostantiControlStation;
  43. import org.openspcoop2.web.ctrlstat.servlet.ApiKeyState;
  44. import org.openspcoop2.web.ctrlstat.servlet.GeneralHelper;
  45. import org.openspcoop2.web.ctrlstat.servlet.pa.PorteApplicativeCostanti;
  46. import org.openspcoop2.web.ctrlstat.servlet.sa.ServiziApplicativiCore;
  47. import org.openspcoop2.web.ctrlstat.servlet.sa.ServiziApplicativiCostanti;
  48. import org.openspcoop2.web.ctrlstat.servlet.soggetti.SoggettiCore;
  49. import org.openspcoop2.web.lib.mvc.DataElement;
  50. import org.openspcoop2.web.lib.mvc.ForwardParams;
  51. import org.openspcoop2.web.lib.mvc.GeneralData;
  52. import org.openspcoop2.web.lib.mvc.PageData;
  53. import org.openspcoop2.web.lib.mvc.Parameter;
  54. import org.openspcoop2.web.lib.mvc.ServletUtils;
  55. import org.openspcoop2.web.lib.mvc.TipoOperazione;

  56. /**
  57.  * porteDelegateServizioApplicativoAdd
  58.  *
  59.  * @author Andrea Poli (apoli@link.it)
  60.  * @author Stefano Corallo (corallo@link.it)
  61.  * @author Sandra Giangrandi (sandra@link.it)
  62.  * @author $Author$
  63.  * @version $Rev$, $Date$
  64.  *
  65.  */
  66. public final class PorteDelegateTrasformazioniServizioApplicativoAdd extends Action {

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

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

  70.         // Inizializzo PageData
  71.         PageData pd = new PageData();

  72.         GeneralHelper generalHelper = new GeneralHelper(session);

  73.         // Inizializzo GeneralData
  74.         GeneralData gd = generalHelper.initGeneralData(request);

  75.         try {
  76.             PorteDelegateHelper porteDelegateHelper = new PorteDelegateHelper(request, pd, session);
  77.             String idPorta = porteDelegateHelper.getParameter(PorteDelegateCostanti.PARAMETRO_PORTE_DELEGATE_ID);
  78.             int idInt = Integer.parseInt(idPorta);
  79.             String idsogg = porteDelegateHelper.getParameter(PorteDelegateCostanti.PARAMETRO_PORTE_DELEGATE_ID_SOGGETTO);
  80.             int soggInt = Integer.parseInt(idsogg);
  81.             String servizioApplicativo = porteDelegateHelper.getParameter(PorteDelegateCostanti.PARAMETRO_PORTE_DELEGATE_TRASFORMAZIONI_SERVIZIO_APPLICATIVO);

  82.             String idAsps = porteDelegateHelper.getParameter(PorteDelegateCostanti.PARAMETRO_PORTE_DELEGATE_ID_ASPS);
  83.             if(idAsps == null)
  84.                 idAsps = "";
  85.            
  86.             String idFruizione = porteDelegateHelper.getParameter(PorteDelegateCostanti.PARAMETRO_PORTE_DELEGATE_ID_FRUIZIONE);
  87.             if(idFruizione == null)
  88.                 idFruizione = "";
  89.            
  90.             String idTrasformazioneS = porteDelegateHelper.getParameter(PorteDelegateCostanti.PARAMETRO_PORTE_DELEGATE_ID_TRASFORMAZIONE);
  91.             long idTrasformazione = Long.parseLong(idTrasformazioneS);
  92.            
  93.             String listaTmp = porteDelegateHelper.getParameter(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_TRASFORMAZIONI_APPLICABILITA_LIST);
  94.             boolean fromList = false;
  95.             if(listaTmp != null && !"".equals(listaTmp))
  96.                 fromList = true;
  97.            
  98.             // prelevo il flag che mi dice da quale pagina ho acceduto la sezione delle porte delegate
  99.             Integer parentPD = ServletUtils.getIntegerAttributeFromSession(PorteDelegateCostanti.ATTRIBUTO_PORTE_DELEGATE_PARENT, session, request);
  100.             if(parentPD == null) parentPD = PorteDelegateCostanti.ATTRIBUTO_PORTE_DELEGATE_PARENT_NONE;
  101.            
  102.             // Preparo il menu
  103.             porteDelegateHelper.makeMenu();

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

  105.            
  106.             // Prendo nome, tipo e pdd del soggetto
  107.             PorteDelegateCore porteDelegateCore = new PorteDelegateCore();
  108.             SoggettiCore soggettiCore = new SoggettiCore(porteDelegateCore);
  109.             ServiziApplicativiCore saCore = new ServiziApplicativiCore(porteDelegateCore);
  110.            
  111.             boolean escludiSAServer = saCore.isApplicativiServerEnabled(porteDelegateHelper);
  112.             String filtroTipoSA = escludiSAServer ? ServiziApplicativiCostanti.VALUE_SERVIZI_APPLICATIVI_TIPO_CLIENT : null;
  113.            
  114.             IDSoggetto idSoggetto = null;
  115.             if(porteDelegateCore.isRegistroServiziLocale()){
  116.                 org.openspcoop2.core.registry.Soggetto soggetto = soggettiCore.getSoggettoRegistro(soggInt);
  117.                 idSoggetto = new IDSoggetto(soggetto.getTipo(),soggetto.getNome());
  118.             }
  119.             else{
  120.                 org.openspcoop2.core.config.Soggetto soggetto = soggettiCore.getSoggetto(soggInt);
  121.                 idSoggetto = new IDSoggetto(soggetto.getTipo(),soggetto.getNome());
  122.             }

  123.             // Prendo nome della porta delegata
  124.             PortaDelegata portaDelegata = porteDelegateCore.getPortaDelegata(idInt);
  125.             CredenzialeTipo tipoAutenticazione = CredenzialeTipo.toEnumConstant(portaDelegata.getAutenticazione());
  126.             Boolean appId = null;
  127.             String tokenPolicy = null;
  128.             boolean tokenPolicyOR = false;
  129.             if(CredenzialeTipo.APIKEY.equals(tipoAutenticazione)) {
  130.                 ApiKeyState apiKeyState =  new ApiKeyState(porteDelegateCore.getParametroAutenticazione(portaDelegata.getAutenticazione(), portaDelegata.getProprietaAutenticazioneList()));
  131.                 appId = apiKeyState.appIdSelected;
  132.             }
  133.             if(portaDelegata.getGestioneToken()!=null && portaDelegata.getGestioneToken().getPolicy()!=null) {
  134.                 tokenPolicy = portaDelegata.getGestioneToken().getPolicy();
  135.                 if(tokenPolicy!=null && !"".equals(tokenPolicy)) {
  136.                     if(tipoAutenticazione!=null && !CredenzialeTipo.TOKEN.equals(tipoAutenticazione)) {
  137.                         tokenPolicyOR = true;
  138.                     }
  139.                     else {
  140.                         tipoAutenticazione = CredenzialeTipo.TOKEN;
  141.                     }
  142.                 }
  143.             }
  144.             String nomePorta = portaDelegata.getNome();
  145.            
  146.             Trasformazioni trasformazioni = portaDelegata.getTrasformazioni();
  147.             TrasformazioneRegola regola = null;
  148.             for (int j = 0; j < trasformazioni.sizeRegolaList(); j++) {
  149.                 TrasformazioneRegola regolaTmp = trasformazioni.getRegola(j);
  150.                 if (regolaTmp.getId().longValue() == idTrasformazione) {
  151.                     regola = regolaTmp;
  152.                     break;
  153.                 }
  154.             }
  155.             if(regola==null) {
  156.                 throw new Exception("TrasformazioneRegola con id '"+idTrasformazione+"' non trovata");
  157.             }
  158.            
  159.             String nomeTrasformazione = regola.getNome();
  160.             Parameter pIdTrasformazione = new Parameter(PorteDelegateCostanti.PARAMETRO_PORTE_DELEGATE_ID_TRASFORMAZIONE, idTrasformazione+"");

  161.             Parameter pId = new Parameter(PorteDelegateCostanti.PARAMETRO_PORTE_DELEGATE_ID, idPorta);
  162.             Parameter pIdSoggetto = new Parameter(PorteDelegateCostanti.PARAMETRO_PORTE_DELEGATE_ID_SOGGETTO, idsogg);
  163.             Parameter pIdAsps = new Parameter(PorteDelegateCostanti.PARAMETRO_PORTE_DELEGATE_ID_ASPS, idAsps);
  164.             Parameter pIdFruizione = new Parameter(PorteDelegateCostanti.PARAMETRO_PORTE_DELEGATE_ID_FRUIZIONE, idFruizione);
  165.                        
  166.             List<Parameter> lstParam = porteDelegateHelper.getTitoloPD(parentPD, idsogg, idAsps, idFruizione);
  167.            
  168.             String labelPerPorta = null;
  169.             if(parentPD!=null && (parentPD.intValue() == PorteDelegateCostanti.ATTRIBUTO_PORTE_DELEGATE_PARENT_CONFIGURAZIONE)) {
  170.                 labelPerPorta = porteDelegateCore.getLabelRegolaMappingFruizionePortaDelegata(
  171.                         PorteDelegateCostanti.LABEL_PARAMETRO_PORTE_DELEGATE_TRASFORMAZIONI_DI,
  172.                         PorteDelegateCostanti.LABEL_PARAMETRO_PORTE_DELEGATE_TRASFORMAZIONI,
  173.                         portaDelegata);
  174.             }
  175.             else {
  176.                 labelPerPorta = PorteDelegateCostanti.LABEL_PARAMETRO_PORTE_DELEGATE_TRASFORMAZIONI_DI+nomePorta;
  177.             }

  178.             lstParam.add(new Parameter(labelPerPorta, PorteDelegateCostanti.SERVLET_NAME_PORTE_DELEGATE_TRASFORMAZIONI_LIST, pId, pIdSoggetto, pIdAsps, pIdFruizione));
  179.            
  180.             if(!fromList) {
  181.                 lstParam.add(new Parameter(nomeTrasformazione, PorteDelegateCostanti.SERVLET_NAME_PORTE_DELEGATE_TRASFORMAZIONI_CHANGE,
  182.                         pId, pIdSoggetto, pIdAsps, pIdFruizione, pIdTrasformazione));
  183.             }
  184.            
  185.             String labelPagLista = PorteDelegateCostanti.LABEL_PARAMETRO_PORTE_DELEGATE_TRASFORMAZIONI_SERVIZIO_APPLICATIVO_CONFIG;
  186.             if(!porteDelegateHelper.isModalitaCompleta()) {
  187.                 labelPagLista = PorteDelegateCostanti.LABEL_PARAMETRO_PORTE_DELEGATE_TRASFORMAZIONI_APPLICATIVO_CONFIG;
  188.             }
  189.            
  190.             List<Parameter> parametersList = new ArrayList<>();
  191.             parametersList.add(pId);
  192.             parametersList.add(pIdSoggetto);
  193.             parametersList.add(pIdAsps);
  194.             parametersList.add(pIdFruizione);
  195.             parametersList.add(pIdTrasformazione);
  196.             if(fromList) {
  197.                 parametersList.add(new Parameter (PorteDelegateCostanti.PARAMETRO_PORTE_DELEGATE_TRASFORMAZIONI_APPLICABILITA_LIST, listaTmp));
  198.             }
  199.             lstParam.add(new Parameter(labelPagLista,
  200.                     PorteDelegateCostanti.SERVLET_NAME_PORTE_DELEGATE_TRASFORMAZIONI_SERVIZIO_APPLICATIVO_LIST,parametersList));
  201.             lstParam.add(ServletUtils.getParameterAggiungi());
  202.            
  203.             // Se servizioApplicativohid = null, devo visualizzare la pagina per
  204.             // l'inserimento dati
  205.             if( porteDelegateHelper.isEditModeInProgress()){
  206.                 // setto la barra del titolo
  207.                 ServletUtils.setPageDataTitle(pd, lstParam);

  208.                 // preparo i campi
  209.                 List<DataElement> dati = new ArrayList<>();
  210.                
  211.                 dati.add(ServletUtils.getDataElementForEditModeFinished());

  212.                 TrasformazioneRegolaApplicabilitaRichiesta applicabilita = regola.getApplicabilita();
  213.                
  214.                 // Prendo la lista di servizioApplicativo associati al soggetto
  215.                 // e la metto in un array
  216.                 List<String> silV = new ArrayList<>();
  217.                 boolean bothSslAndToken = false;
  218.                 List<IDServizioApplicativoDB> oldSilList = saCore.soggettiServizioApplicativoList(idSoggetto,userLogin,tipoAutenticazione,appId,
  219.                         filtroTipoSA,
  220.                         bothSslAndToken, tokenPolicy, tokenPolicyOR);
  221.                 for (int i = 0; i < oldSilList.size(); i++) {
  222.                     IDServizioApplicativoDB singleSA = oldSilList.get(i);
  223.                     String tmpNome = singleSA.getNome();
  224.                     boolean trovatoSA = false;
  225.                     if(applicabilita != null) {
  226.                         for (int j = 0; j < applicabilita.sizeServizioApplicativoList(); j++) {
  227.                             TrasformazioneRegolaApplicabilitaServizioApplicativo tmpSA = applicabilita.getServizioApplicativo(j);
  228.                             if (tmpNome.equals(tmpSA.getNome())) {
  229.                                 trovatoSA = true;
  230.                                 break;
  231.                             }
  232.                         }
  233.                     }
  234.                     if (!trovatoSA)
  235.                         silV.add(tmpNome);
  236.                 }
  237.                 String[] servizioApplicativoList = null;
  238.                 if (!silV.isEmpty()) {
  239.                     servizioApplicativoList = new String[silV.size()];
  240.                     for (int j = 0; j < silV.size(); j++)
  241.                         servizioApplicativoList[j] = silV.get(j);
  242.                 }

  243.                 dati = porteDelegateHelper.addPorteTrasformazioniServizioApplicativoToDati(TipoOperazione.ADD,dati, idTrasformazioneS, fromList, "", servizioApplicativoList, oldSilList.size(),true, true);

  244.                 dati = porteDelegateHelper.addHiddenFieldsToDati(TipoOperazione.ADD, idPorta, idsogg, null, idAsps,
  245.                         idFruizione, portaDelegata.getTipoSoggettoProprietario(), portaDelegata.getNomeSoggettoProprietario(), dati);

  246.                 pd.setDati(dati);

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

  248.                 return ServletUtils.getStrutsForwardEditModeInProgress(mapping,
  249.                         PorteDelegateCostanti.OBJECT_NAME_PORTE_DELEGATE_TRASFORMAZIONI_SERVIZIO_APPLICATIVO, ForwardParams.ADD());

  250.             }

  251.             // Controlli sui campi immessi
  252.             boolean isOk = porteDelegateHelper.porteDelegateTrasformazioniServizioApplicativoCheckData(TipoOperazione.ADD);

  253.             TrasformazioneRegolaApplicabilitaServizioApplicativo sa = new TrasformazioneRegolaApplicabilitaServizioApplicativo();
  254.             sa.setNome(servizioApplicativo);
  255.             sa.setTipoSoggettoProprietario(portaDelegata.getTipoSoggettoProprietario());
  256.             sa.setNomeSoggettoProprietario(portaDelegata.getNomeSoggettoProprietario());
  257.            
  258.             if(isOk) {
  259.                
  260.                 List<TrasformazioneRegolaApplicabilitaServizioApplicativo> sacheckList = new ArrayList<>();
  261.                 sacheckList.add(sa);
  262.                
  263.                 String patternDBCheck = (regola.getApplicabilita() != null && StringUtils.isNotEmpty(regola.getApplicabilita().getPattern())) ? regola.getApplicabilita().getPattern() : null;
  264.                 String contentTypeAsString = (regola.getApplicabilita() != null &&regola.getApplicabilita().getContentTypeList() != null) ? StringUtils.join(regola.getApplicabilita().getContentTypeList(), ",") : "";
  265.                 String contentTypeDBCheck = StringUtils.isNotEmpty(contentTypeAsString) ? contentTypeAsString : null;
  266.                 String azioniAsString = (regola.getApplicabilita() != null && regola.getApplicabilita().getAzioneList() != null) ? StringUtils.join(regola.getApplicabilita().getAzioneList(), ",") : "";
  267.                 String azioniDBCheck = StringUtils.isNotEmpty(azioniAsString) ? azioniAsString : null;
  268.                 String connettoriAsString = (regola.getApplicabilita() != null && regola.getApplicabilita().getConnettoreList() != null) ? StringUtils.join(regola.getApplicabilita().getConnettoreList(), ",") : "";
  269.                 String connettoriDBCheck = StringUtils.isNotEmpty(connettoriAsString) ? connettoriAsString : null;
  270.                 TrasformazioneRegola trasformazioneDBCheckCriteri = porteDelegateCore.getTrasformazione(Long.parseLong(idPorta), azioniDBCheck, patternDBCheck, contentTypeDBCheck, connettoriDBCheck,
  271.                         sacheckList);
  272.                 if(trasformazioneDBCheckCriteri!=null) {
  273.                     isOk = false;
  274.                     pd.setMessage(CostantiControlStation.MESSAGGIO_ERRORE_REGOLA_TRASFORMAZIONE_APPLICABILITA_DUPLICATA_APPLICATIVO);
  275.                 }
  276.                
  277.             }
  278.             if (!isOk) {
  279.                 // setto la barra del titolo
  280.                 ServletUtils.setPageDataTitle(pd, lstParam);

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

  283.                 dati.add(ServletUtils.getDataElementForEditModeFinished());
  284.                
  285.                 TrasformazioneRegolaApplicabilitaRichiesta applicabilita = regola.getApplicabilita();
  286.                 // Prendo la lista di servizioApplicativo (tranne quelli giĆ 
  287.                 // usati) e la metto in un array
  288.                 List<String> silV = new ArrayList<>();
  289.                 boolean bothSslAndToken = false;
  290.                 List<IDServizioApplicativoDB> oldSilList = saCore.soggettiServizioApplicativoList(idSoggetto,userLogin,tipoAutenticazione,appId,
  291.                         filtroTipoSA,
  292.                         bothSslAndToken, tokenPolicy, tokenPolicyOR);
  293.                 for (int i = 0; i < oldSilList.size(); i++) {
  294.                     IDServizioApplicativoDB singleSA = oldSilList.get(i);
  295.                     String tmpNome = singleSA.getNome();
  296.                     boolean trovatoSA = false;
  297.                     if(applicabilita != null) {
  298.                         for (int j = 0; j < applicabilita.sizeServizioApplicativoList(); j++) {
  299.                             TrasformazioneRegolaApplicabilitaServizioApplicativo tmpSA = applicabilita.getServizioApplicativo(j);
  300.                             if (tmpNome.equals(tmpSA.getNome())) {
  301.                                 trovatoSA = true;
  302.                                 break;
  303.                             }
  304.                         }
  305.                     }
  306.                     if (!trovatoSA)
  307.                         silV.add(tmpNome);
  308.                 }
  309.                 String[] servizioApplicativoList = null;
  310.                 if (!silV.isEmpty()) {
  311.                     servizioApplicativoList = new String[silV.size()];
  312.                     for (int j = 0; j < silV.size(); j++)
  313.                         servizioApplicativoList[j] = silV.get(j);
  314.                 }

  315.                 dati = porteDelegateHelper.addPorteTrasformazioniServizioApplicativoToDati(TipoOperazione.ADD, dati, idTrasformazioneS, fromList, servizioApplicativo, servizioApplicativoList, oldSilList.size(),true, true);

  316.                 dati = porteDelegateHelper.addHiddenFieldsToDati(TipoOperazione.ADD, idPorta, idsogg, null, idAsps,
  317.                         idFruizione, portaDelegata.getTipoSoggettoProprietario(), portaDelegata.getNomeSoggettoProprietario(), dati);
  318.  
  319.                 pd.setDati(dati);

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

  321.                 return ServletUtils.getStrutsForwardEditModeCheckError(mapping,
  322.                         PorteDelegateCostanti.OBJECT_NAME_PORTE_DELEGATE_TRASFORMAZIONI_SERVIZIO_APPLICATIVO,
  323.                         ForwardParams.ADD());
  324.             }

  325.             // salvataggio nuova regola
  326.             for (int j = 0; j < trasformazioni.sizeRegolaList(); j++) {
  327.                 TrasformazioneRegola regolaTmp = trasformazioni.getRegola(j);
  328.                 if (regolaTmp.getId().longValue() == idTrasformazione) {
  329.                     regola = regolaTmp;
  330.                     break;
  331.                 }
  332.             }
  333.                        
  334.             // Inserisco il servizioApplicativo nel db          
  335.             if(regola.getApplicabilita() == null)
  336.                 regola.setApplicabilita(new TrasformazioneRegolaApplicabilitaRichiesta());
  337.            
  338.             regola.getApplicabilita().addServizioApplicativo(sa);

  339.             porteDelegateCore.performUpdateOperation(userLogin, porteDelegateHelper.smista(), portaDelegata);
  340.            
  341.             // ricaricare id trasformazione
  342.             portaDelegata = porteDelegateCore.getPortaDelegata(Long.parseLong(idPorta));

  343.             TrasformazioneRegola trasformazioneAggiornata = porteDelegateCore.getTrasformazione(Long.parseLong(idPorta), regola.getNome());

  344.             // Preparo la lista
  345.             ConsoleSearch ricerca = (ConsoleSearch) ServletUtils.getSearchObjectFromSession(request, session, ConsoleSearch.class);
  346.            
  347.             int idLista = Liste.PORTE_DELEGATE_TRASFORMAZIONI_SERVIZIO_APPLICATIVO;

  348.             ricerca = porteDelegateHelper.checkSearchParameters(idLista, ricerca);
  349.            
  350.             List<TrasformazioneRegolaApplicabilitaServizioApplicativo> lista = porteDelegateCore.porteDelegateTrasformazioniServiziApplicativiAutorizzatiList(Long.parseLong(idPorta), trasformazioneAggiornata.getId(), ricerca);

  351.             porteDelegateHelper.preparePorteDelegateTrasformazioniServizioApplicativoList(portaDelegata.getNome(), trasformazioneAggiornata.getId(), ricerca, lista);

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

  353.             // Forward control to the specified success URI
  354.             return ServletUtils.getStrutsForwardEditModeFinished(mapping, PorteDelegateCostanti.OBJECT_NAME_PORTE_DELEGATE_TRASFORMAZIONI_SERVIZIO_APPLICATIVO,
  355.                     ForwardParams.ADD());
  356.         } catch (Exception e) {
  357.             return ServletUtils.getStrutsForwardError(ControlStationCore.getLog(), e, pd, request, session, gd, mapping,
  358.                     PorteDelegateCostanti.OBJECT_NAME_PORTE_DELEGATE_TRASFORMAZIONI_SERVIZIO_APPLICATIVO,
  359.                     ForwardParams.ADD());
  360.         }  
  361.     }


  362. }