Config.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.mvc.properties;

  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 java.io.Serializable;
  28. import java.util.ArrayList;
  29. import java.util.List;


  30. /** <p>Java class for config complex type.
  31.  *
  32.  * <p>The following schema fragment specifies the expected content contained within this class.
  33.  *
  34.  * <pre>
  35.  * &lt;complexType name="config"&gt;
  36.  *      &lt;sequence&gt;
  37.  *          &lt;element name="compatibility" type="{http://www.openspcoop2.org/core/mvc/properties}compatibility" minOccurs="0" maxOccurs="1"/&gt;
  38.  *          &lt;element name="properties" type="{http://www.openspcoop2.org/core/mvc/properties}properties" minOccurs="0" maxOccurs="1"/&gt;
  39.  *          &lt;element name="section" type="{http://www.openspcoop2.org/core/mvc/properties}section" minOccurs="1" maxOccurs="unbounded"/&gt;
  40.  *      &lt;/sequence&gt;
  41.  *      &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" use="required"/&gt;
  42.  *      &lt;attribute name="label" type="{http://www.w3.org/2001/XMLSchema}string" use="required"/&gt;
  43.  *      &lt;attribute name="sortLabel" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  44.  *      &lt;attribute name="descrizione" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  45.  *      &lt;attribute name="provider" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  46.  * &lt;/complexType&gt;
  47.  * </pre>
  48.  *
  49.  * @version $Rev$, $Date$
  50.  *
  51.  * @author Poli Andrea (poli@link.it)
  52.  * @author $Author$
  53.  * */

  54. @XmlAccessorType(XmlAccessType.FIELD)
  55. @XmlType(name = "config",
  56.   propOrder = {
  57.     "compatibility",
  58.     "properties",
  59.     "section"
  60.   }
  61. )

  62. @XmlRootElement(name = "config")

  63. public class Config extends org.openspcoop2.utils.beans.BaseBean implements Serializable , Cloneable {
  64.   public Config() {
  65.     super();
  66.   }

  67.   public Compatibility getCompatibility() {
  68.     return this.compatibility;
  69.   }

  70.   public void setCompatibility(Compatibility compatibility) {
  71.     this.compatibility = compatibility;
  72.   }

  73.   public Properties getProperties() {
  74.     return this.properties;
  75.   }

  76.   public void setProperties(Properties properties) {
  77.     this.properties = properties;
  78.   }

  79.   public void addSection(Section section) {
  80.     this.section.add(section);
  81.   }

  82.   public Section getSection(int index) {
  83.     return this.section.get( index );
  84.   }

  85.   public Section removeSection(int index) {
  86.     return this.section.remove( index );
  87.   }

  88.   public List<Section> getSectionList() {
  89.     return this.section;
  90.   }

  91.   public void setSectionList(List<Section> section) {
  92.     this.section=section;
  93.   }

  94.   public int sizeSectionList() {
  95.     return this.section.size();
  96.   }

  97.   public java.lang.String getId() {
  98.     return this.id;
  99.   }

  100.   public void setId(java.lang.String id) {
  101.     this.id = id;
  102.   }

  103.   public java.lang.String getLabel() {
  104.     return this.label;
  105.   }

  106.   public void setLabel(java.lang.String label) {
  107.     this.label = label;
  108.   }

  109.   public java.lang.String getSortLabel() {
  110.     return this.sortLabel;
  111.   }

  112.   public void setSortLabel(java.lang.String sortLabel) {
  113.     this.sortLabel = sortLabel;
  114.   }

  115.   public java.lang.String getDescrizione() {
  116.     return this.descrizione;
  117.   }

  118.   public void setDescrizione(java.lang.String descrizione) {
  119.     this.descrizione = descrizione;
  120.   }

  121.   public java.lang.String getProvider() {
  122.     return this.provider;
  123.   }

  124.   public void setProvider(java.lang.String provider) {
  125.     this.provider = provider;
  126.   }

  127.   private static final long serialVersionUID = 1L;

  128.   private static org.openspcoop2.core.mvc.properties.model.ConfigModel modelStaticInstance = null;
  129.   private static synchronized void initModelStaticInstance(){
  130.       if(org.openspcoop2.core.mvc.properties.Config.modelStaticInstance==null){
  131.             org.openspcoop2.core.mvc.properties.Config.modelStaticInstance = new org.openspcoop2.core.mvc.properties.model.ConfigModel();
  132.       }
  133.   }
  134.   public static org.openspcoop2.core.mvc.properties.model.ConfigModel model(){
  135.       if(org.openspcoop2.core.mvc.properties.Config.modelStaticInstance==null){
  136.             initModelStaticInstance();
  137.       }
  138.       return org.openspcoop2.core.mvc.properties.Config.modelStaticInstance;
  139.   }


  140.   @XmlElement(name="compatibility",required=false,nillable=false)
  141.   protected Compatibility compatibility;

  142.   @XmlElement(name="properties",required=false,nillable=false)
  143.   protected Properties properties;

  144.   @XmlElement(name="section",required=true,nillable=false)
  145.   private List<Section> section = new ArrayList<>();

  146.   /**
  147.    * Use method getSectionList
  148.    * @return List&lt;Section&gt;
  149.   */
  150.   public List<Section> getSection() {
  151.     return this.getSectionList();
  152.   }

  153.   /**
  154.    * Use method setSectionList
  155.    * @param section List&lt;Section&gt;
  156.   */
  157.   public void setSection(List<Section> section) {
  158.     this.setSectionList(section);
  159.   }

  160.   /**
  161.    * Use method sizeSectionList
  162.    * @return lunghezza della lista
  163.   */
  164.   public int sizeSection() {
  165.     return this.sizeSectionList();
  166.   }

  167.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  168.   @XmlAttribute(name="id",required=true)
  169.   protected java.lang.String id;

  170.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  171.   @XmlAttribute(name="label",required=true)
  172.   protected java.lang.String label;

  173.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  174.   @XmlAttribute(name="sortLabel",required=false)
  175.   protected java.lang.String sortLabel;

  176.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  177.   @XmlAttribute(name="descrizione",required=false)
  178.   protected java.lang.String descrizione;

  179.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  180.   @XmlAttribute(name="provider",required=false)
  181.   protected java.lang.String provider;

  182. }