CanaliConfigurazione.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.config;

  21. import javax.xml.bind.annotation.XmlAccessType;
  22. import javax.xml.bind.annotation.XmlAccessorType;
  23. import javax.xml.bind.annotation.XmlAttribute;
  24. import javax.xml.bind.annotation.XmlElement;
  25. import javax.xml.bind.annotation.XmlRootElement;
  26. import javax.xml.bind.annotation.XmlType;
  27. import org.openspcoop2.core.config.constants.StatoFunzionalita;
  28. import java.io.Serializable;
  29. import java.util.ArrayList;
  30. import java.util.List;


  31. /** <p>Java class for canali-configurazione complex type.
  32.  *
  33.  * <p>The following schema fragment specifies the expected content contained within this class.
  34.  *
  35.  * <pre>
  36.  * &lt;complexType name="canali-configurazione"&gt;
  37.  *      &lt;sequence&gt;
  38.  *          &lt;element name="canale" type="{http://www.openspcoop2.org/core/config}canale-configurazione" minOccurs="0" maxOccurs="unbounded"/&gt;
  39.  *          &lt;element name="nodo" type="{http://www.openspcoop2.org/core/config}canale-configurazione-nodo" minOccurs="0" maxOccurs="unbounded"/&gt;
  40.  *      &lt;/sequence&gt;
  41.  *      &lt;attribute name="stato" type="{http://www.openspcoop2.org/core/config}StatoFunzionalita" use="optional" default="abilitato"/&gt;
  42.  * &lt;/complexType&gt;
  43.  * </pre>
  44.  *
  45.  * @version $Rev$, $Date$
  46.  *
  47.  * @author Poli Andrea (poli@link.it)
  48.  * @author $Author$
  49.  * */

  50. @XmlAccessorType(XmlAccessType.FIELD)
  51. @XmlType(name = "canali-configurazione",
  52.   propOrder = {
  53.     "canale",
  54.     "nodo"
  55.   }
  56. )

  57. @XmlRootElement(name = "canali-configurazione")

  58. public class CanaliConfigurazione extends org.openspcoop2.utils.beans.BaseBeanWithId implements Serializable , Cloneable {
  59.   public CanaliConfigurazione() {
  60.     super();
  61.   }

  62.   public void addCanale(CanaleConfigurazione canale) {
  63.     this.canale.add(canale);
  64.   }

  65.   public CanaleConfigurazione getCanale(int index) {
  66.     return this.canale.get( index );
  67.   }

  68.   public CanaleConfigurazione removeCanale(int index) {
  69.     return this.canale.remove( index );
  70.   }

  71.   public List<CanaleConfigurazione> getCanaleList() {
  72.     return this.canale;
  73.   }

  74.   public void setCanaleList(List<CanaleConfigurazione> canale) {
  75.     this.canale=canale;
  76.   }

  77.   public int sizeCanaleList() {
  78.     return this.canale.size();
  79.   }

  80.   public void addNodo(CanaleConfigurazioneNodo nodo) {
  81.     this.nodo.add(nodo);
  82.   }

  83.   public CanaleConfigurazioneNodo getNodo(int index) {
  84.     return this.nodo.get( index );
  85.   }

  86.   public CanaleConfigurazioneNodo removeNodo(int index) {
  87.     return this.nodo.remove( index );
  88.   }

  89.   public List<CanaleConfigurazioneNodo> getNodoList() {
  90.     return this.nodo;
  91.   }

  92.   public void setNodoList(List<CanaleConfigurazioneNodo> nodo) {
  93.     this.nodo=nodo;
  94.   }

  95.   public int sizeNodoList() {
  96.     return this.nodo.size();
  97.   }

  98.   public void setStatoRawEnumValue(String value) {
  99.     this.stato = (StatoFunzionalita) StatoFunzionalita.toEnumConstantFromString(value);
  100.   }

  101.   public String getStatoRawEnumValue() {
  102.     if(this.stato == null){
  103.         return null;
  104.     }else{
  105.         return this.stato.toString();
  106.     }
  107.   }

  108.   public org.openspcoop2.core.config.constants.StatoFunzionalita getStato() {
  109.     return this.stato;
  110.   }

  111.   public void setStato(org.openspcoop2.core.config.constants.StatoFunzionalita stato) {
  112.     this.stato = stato;
  113.   }

  114.   private static final long serialVersionUID = 1L;



  115.   @XmlElement(name="canale",required=true,nillable=false)
  116.   private List<CanaleConfigurazione> canale = new ArrayList<>();

  117.   /**
  118.    * Use method getCanaleList
  119.    * @return List&lt;CanaleConfigurazione&gt;
  120.   */
  121.   public List<CanaleConfigurazione> getCanale() {
  122.     return this.getCanaleList();
  123.   }

  124.   /**
  125.    * Use method setCanaleList
  126.    * @param canale List&lt;CanaleConfigurazione&gt;
  127.   */
  128.   public void setCanale(List<CanaleConfigurazione> canale) {
  129.     this.setCanaleList(canale);
  130.   }

  131.   /**
  132.    * Use method sizeCanaleList
  133.    * @return lunghezza della lista
  134.   */
  135.   public int sizeCanale() {
  136.     return this.sizeCanaleList();
  137.   }

  138.   @XmlElement(name="nodo",required=true,nillable=false)
  139.   private List<CanaleConfigurazioneNodo> nodo = new ArrayList<>();

  140.   /**
  141.    * Use method getNodoList
  142.    * @return List&lt;CanaleConfigurazioneNodo&gt;
  143.   */
  144.   public List<CanaleConfigurazioneNodo> getNodo() {
  145.     return this.getNodoList();
  146.   }

  147.   /**
  148.    * Use method setNodoList
  149.    * @param nodo List&lt;CanaleConfigurazioneNodo&gt;
  150.   */
  151.   public void setNodo(List<CanaleConfigurazioneNodo> nodo) {
  152.     this.setNodoList(nodo);
  153.   }

  154.   /**
  155.    * Use method sizeNodoList
  156.    * @return lunghezza della lista
  157.   */
  158.   public int sizeNodo() {
  159.     return this.sizeNodoList();
  160.   }

  161.   @javax.xml.bind.annotation.XmlTransient
  162.   protected java.lang.String statoRawEnumValue;

  163.   @XmlAttribute(name="stato",required=false)
  164.   protected StatoFunzionalita stato = (StatoFunzionalita) StatoFunzionalita.toEnumConstantFromString("abilitato");

  165. }