ConnettoreCustomUtils.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.connettori;

  21. import java.util.List;

  22. import org.openspcoop2.web.ctrlstat.servlet.aps.AccordiServizioParteSpecificaCostanti;
  23. import org.openspcoop2.web.ctrlstat.servlet.pa.PorteApplicativeCostanti;
  24. import org.openspcoop2.web.lib.mvc.DataElement;
  25. import org.openspcoop2.web.lib.mvc.DataElementType;

  26. /**
  27.  * ConnettoreCustomUtils
  28.  *
  29.  * @author Andrea Poli (apoli@link.it)
  30.  * @author $Author$
  31.  * @version $Rev$, $Date$
  32.  */
  33. public class ConnettoreCustomUtils {
  34.    
  35.     private ConnettoreCustomUtils() {}

  36.     public static void addProprietaConnettoriCustom(List<DataElement> dati,
  37.             String nome, String valore,
  38.             String servlet, String id, String nomeprov, String tipoprov,String nomeservizio,String tiposervizio, String versioneservizio,
  39.             String myId, String correlato, String idSoggErogatore, String nomeservizioApplicativo,String idsil,String tipoAccordo,
  40.             String provider, String accessoDaAPSParametro, String idPorta, String azioneConnettoreIdPorta)  {
  41.        
  42.         DataElement de = new DataElement();
  43.         de.setType(DataElementType.TITLE);
  44.         de.setLabel(ConnettoriCostanti.LABEL_SEZIONE_CONNETTORE_CUSTOM_PROPRIETA);
  45.         dati.add(de);
  46.        
  47.         de = new DataElement();
  48.         de.setLabel(ConnettoriCostanti.LABEL_PARAMETRO_CONNETTORE_CUSTOM_NOME);
  49.         de.setType(DataElementType.TEXT_EDIT);
  50.         de.setName(ConnettoriCostanti.PARAMETRO_CONNETTORE_CUSTOM_NOME);
  51.         de.setSize(50);
  52.         if (nome == null)
  53.             de.setValue("");
  54.         else
  55.             de.setValue(nome);
  56.         de.setRequired(true);
  57.         dati.add(de);

  58.         de = new DataElement();
  59.         de.setLabel(ConnettoriCostanti.LABEL_PARAMETRO_CONNETTORE_CUSTOM_VALORE);
  60.         de.setType(DataElementType.TEXT_EDIT);
  61.         de.setName(ConnettoriCostanti.PARAMETRO_CONNETTORE_CUSTOM_VALORE);
  62.         de.setSize(50);
  63.         if (valore == null)
  64.             de.setValue("");
  65.         else
  66.             de.setValue(valore);
  67.         de.setRequired(true);
  68.         dati.add(de);

  69.         de = new DataElement();
  70.         de.setValue(servlet);
  71.         de.setType(DataElementType.HIDDEN);
  72.         de.setName(ConnettoriCostanti.PARAMETRO_CONNETTORE_CUSTOM_SERVLET);
  73.         dati.add(de);

  74.         de = new DataElement();
  75.         de.setValue(id);
  76.         de.setType(DataElementType.HIDDEN);
  77.         de.setName(ConnettoriCostanti.PARAMETRO_CONNETTORE_CUSTOM_ID);
  78.         dati.add(de);

  79.         de = new DataElement();
  80.         de.setValue(nomeprov);
  81.         de.setType(DataElementType.HIDDEN);
  82.         de.setName(ConnettoriCostanti.PARAMETRO_CONNETTORE_CUSTOM_NOME_SOGGETTO);
  83.         dati.add(de);

  84.         de = new DataElement();
  85.         de.setValue(tipoprov);
  86.         de.setType(DataElementType.HIDDEN);
  87.         de.setName(ConnettoriCostanti.PARAMETRO_CONNETTORE_CUSTOM_TIPO_SOGGETTO);
  88.         dati.add(de);

  89.         de = new DataElement();
  90.         de.setValue(nomeservizio);
  91.         de.setType(DataElementType.HIDDEN);
  92.         de.setName(ConnettoriCostanti.PARAMETRO_CONNETTORE_CUSTOM_NOME_SERVIZIO);
  93.         dati.add(de);

  94.         de = new DataElement();
  95.         de.setValue(tiposervizio);
  96.         de.setType(DataElementType.HIDDEN);
  97.         de.setName(ConnettoriCostanti.PARAMETRO_CONNETTORE_CUSTOM_TIPO_SERVIZIO);
  98.         dati.add(de);
  99.        
  100.         de = new DataElement();
  101.         de.setValue(versioneservizio);
  102.         de.setType(DataElementType.HIDDEN);
  103.         de.setName(ConnettoriCostanti.PARAMETRO_CONNETTORE_CUSTOM_VERSIONE_SERVIZIO);
  104.         dati.add(de);

  105.         de = new DataElement();
  106.         de.setValue(myId);
  107.         de.setType(DataElementType.HIDDEN);
  108.         de.setName(ConnettoriCostanti.PARAMETRO_CONNETTORE_CUSTOM_MY_ID);
  109.         dati.add(de);

  110.         de = new DataElement();
  111.         de.setValue(correlato);
  112.         de.setType(DataElementType.HIDDEN);
  113.         de.setName(ConnettoriCostanti.PARAMETRO_CONNETTORE_CUSTOM_CORRELATO);
  114.         dati.add(de);

  115.         de = new DataElement();
  116.         de.setValue(idSoggErogatore);
  117.         de.setType(DataElementType.HIDDEN);
  118.         de.setName(ConnettoriCostanti.PARAMETRO_CONNETTORE_CUSTOM_ID_SOGGETTO_EROGATORE);
  119.         dati.add(de);

  120.         de = new DataElement();
  121.         de.setValue(nomeservizioApplicativo);
  122.         de.setType(DataElementType.HIDDEN);
  123.         de.setName(ConnettoriCostanti.PARAMETRO_CONNETTORE_CUSTOM_NOME_SERVIZIO_APPLICATIVO);
  124.         dati.add(de);

  125.         de = new DataElement();
  126.         de.setValue(idsil);
  127.         de.setType(DataElementType.HIDDEN);
  128.         de.setName(ConnettoriCostanti.PARAMETRO_CONNETTORE_CUSTOM_ID_SERVIZIO_APPLICATIVO);
  129.         dati.add(de);

  130.         de = new DataElement();
  131.         de.setValue(tipoAccordo);
  132.         de.setType(DataElementType.HIDDEN);
  133.         de.setName(ConnettoriCostanti.PARAMETRO_CONNETTORE_CUSTOM_TIPO_ACCORDO);
  134.         dati.add(de);

  135.         de = new DataElement();
  136.         de.setValue(provider);
  137.         de.setType(DataElementType.HIDDEN);
  138.         de.setName(ConnettoriCostanti.PARAMETRO_CONNETTORE_CUSTOM_ID_PROVIDER);
  139.         dati.add(de);
  140.        
  141.         de = new DataElement();
  142.         de.setValue(accessoDaAPSParametro);
  143.         de.setType(DataElementType.HIDDEN);
  144.         de.setName(PorteApplicativeCostanti.PARAMETRO_PORTE_APPLICATIVE_CONNETTORE_DA_LISTA_APS);
  145.         dati.add(de);
  146.        
  147.         de = new DataElement();
  148.         de.setValue(idPorta);
  149.         de.setType(DataElementType.HIDDEN);
  150.         de.setName(ConnettoriCostanti.PARAMETRO_CONNETTORE_CUSTOM_ID_PORTA);
  151.         dati.add(de);
  152.        
  153.         de = new DataElement();
  154.         de.setValue(azioneConnettoreIdPorta);
  155.         de.setType(DataElementType.HIDDEN);
  156.         de.setName(AccordiServizioParteSpecificaCostanti.PARAMETRO_APS_FRUITORE_VIEW_CONNETTORE_MAPPING_AZIONE_ID_PORTA);
  157.         dati.add(de);
  158.     }
  159.    
  160. }