ImportInformationMissing.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.protocol.engine.archive;

  21. import java.io.Serializable;
  22. import java.util.ArrayList;
  23. import java.util.HashMap;
  24. import java.util.List;

  25. import org.openspcoop2.core.config.Credenziali;
  26. import org.openspcoop2.core.config.InvocazioneServizio;
  27. import org.openspcoop2.core.id.IDAccordo;
  28. import org.openspcoop2.core.id.IDAccordoCooperazione;
  29. import org.openspcoop2.core.id.IDSoggetto;
  30. import org.openspcoop2.core.registry.Connettore;
  31. import org.openspcoop2.core.registry.PortType;
  32. import org.openspcoop2.protocol.sdk.ProtocolException;
  33. import org.openspcoop2.protocol.sdk.archive.MapPlaceholder;

  34. /**
  35.  *  ImportInformationMissing
  36.  *
  37.  * @author Poli Andrea (apoli@link.it)
  38.  * @author $Author$
  39.  * @version $Rev$, $Date$
  40.  */
  41. public class ImportInformationMissing implements Serializable {

  42.     /**
  43.      *
  44.      */
  45.     private static final long serialVersionUID = 1L;
  46.    
  47.     private HashMap<String, String> requisitiInput = new HashMap<>();
  48.     private HashMap<String, String> requisitiInputStepIncrement = new HashMap<>();
  49.     private IDSoggetto soggetto;
  50.     private Integer versione;
  51.     private List<PortType> portTypes = new ArrayList<PortType>();
  52.     private String portTypeImplemented;
  53.     private IDAccordo idAccordoServizioParteComune;
  54.     private IDAccordoCooperazione idAccordoCooperazione;
  55.     private InvocazioneServizio invocazioneServizio;
  56.     private Credenziali credenziali;
  57.     private Connettore connettore;
  58.     private MapPlaceholder inputPlaceholder;
  59.    
  60.     public HashMap<String, String> getRequisitiInput() {
  61.         return this.requisitiInput;
  62.     }
  63.     public void setRequisitiInput(HashMap<String, String> requisitiInput) {
  64.         this.requisitiInput = requisitiInput;
  65.     }
  66.     public HashMap<String, String> getRequisitiInputStepIncrement() {
  67.         return this.requisitiInputStepIncrement;
  68.     }
  69.     public void setRequisitiInputStepIncrement(HashMap<String, String> requisitiStepIncrement) {
  70.         this.requisitiInputStepIncrement = requisitiStepIncrement;
  71.     }
  72.    
  73.     public IDSoggetto getSoggetto() {
  74.         return this.soggetto;
  75.     }
  76.     public void setSoggetto(IDSoggetto soggetto) {
  77.         this.soggetto = soggetto;
  78.     }
  79.    
  80.     public Integer getVersione() {
  81.         return this.versione;
  82.     }
  83.     public void setVersione(Integer versione) {
  84.         this.versione = versione;
  85.     }
  86.     public String getPortTypeImplemented() {
  87.         return this.portTypeImplemented;
  88.     }
  89.     public void setPortTypeImplemented(String portTypeImplemented) {
  90.         this.portTypeImplemented = portTypeImplemented;
  91.     }
  92.    
  93.     public List<PortType> getPortTypes() {
  94.         return this.portTypes;
  95.     }
  96.     public void setPortTypes(List<PortType> portTypes) {
  97.         this.portTypes = portTypes;
  98.     }
  99.     public void addPortType(PortType pt) throws ProtocolException{
  100.         if(this.getPortType(pt.getNome())!=null){
  101.             throw new ProtocolException("PortType with name ["+pt.getNome()+"] already exists");
  102.         }
  103.         this.portTypes.add(pt);
  104.     }
  105.     public PortType getPortType(String name){
  106.         for (int i = 0; i < this.portTypes.size(); i++) {
  107.             if(this.portTypes.get(i).getNome().equals(name)){
  108.                 return this.portTypes.get(i);
  109.             }
  110.         }
  111.         return null;
  112.     }
  113.     public PortType getPortType(int index){
  114.         return this.portTypes.get(index);
  115.     }
  116.     public PortType removePortType(String name){
  117.         for (int i = 0; i < this.portTypes.size(); i++) {
  118.             if(this.portTypes.get(i).getNome().equals(name)){
  119.                 return this.portTypes.remove(i);
  120.             }
  121.         }
  122.         return null;
  123.     }
  124.     public PortType removePortType(int index){
  125.         return this.portTypes.remove(index);
  126.     }
  127.     public boolean existsPortType(String name){
  128.         for (int i = 0; i < this.portTypes.size(); i++) {
  129.             if(this.portTypes.get(i).getNome().equals(name)){
  130.                 return true;
  131.             }
  132.         }
  133.         return false;
  134.     }
  135.     public int sizePortTypeList(){
  136.         return this.portTypes.size();
  137.     }
  138.    
  139.     public IDAccordo getIdAccordoServizioParteComune() {
  140.         return this.idAccordoServizioParteComune;
  141.     }
  142.     public void setIdAccordoServizioParteComune(
  143.             IDAccordo idAccordoServizioParteComune) {
  144.         this.idAccordoServizioParteComune = idAccordoServizioParteComune;
  145.     }
  146.     public IDAccordoCooperazione getIdAccordoCooperazione() {
  147.         return this.idAccordoCooperazione;
  148.     }
  149.     public void setIdAccordoCooperazione(IDAccordoCooperazione idAccordoCooperazione) {
  150.         this.idAccordoCooperazione = idAccordoCooperazione;
  151.     }
  152.     public InvocazioneServizio getInvocazioneServizio() {
  153.         return this.invocazioneServizio;
  154.     }
  155.     public void setInvocazioneServizio(InvocazioneServizio invocazioneServizio) {
  156.         this.invocazioneServizio = invocazioneServizio;
  157.     }
  158.     public Connettore getConnettore() {
  159.         return this.connettore;
  160.     }
  161.     public void setConnettore(Connettore connettore) {
  162.         this.connettore = connettore;
  163.     }
  164.     public Credenziali getCredenziali() {
  165.         return this.credenziali;
  166.     }
  167.     public void setCredenziali(Credenziali credenziali) {
  168.         this.credenziali = credenziali;
  169.     }
  170.     public MapPlaceholder getInputPlaceholder() {
  171.         return this.inputPlaceholder;
  172.     }
  173.     public void setInputPlaceholder(MapPlaceholder inputPlaceholder) {
  174.         this.inputPlaceholder = inputPlaceholder;
  175.     }
  176. }