ResourceResponse.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.registry;

  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 resource-response complex type.
  31.  *
  32.  * <p>The following schema fragment specifies the expected content contained within this class.
  33.  *
  34.  * <pre>
  35.  * &lt;complexType name="resource-response"&gt;
  36.  *      &lt;sequence&gt;
  37.  *          &lt;element name="parameter" type="{http://www.openspcoop2.org/core/registry}resource-parameter" minOccurs="0" maxOccurs="unbounded"/&gt;
  38.  *          &lt;element name="representation" type="{http://www.openspcoop2.org/core/registry}resource-representation" minOccurs="0" maxOccurs="unbounded"/&gt;
  39.  *      &lt;/sequence&gt;
  40.  *      &lt;attribute name="id-resource" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" use="optional"/&gt;
  41.  *      &lt;attribute name="descrizione" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  42.  *      &lt;attribute name="status" type="{http://www.w3.org/2001/XMLSchema}int" use="required"/&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 = "resource-response",
  53.   propOrder = {
  54.     "parameter",
  55.     "representation"
  56.   }
  57. )

  58. @XmlRootElement(name = "resource-response")

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

  63.   public void addParameter(ResourceParameter parameter) {
  64.     this.parameter.add(parameter);
  65.   }

  66.   public ResourceParameter getParameter(int index) {
  67.     return this.parameter.get( index );
  68.   }

  69.   public ResourceParameter removeParameter(int index) {
  70.     return this.parameter.remove( index );
  71.   }

  72.   public List<ResourceParameter> getParameterList() {
  73.     return this.parameter;
  74.   }

  75.   public void setParameterList(List<ResourceParameter> parameter) {
  76.     this.parameter=parameter;
  77.   }

  78.   public int sizeParameterList() {
  79.     return this.parameter.size();
  80.   }

  81.   public void addRepresentation(ResourceRepresentation representation) {
  82.     this.representation.add(representation);
  83.   }

  84.   public ResourceRepresentation getRepresentation(int index) {
  85.     return this.representation.get( index );
  86.   }

  87.   public ResourceRepresentation removeRepresentation(int index) {
  88.     return this.representation.remove( index );
  89.   }

  90.   public List<ResourceRepresentation> getRepresentationList() {
  91.     return this.representation;
  92.   }

  93.   public void setRepresentationList(List<ResourceRepresentation> representation) {
  94.     this.representation=representation;
  95.   }

  96.   public int sizeRepresentationList() {
  97.     return this.representation.size();
  98.   }

  99.   public java.lang.Long getIdResource() {
  100.     return this.idResource;
  101.   }

  102.   public void setIdResource(java.lang.Long idResource) {
  103.     this.idResource = idResource;
  104.   }

  105.   public java.lang.String getDescrizione() {
  106.     return this.descrizione;
  107.   }

  108.   public void setDescrizione(java.lang.String descrizione) {
  109.     this.descrizione = descrizione;
  110.   }

  111.   public int getStatus() {
  112.     return this.status;
  113.   }

  114.   public void setStatus(int status) {
  115.     this.status = status;
  116.   }

  117.   private static final long serialVersionUID = 1L;



  118.   @XmlElement(name="parameter",required=true,nillable=false)
  119.   private List<ResourceParameter> parameter = new ArrayList<>();

  120.   /**
  121.    * Use method getParameterList
  122.    * @return List&lt;ResourceParameter&gt;
  123.   */
  124.   public List<ResourceParameter> getParameter() {
  125.     return this.getParameterList();
  126.   }

  127.   /**
  128.    * Use method setParameterList
  129.    * @param parameter List&lt;ResourceParameter&gt;
  130.   */
  131.   public void setParameter(List<ResourceParameter> parameter) {
  132.     this.setParameterList(parameter);
  133.   }

  134.   /**
  135.    * Use method sizeParameterList
  136.    * @return lunghezza della lista
  137.   */
  138.   public int sizeParameter() {
  139.     return this.sizeParameterList();
  140.   }

  141.   @XmlElement(name="representation",required=true,nillable=false)
  142.   private List<ResourceRepresentation> representation = new ArrayList<>();

  143.   /**
  144.    * Use method getRepresentationList
  145.    * @return List&lt;ResourceRepresentation&gt;
  146.   */
  147.   public List<ResourceRepresentation> getRepresentation() {
  148.     return this.getRepresentationList();
  149.   }

  150.   /**
  151.    * Use method setRepresentationList
  152.    * @param representation List&lt;ResourceRepresentation&gt;
  153.   */
  154.   public void setRepresentation(List<ResourceRepresentation> representation) {
  155.     this.setRepresentationList(representation);
  156.   }

  157.   /**
  158.    * Use method sizeRepresentationList
  159.    * @return lunghezza della lista
  160.   */
  161.   public int sizeRepresentation() {
  162.     return this.sizeRepresentationList();
  163.   }

  164.   @javax.xml.bind.annotation.XmlTransient
  165.   protected java.lang.Long idResource;

  166.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  167.   @XmlAttribute(name="descrizione",required=false)
  168.   protected java.lang.String descrizione;

  169.   @javax.xml.bind.annotation.XmlSchemaType(name="int")
  170.   @XmlAttribute(name="status",required=true)
  171.   protected int status;

  172. }