Subsection.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 subsection complex type.
  31.  *
  32.  * <p>The following schema fragment specifies the expected content contained within this class.
  33.  *
  34.  * <pre>
  35.  * &lt;complexType name="subsection"&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;/sequence&gt;
  40.  *      &lt;attribute name="label" type="{http://www.w3.org/2001/XMLSchema}string" use="required"/&gt;
  41.  *      &lt;attribute name="hidden" type="{http://www.w3.org/2001/XMLSchema}boolean" use="optional" default="false"/&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 = "subsection",
  52.   propOrder = {
  53.     "conditions",
  54.     "item"
  55.   }
  56. )

  57. @XmlRootElement(name = "subsection")

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

  62.   public Conditions getConditions() {
  63.     return this.conditions;
  64.   }

  65.   public void setConditions(Conditions conditions) {
  66.     this.conditions = conditions;
  67.   }

  68.   public void addItem(Item item) {
  69.     this.item.add(item);
  70.   }

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

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

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

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

  83.   public int sizeItemList() {
  84.     return this.item.size();
  85.   }

  86.   public java.lang.String getLabel() {
  87.     return this.label;
  88.   }

  89.   public void setLabel(java.lang.String label) {
  90.     this.label = label;
  91.   }

  92.   public boolean isHidden() {
  93.     return this.hidden;
  94.   }

  95.   public boolean getHidden() {
  96.     return this.hidden;
  97.   }

  98.   public void setHidden(boolean hidden) {
  99.     this.hidden = hidden;
  100.   }

  101.   private static final long serialVersionUID = 1L;



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

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

  106.   /**
  107.    * Use method getItemList
  108.    * @return List&lt;Item&gt;
  109.   */
  110.   public List<Item> getItem() {
  111.     return this.getItemList();
  112.   }

  113.   /**
  114.    * Use method setItemList
  115.    * @param item List&lt;Item&gt;
  116.   */
  117.   public void setItem(List<Item> item) {
  118.     this.setItemList(item);
  119.   }

  120.   /**
  121.    * Use method sizeItemList
  122.    * @return lunghezza della lista
  123.   */
  124.   public int sizeItem() {
  125.     return this.sizeItemList();
  126.   }

  127.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  128.   @XmlAttribute(name="label",required=true)
  129.   protected java.lang.String label;

  130.   @javax.xml.bind.annotation.XmlSchemaType(name="boolean")
  131.   @XmlAttribute(name="hidden",required=false)
  132.   protected boolean hidden = false;

  133. }