Section.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 section complex type.
  31.  *
  32.  * <p>The following schema fragment specifies the expected content contained within this class.
  33.  *
  34.  * <pre>
  35.  * &lt;complexType name="section"&gt;
  36.  *      &lt;sequence&gt;
  37.  *          &lt;element name="conditions" type="{http://www.openspcoop2.org/core/mvc/properties}conditions" minOccurs="0" maxOccurs="1"/&gt;
  38.  *          &lt;element name="item" type="{http://www.openspcoop2.org/core/mvc/properties}item" minOccurs="0" maxOccurs="unbounded"/&gt;
  39.  *          &lt;element name="subsection" type="{http://www.openspcoop2.org/core/mvc/properties}subsection" minOccurs="0" maxOccurs="unbounded"/&gt;
  40.  *      &lt;/sequence&gt;
  41.  *      &lt;attribute name="label" type="{http://www.w3.org/2001/XMLSchema}string" use="required"/&gt;
  42.  *      &lt;attribute name="hidden" type="{http://www.w3.org/2001/XMLSchema}boolean" use="optional" default="false"/&gt;
  43.  * &lt;/complexType&gt;
  44.  * </pre>
  45.  *
  46.  * @version $Rev$, $Date$
  47.  *
  48.  * @author Poli Andrea (poli@link.it)
  49.  * @author $Author$
  50.  * */

  51. @XmlAccessorType(XmlAccessType.FIELD)
  52. @XmlType(name = "section",
  53.   propOrder = {
  54.     "conditions",
  55.     "item",
  56.     "subsection"
  57.   }
  58. )

  59. @XmlRootElement(name = "section")

  60. public class Section extends org.openspcoop2.utils.beans.BaseBean implements Serializable , Cloneable {
  61.   public Section() {
  62.     super();
  63.   }

  64.   public Conditions getConditions() {
  65.     return this.conditions;
  66.   }

  67.   public void setConditions(Conditions conditions) {
  68.     this.conditions = conditions;
  69.   }

  70.   public void addItem(Item item) {
  71.     this.item.add(item);
  72.   }

  73.   public Item getItem(int index) {
  74.     return this.item.get( index );
  75.   }

  76.   public Item removeItem(int index) {
  77.     return this.item.remove( index );
  78.   }

  79.   public List<Item> getItemList() {
  80.     return this.item;
  81.   }

  82.   public void setItemList(List<Item> item) {
  83.     this.item=item;
  84.   }

  85.   public int sizeItemList() {
  86.     return this.item.size();
  87.   }

  88.   public void addSubsection(Subsection subsection) {
  89.     this.subsection.add(subsection);
  90.   }

  91.   public Subsection getSubsection(int index) {
  92.     return this.subsection.get( index );
  93.   }

  94.   public Subsection removeSubsection(int index) {
  95.     return this.subsection.remove( index );
  96.   }

  97.   public List<Subsection> getSubsectionList() {
  98.     return this.subsection;
  99.   }

  100.   public void setSubsectionList(List<Subsection> subsection) {
  101.     this.subsection=subsection;
  102.   }

  103.   public int sizeSubsectionList() {
  104.     return this.subsection.size();
  105.   }

  106.   public java.lang.String getLabel() {
  107.     return this.label;
  108.   }

  109.   public void setLabel(java.lang.String label) {
  110.     this.label = label;
  111.   }

  112.   public boolean isHidden() {
  113.     return this.hidden;
  114.   }

  115.   public boolean getHidden() {
  116.     return this.hidden;
  117.   }

  118.   public void setHidden(boolean hidden) {
  119.     this.hidden = hidden;
  120.   }

  121.   private static final long serialVersionUID = 1L;



  122.   @XmlElement(name="conditions",required=false,nillable=false)
  123.   protected Conditions conditions;

  124.   @XmlElement(name="item",required=true,nillable=false)
  125.   private List<Item> item = new ArrayList<>();

  126.   /**
  127.    * Use method getItemList
  128.    * @return List&lt;Item&gt;
  129.   */
  130.   public List<Item> getItem() {
  131.     return this.getItemList();
  132.   }

  133.   /**
  134.    * Use method setItemList
  135.    * @param item List&lt;Item&gt;
  136.   */
  137.   public void setItem(List<Item> item) {
  138.     this.setItemList(item);
  139.   }

  140.   /**
  141.    * Use method sizeItemList
  142.    * @return lunghezza della lista
  143.   */
  144.   public int sizeItem() {
  145.     return this.sizeItemList();
  146.   }

  147.   @XmlElement(name="subsection",required=true,nillable=false)
  148.   private List<Subsection> subsection = new ArrayList<>();

  149.   /**
  150.    * Use method getSubsectionList
  151.    * @return List&lt;Subsection&gt;
  152.   */
  153.   public List<Subsection> getSubsection() {
  154.     return this.getSubsectionList();
  155.   }

  156.   /**
  157.    * Use method setSubsectionList
  158.    * @param subsection List&lt;Subsection&gt;
  159.   */
  160.   public void setSubsection(List<Subsection> subsection) {
  161.     this.setSubsectionList(subsection);
  162.   }

  163.   /**
  164.    * Use method sizeSubsectionList
  165.    * @return lunghezza della lista
  166.   */
  167.   public int sizeSubsection() {
  168.     return this.sizeSubsectionList();
  169.   }

  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="boolean")
  174.   @XmlAttribute(name="hidden",required=false)
  175.   protected boolean hidden = false;

  176. }