FiltroRicercaServizi.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.core.registry.driver;

  21. import java.io.Serializable;

  22. import org.openspcoop2.core.constants.TipologiaServizio;
  23. import org.openspcoop2.core.id.IDAccordo;


  24. /**
  25.  * Permette il filtro di ricerca attraverso i driver che implementano l'interfaccia 'get'
  26.  *
  27.  *
  28.  * @author Poli Andrea (apoli@link.it)
  29.  * @author Nardi Lorenzo (nardi@link.it)
  30.  * @author $Author$
  31.  * @version $Rev$, $Date$
  32.  */

  33. public class FiltroRicercaServizi extends FiltroRicerca implements Serializable{

  34.    
  35.     /**
  36.      *
  37.      */
  38.     private static final long serialVersionUID = 1L;
  39.    
  40.     /** id Accordo di Servizio Parte Comune */
  41.     private IDAccordo idAccordoServizioParteComune;
  42.    
  43.     /** tipo Soggetto Erogatore */
  44.     private String tipoSoggettoErogatore;
  45.     /** nome Soggetto Erogatore */
  46.     private String nomeSoggettoErogatore;
  47.    
  48.     /** Versione */
  49.     private Integer versione;

  50.     /** TipologiaServizio */
  51.     private TipologiaServizio tipologia;
  52.    
  53.     /** tipo Soggetto Fruitore */
  54.     private String tipoSoggettoFruitore;
  55.     /** nome Soggetto Fruitore */
  56.     private String nomeSoggettoFruitore;
  57.    
  58.     private String portType;
  59.    

  60.    
  61.     public TipologiaServizio getTipologia() {
  62.         return this.tipologia;
  63.     }
  64.     public void setTipologia(TipologiaServizio tipologiaServizio) {
  65.         this.tipologia = tipologiaServizio;
  66.     }


  67.     public IDAccordo getIdAccordoServizioParteComune() {
  68.         return this.idAccordoServizioParteComune;
  69.     }
  70.     public void setIdAccordoServizioParteComune(IDAccordo idAccordo) {
  71.         this.idAccordoServizioParteComune = idAccordo;
  72.     }
  73.    
  74.     public Integer getVersione() {
  75.         return this.versione;
  76.     }

  77.     public void setVersione(Integer versione) {
  78.         this.versione = versione;
  79.     }
  80.    
  81.     /**
  82.      * @return the nomeSoggettoErogatore
  83.      */
  84.     public String getNomeSoggettoErogatore() {
  85.         return this.nomeSoggettoErogatore;
  86.     }
  87.     /**
  88.      * @param nomeSoggettoErogatore the nomeSoggettoErogatore to set
  89.      */
  90.     public void setNomeSoggettoErogatore(String nomeSoggettoErogatore) {
  91.         this.nomeSoggettoErogatore = nomeSoggettoErogatore;
  92.     }
  93.     /**
  94.      * @return the tipoSoggettoErogatore
  95.      */
  96.     public String getTipoSoggettoErogatore() {
  97.         return this.tipoSoggettoErogatore;
  98.     }
  99.     /**
  100.      * @param tipoSoggettoErogatore the tipoSoggettoErogatore to set
  101.      */
  102.     public void setTipoSoggettoErogatore(String tipoSoggettoErogatore) {
  103.         this.tipoSoggettoErogatore = tipoSoggettoErogatore;
  104.     }
  105.    
  106.     /**
  107.      * @return the nomeSoggettoFruitore
  108.      */
  109.     public String getNomeSoggettoFruitore() {
  110.         return this.nomeSoggettoFruitore;
  111.     }
  112.     /**
  113.      * @param nomeSoggettoFruitore the nomeSoggettoFruitore to set
  114.      */
  115.     public void setNomeSoggettoFruitore(String nomeSoggettoFruitore) {
  116.         this.nomeSoggettoFruitore = nomeSoggettoFruitore;
  117.     }
  118.     /**
  119.      * @return the tipoSoggettoFruitore
  120.      */
  121.     public String getTipoSoggettoFruitore() {
  122.         return this.tipoSoggettoFruitore;
  123.     }
  124.     /**
  125.      * @param tipoSoggettoFruitore the tipoSoggettoFruitore to set
  126.      */
  127.     public void setTipoSoggettoFruitore(String tipoSoggettoFruitore) {
  128.         this.tipoSoggettoFruitore = tipoSoggettoFruitore;
  129.     }
  130.    
  131.    
  132.    
  133.     public String getPortType() {
  134.         return this.portType;
  135.     }
  136.     public void setPortType(String portType) {
  137.         this.portType = portType;
  138.     }
  139.    
  140.    
  141.     @Override
  142.     public String toString(){
  143.         StringBuilder bf = new StringBuilder();
  144.         bf.append("Filtro Servizi:");
  145.         this.addDetails(bf);
  146.         if(bf.length()=="Filtro Servizi:".length())
  147.             bf.append(" nessun filtro presente");
  148.         return bf.toString();
  149.     }
  150.     @Override
  151.     public void addDetails(StringBuilder bf){
  152.         if(this.idAccordoServizioParteComune!=null)
  153.             bf.append(" [accordo-servizio-parte-comune:"+this.idAccordoServizioParteComune+"]");
  154.         if(this.tipoSoggettoErogatore!=null)
  155.             bf.append(" [tipo-soggetto-erogatore:"+this.tipoSoggettoErogatore+"]");
  156.         if(this.nomeSoggettoErogatore!=null)
  157.             bf.append(" [nome-soggetto-erogatore:"+this.nomeSoggettoErogatore+"]");
  158.         if(this.tipologia!=null)
  159.             bf.append(" [tipologia-servizio:"+this.tipologia+"]");
  160.         if(this.versione!=null)
  161.             bf.append(" [versione:"+this.versione+"]");
  162.         if(this.tipoSoggettoFruitore!=null)
  163.             bf.append(" [tipo-soggetto-fruitore:"+this.tipoSoggettoFruitore+"]");
  164.         if(this.nomeSoggettoFruitore!=null)
  165.             bf.append(" [nome-soggetto-fruitore:"+this.nomeSoggettoFruitore+"]");
  166.         if(this.portType!=null)
  167.             bf.append(" [portType:"+this.portType+"]");
  168.         super.addDetails(bf);
  169.     }

  170. }