ResourceRequest.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.XmlElement;
  24. import javax.xml.bind.annotation.XmlRootElement;
  25. import javax.xml.bind.annotation.XmlType;
  26. import java.io.Serializable;
  27. import java.util.ArrayList;
  28. import java.util.List;


  29. /** <p>Java class for resource-request complex type.
  30.  *
  31.  * <p>The following schema fragment specifies the expected content contained within this class.
  32.  *
  33.  * <pre>
  34.  * &lt;complexType name="resource-request"&gt;
  35.  *      &lt;sequence&gt;
  36.  *          &lt;element name="parameter" type="{http://www.openspcoop2.org/core/registry}resource-parameter" minOccurs="0" maxOccurs="unbounded"/&gt;
  37.  *          &lt;element name="representation" type="{http://www.openspcoop2.org/core/registry}resource-representation" minOccurs="0" maxOccurs="unbounded"/&gt;
  38.  *      &lt;/sequence&gt;
  39.  *      &lt;attribute name="id-resource" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" use="optional"/&gt;
  40.  * &lt;/complexType&gt;
  41.  * </pre>
  42.  *
  43.  * @version $Rev$, $Date$
  44.  *
  45.  * @author Poli Andrea (poli@link.it)
  46.  * @author $Author$
  47.  * */

  48. @XmlAccessorType(XmlAccessType.FIELD)
  49. @XmlType(name = "resource-request",
  50.   propOrder = {
  51.     "parameter",
  52.     "representation"
  53.   }
  54. )

  55. @XmlRootElement(name = "resource-request")

  56. public class ResourceRequest extends org.openspcoop2.utils.beans.BaseBeanWithId implements Serializable , Cloneable {
  57.   public ResourceRequest() {
  58.     super();
  59.   }

  60.   public void addParameter(ResourceParameter parameter) {
  61.     this.parameter.add(parameter);
  62.   }

  63.   public ResourceParameter getParameter(int index) {
  64.     return this.parameter.get( index );
  65.   }

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

  69.   public List<ResourceParameter> getParameterList() {
  70.     return this.parameter;
  71.   }

  72.   public void setParameterList(List<ResourceParameter> parameter) {
  73.     this.parameter=parameter;
  74.   }

  75.   public int sizeParameterList() {
  76.     return this.parameter.size();
  77.   }

  78.   public void addRepresentation(ResourceRepresentation representation) {
  79.     this.representation.add(representation);
  80.   }

  81.   public ResourceRepresentation getRepresentation(int index) {
  82.     return this.representation.get( index );
  83.   }

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

  87.   public List<ResourceRepresentation> getRepresentationList() {
  88.     return this.representation;
  89.   }

  90.   public void setRepresentationList(List<ResourceRepresentation> representation) {
  91.     this.representation=representation;
  92.   }

  93.   public int sizeRepresentationList() {
  94.     return this.representation.size();
  95.   }

  96.   public java.lang.Long getIdResource() {
  97.     return this.idResource;
  98.   }

  99.   public void setIdResource(java.lang.Long idResource) {
  100.     this.idResource = idResource;
  101.   }

  102.   private static final long serialVersionUID = 1L;



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

  105.   /**
  106.    * Use method getParameterList
  107.    * @return List&lt;ResourceParameter&gt;
  108.   */
  109.   public List<ResourceParameter> getParameter() {
  110.     return this.getParameterList();
  111.   }

  112.   /**
  113.    * Use method setParameterList
  114.    * @param parameter List&lt;ResourceParameter&gt;
  115.   */
  116.   public void setParameter(List<ResourceParameter> parameter) {
  117.     this.setParameterList(parameter);
  118.   }

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

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

  128.   /**
  129.    * Use method getRepresentationList
  130.    * @return List&lt;ResourceRepresentation&gt;
  131.   */
  132.   public List<ResourceRepresentation> getRepresentation() {
  133.     return this.getRepresentationList();
  134.   }

  135.   /**
  136.    * Use method setRepresentationList
  137.    * @param representation List&lt;ResourceRepresentation&gt;
  138.   */
  139.   public void setRepresentation(List<ResourceRepresentation> representation) {
  140.     this.setRepresentationList(representation);
  141.   }

  142.   /**
  143.    * Use method sizeRepresentationList
  144.    * @return lunghezza della lista
  145.   */
  146.   public int sizeRepresentation() {
  147.     return this.sizeRepresentationList();
  148.   }

  149.   @javax.xml.bind.annotation.XmlTransient
  150.   protected java.lang.Long idResource;

  151. }