Item.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 org.openspcoop2.core.mvc.properties.constants.ItemType;
  28. import java.io.Serializable;


  29. /** <p>Java class for item complex type.
  30.  *
  31.  * <p>The following schema fragment specifies the expected content contained within this class.
  32.  *
  33.  * <pre>
  34.  * &lt;complexType name="item"&gt;
  35.  *      &lt;sequence&gt;
  36.  *          &lt;element name="conditions" type="{http://www.openspcoop2.org/core/mvc/properties}conditions" minOccurs="0" maxOccurs="1"/&gt;
  37.  *          &lt;element name="values" type="{http://www.openspcoop2.org/core/mvc/properties}itemValues" minOccurs="0" maxOccurs="1"/&gt;
  38.  *          &lt;element name="property" type="{http://www.openspcoop2.org/core/mvc/properties}property" minOccurs="1" maxOccurs="1"/&gt;
  39.  *      &lt;/sequence&gt;
  40.  *      &lt;attribute name="type" type="{http://www.openspcoop2.org/core/mvc/properties}itemType" use="required"/&gt;
  41.  *      &lt;attribute name="name" 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="optional"/&gt;
  43.  *      &lt;attribute name="note" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  44.  *      &lt;attribute name="required" type="{http://www.w3.org/2001/XMLSchema}boolean" use="optional" default="false"/&gt;
  45.  *      &lt;attribute name="reloadOnChange" type="{http://www.w3.org/2001/XMLSchema}boolean" use="optional" default="false"/&gt;
  46.  *      &lt;attribute name="default" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  47.  *      &lt;attribute name="defaultSelected" type="{http://www.w3.org/2001/XMLSchema}boolean" use="optional"/&gt;
  48.  *      &lt;attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  49.  *      &lt;attribute name="min" type="{http://www.w3.org/2001/XMLSchema}integer" use="optional"/&gt;
  50.  *      &lt;attribute name="max" type="{http://www.w3.org/2001/XMLSchema}integer" use="optional"/&gt;
  51.  *      &lt;attribute name="validation" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  52.  * &lt;/complexType&gt;
  53.  * </pre>
  54.  *
  55.  * @version $Rev$, $Date$
  56.  *
  57.  * @author Poli Andrea (poli@link.it)
  58.  * @author $Author$
  59.  * */

  60. @XmlAccessorType(XmlAccessType.FIELD)
  61. @XmlType(name = "item",
  62.   propOrder = {
  63.     "conditions",
  64.     "values",
  65.     "property"
  66.   }
  67. )

  68. @XmlRootElement(name = "item")

  69. public class Item extends org.openspcoop2.utils.beans.BaseBean implements Serializable , Cloneable {
  70.   public Item() {
  71.     super();
  72.   }

  73.   public Conditions getConditions() {
  74.     return this.conditions;
  75.   }

  76.   public void setConditions(Conditions conditions) {
  77.     this.conditions = conditions;
  78.   }

  79.   public ItemValues getValues() {
  80.     return this.values;
  81.   }

  82.   public void setValues(ItemValues values) {
  83.     this.values = values;
  84.   }

  85.   public Property getProperty() {
  86.     return this.property;
  87.   }

  88.   public void setProperty(Property property) {
  89.     this.property = property;
  90.   }

  91.   public void setTypeRawEnumValue(String value) {
  92.     this.type = (ItemType) ItemType.toEnumConstantFromString(value);
  93.   }

  94.   public String getTypeRawEnumValue() {
  95.     if(this.type == null){
  96.         return null;
  97.     }else{
  98.         return this.type.toString();
  99.     }
  100.   }

  101.   public org.openspcoop2.core.mvc.properties.constants.ItemType getType() {
  102.     return this.type;
  103.   }

  104.   public void setType(org.openspcoop2.core.mvc.properties.constants.ItemType type) {
  105.     this.type = type;
  106.   }

  107.   public java.lang.String getName() {
  108.     return this.name;
  109.   }

  110.   public void setName(java.lang.String name) {
  111.     this.name = name;
  112.   }

  113.   public java.lang.String getLabel() {
  114.     return this.label;
  115.   }

  116.   public void setLabel(java.lang.String label) {
  117.     this.label = label;
  118.   }

  119.   public java.lang.String getNote() {
  120.     return this.note;
  121.   }

  122.   public void setNote(java.lang.String note) {
  123.     this.note = note;
  124.   }

  125.   public boolean isRequired() {
  126.     return this.required;
  127.   }

  128.   public boolean getRequired() {
  129.     return this.required;
  130.   }

  131.   public void setRequired(boolean required) {
  132.     this.required = required;
  133.   }

  134.   public boolean isReloadOnChange() {
  135.     return this.reloadOnChange;
  136.   }

  137.   public boolean getReloadOnChange() {
  138.     return this.reloadOnChange;
  139.   }

  140.   public void setReloadOnChange(boolean reloadOnChange) {
  141.     this.reloadOnChange = reloadOnChange;
  142.   }

  143.   public java.lang.String getDefault() {
  144.     return this._default;
  145.   }

  146.   public void setDefault(java.lang.String _default) {
  147.     this._default = _default;
  148.   }

  149.   public boolean isDefaultSelected() {
  150.     return this.defaultSelected;
  151.   }

  152.   public boolean getDefaultSelected() {
  153.     return this.defaultSelected;
  154.   }

  155.   public void setDefaultSelected(boolean defaultSelected) {
  156.     this.defaultSelected = defaultSelected;
  157.   }

  158.   public java.lang.String getValue() {
  159.     return this.value;
  160.   }

  161.   public void setValue(java.lang.String value) {
  162.     this.value = value;
  163.   }

  164.   public java.lang.Integer getMin() {
  165.     return this.min;
  166.   }

  167.   public void setMin(java.lang.Integer min) {
  168.     this.min = min;
  169.   }

  170.   public java.lang.Integer getMax() {
  171.     return this.max;
  172.   }

  173.   public void setMax(java.lang.Integer max) {
  174.     this.max = max;
  175.   }

  176.   public java.lang.String getValidation() {
  177.     return this.validation;
  178.   }

  179.   public void setValidation(java.lang.String validation) {
  180.     this.validation = validation;
  181.   }

  182.   private static final long serialVersionUID = 1L;



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

  185.   @XmlElement(name="values",required=false,nillable=false)
  186.   protected ItemValues values;

  187.   @XmlElement(name="property",required=true,nillable=false)
  188.   protected Property property;

  189.   @javax.xml.bind.annotation.XmlTransient
  190.   protected java.lang.String typeRawEnumValue;

  191.   @XmlAttribute(name="type",required=true)
  192.   protected ItemType type;

  193.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  194.   @XmlAttribute(name="name",required=true)
  195.   protected java.lang.String name;

  196.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  197.   @XmlAttribute(name="label",required=false)
  198.   protected java.lang.String label;

  199.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  200.   @XmlAttribute(name="note",required=false)
  201.   protected java.lang.String note;

  202.   @javax.xml.bind.annotation.XmlSchemaType(name="boolean")
  203.   @XmlAttribute(name="required",required=false)
  204.   protected boolean required = false;

  205.   @javax.xml.bind.annotation.XmlSchemaType(name="boolean")
  206.   @XmlAttribute(name="reloadOnChange",required=false)
  207.   protected boolean reloadOnChange = false;

  208.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  209.   @XmlAttribute(name="default",required=false)
  210.   protected java.lang.String _default;

  211.   @javax.xml.bind.annotation.XmlSchemaType(name="boolean")
  212.   @XmlAttribute(name="defaultSelected",required=false)
  213.   protected boolean defaultSelected;

  214.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  215.   @XmlAttribute(name="value",required=false)
  216.   protected java.lang.String value;

  217.   @javax.xml.bind.annotation.XmlSchemaType(name="integer")
  218.   @XmlAttribute(name="min",required=false)
  219.   protected java.lang.Integer min;

  220.   @javax.xml.bind.annotation.XmlSchemaType(name="integer")
  221.   @XmlAttribute(name="max",required=false)
  222.   protected java.lang.Integer max;

  223.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  224.   @XmlAttribute(name="validation",required=false)
  225.   protected java.lang.String validation;

  226. }