Resource.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 org.openspcoop2.core.registry.constants.HttpMethod;
  28. import org.openspcoop2.core.registry.constants.MessageType;
  29. import org.openspcoop2.core.registry.constants.StatoFunzionalita;
  30. import java.io.Serializable;
  31. import java.util.ArrayList;
  32. import java.util.List;


  33. /** <p>Java class for resource complex type.
  34.  *
  35.  * <p>The following schema fragment specifies the expected content contained within this class.
  36.  *
  37.  * <pre>
  38.  * &lt;complexType name="resource"&gt;
  39.  *      &lt;sequence&gt;
  40.  *          &lt;element name="request" type="{http://www.openspcoop2.org/core/registry}resource-request" minOccurs="0" maxOccurs="1"/&gt;
  41.  *          &lt;element name="response" type="{http://www.openspcoop2.org/core/registry}resource-response" minOccurs="0" maxOccurs="unbounded"/&gt;
  42.  *          &lt;element name="protocol-property" type="{http://www.openspcoop2.org/core/registry}protocol-property" minOccurs="0" maxOccurs="unbounded"/&gt;
  43.  *      &lt;/sequence&gt;
  44.  *      &lt;attribute name="prof-azione" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  45.  *      &lt;attribute name="id-accordo" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" use="optional"/&gt;
  46.  *      &lt;attribute name="nome" type="{http://www.w3.org/2001/XMLSchema}string" use="required"/&gt;
  47.  *      &lt;attribute name="descrizione" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  48.  *      &lt;attribute name="path" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  49.  *      &lt;attribute name="method" type="{http://www.openspcoop2.org/core/registry}HttpMethod" use="optional"/&gt;
  50.  *      &lt;attribute name="message-type" type="{http://www.openspcoop2.org/core/registry}MessageType" use="optional"/&gt;
  51.  *      &lt;attribute name="request-message-type" type="{http://www.openspcoop2.org/core/registry}MessageType" use="optional"/&gt;
  52.  *      &lt;attribute name="response-message-type" type="{http://www.openspcoop2.org/core/registry}MessageType" use="optional"/&gt;
  53.  *      &lt;attribute name="filtro-duplicati" type="{http://www.openspcoop2.org/core/registry}StatoFunzionalita" use="optional"/&gt;
  54.  *      &lt;attribute name="conferma-ricezione" type="{http://www.openspcoop2.org/core/registry}StatoFunzionalita" use="optional"/&gt;
  55.  *      &lt;attribute name="id-collaborazione" type="{http://www.openspcoop2.org/core/registry}StatoFunzionalita" use="optional"/&gt;
  56.  *      &lt;attribute name="id-riferimento-richiesta" type="{http://www.openspcoop2.org/core/registry}StatoFunzionalita" use="optional"/&gt;
  57.  *      &lt;attribute name="consegna-in-ordine" type="{http://www.openspcoop2.org/core/registry}StatoFunzionalita" use="optional"/&gt;
  58.  *      &lt;attribute name="scadenza" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  59.  * &lt;/complexType&gt;
  60.  * </pre>
  61.  *
  62.  * @version $Rev$, $Date$
  63.  *
  64.  * @author Poli Andrea (poli@link.it)
  65.  * @author $Author$
  66.  * */

  67. @XmlAccessorType(XmlAccessType.FIELD)
  68. @XmlType(name = "resource",
  69.   propOrder = {
  70.     "request",
  71.     "response",
  72.     "protocolProperty"
  73.   }
  74. )

  75. @XmlRootElement(name = "resource")

  76. public class Resource extends org.openspcoop2.utils.beans.BaseBeanWithId implements Serializable , Cloneable {
  77.   public Resource() {
  78.     super();
  79.   }

  80.   public ResourceRequest getRequest() {
  81.     return this.request;
  82.   }

  83.   public void setRequest(ResourceRequest request) {
  84.     this.request = request;
  85.   }

  86.   public void addResponse(ResourceResponse response) {
  87.     this.response.add(response);
  88.   }

  89.   public ResourceResponse getResponse(int index) {
  90.     return this.response.get( index );
  91.   }

  92.   public ResourceResponse removeResponse(int index) {
  93.     return this.response.remove( index );
  94.   }

  95.   public List<ResourceResponse> getResponseList() {
  96.     return this.response;
  97.   }

  98.   public void setResponseList(List<ResourceResponse> response) {
  99.     this.response=response;
  100.   }

  101.   public int sizeResponseList() {
  102.     return this.response.size();
  103.   }

  104.   public void addProtocolProperty(ProtocolProperty protocolProperty) {
  105.     this.protocolProperty.add(protocolProperty);
  106.   }

  107.   public ProtocolProperty getProtocolProperty(int index) {
  108.     return this.protocolProperty.get( index );
  109.   }

  110.   public ProtocolProperty removeProtocolProperty(int index) {
  111.     return this.protocolProperty.remove( index );
  112.   }

  113.   public List<ProtocolProperty> getProtocolPropertyList() {
  114.     return this.protocolProperty;
  115.   }

  116.   public void setProtocolPropertyList(List<ProtocolProperty> protocolProperty) {
  117.     this.protocolProperty=protocolProperty;
  118.   }

  119.   public int sizeProtocolPropertyList() {
  120.     return this.protocolProperty.size();
  121.   }

  122.   public java.lang.String getProfAzione() {
  123.     return this.profAzione;
  124.   }

  125.   public void setProfAzione(java.lang.String profAzione) {
  126.     this.profAzione = profAzione;
  127.   }

  128.   public java.lang.Long getIdAccordo() {
  129.     return this.idAccordo;
  130.   }

  131.   public void setIdAccordo(java.lang.Long idAccordo) {
  132.     this.idAccordo = idAccordo;
  133.   }

  134.   public java.lang.String getNome() {
  135.     return this.nome;
  136.   }

  137.   public void setNome(java.lang.String nome) {
  138.     this.nome = nome;
  139.   }

  140.   public java.lang.String getDescrizione() {
  141.     return this.descrizione;
  142.   }

  143.   public void setDescrizione(java.lang.String descrizione) {
  144.     this.descrizione = descrizione;
  145.   }

  146.   public java.lang.String getPath() {
  147.     return this.path;
  148.   }

  149.   public void setPath(java.lang.String path) {
  150.     this.path = path;
  151.   }

  152.   public void setMethodRawEnumValue(String value) {
  153.     this.method = (HttpMethod) HttpMethod.toEnumConstantFromString(value);
  154.   }

  155.   public String getMethodRawEnumValue() {
  156.     if(this.method == null){
  157.         return null;
  158.     }else{
  159.         return this.method.toString();
  160.     }
  161.   }

  162.   public org.openspcoop2.core.registry.constants.HttpMethod getMethod() {
  163.     return this.method;
  164.   }

  165.   public void setMethod(org.openspcoop2.core.registry.constants.HttpMethod method) {
  166.     this.method = method;
  167.   }

  168.   public void setMessageTypeRawEnumValue(String value) {
  169.     this.messageType = (MessageType) MessageType.toEnumConstantFromString(value);
  170.   }

  171.   public String getMessageTypeRawEnumValue() {
  172.     if(this.messageType == null){
  173.         return null;
  174.     }else{
  175.         return this.messageType.toString();
  176.     }
  177.   }

  178.   public org.openspcoop2.core.registry.constants.MessageType getMessageType() {
  179.     return this.messageType;
  180.   }

  181.   public void setMessageType(org.openspcoop2.core.registry.constants.MessageType messageType) {
  182.     this.messageType = messageType;
  183.   }

  184.   public void setRequestMessageTypeRawEnumValue(String value) {
  185.     this.requestMessageType = (MessageType) MessageType.toEnumConstantFromString(value);
  186.   }

  187.   public String getRequestMessageTypeRawEnumValue() {
  188.     if(this.requestMessageType == null){
  189.         return null;
  190.     }else{
  191.         return this.requestMessageType.toString();
  192.     }
  193.   }

  194.   public org.openspcoop2.core.registry.constants.MessageType getRequestMessageType() {
  195.     return this.requestMessageType;
  196.   }

  197.   public void setRequestMessageType(org.openspcoop2.core.registry.constants.MessageType requestMessageType) {
  198.     this.requestMessageType = requestMessageType;
  199.   }

  200.   public void setResponseMessageTypeRawEnumValue(String value) {
  201.     this.responseMessageType = (MessageType) MessageType.toEnumConstantFromString(value);
  202.   }

  203.   public String getResponseMessageTypeRawEnumValue() {
  204.     if(this.responseMessageType == null){
  205.         return null;
  206.     }else{
  207.         return this.responseMessageType.toString();
  208.     }
  209.   }

  210.   public org.openspcoop2.core.registry.constants.MessageType getResponseMessageType() {
  211.     return this.responseMessageType;
  212.   }

  213.   public void setResponseMessageType(org.openspcoop2.core.registry.constants.MessageType responseMessageType) {
  214.     this.responseMessageType = responseMessageType;
  215.   }

  216.   public void setFiltroDuplicatiRawEnumValue(String value) {
  217.     this.filtroDuplicati = (StatoFunzionalita) StatoFunzionalita.toEnumConstantFromString(value);
  218.   }

  219.   public String getFiltroDuplicatiRawEnumValue() {
  220.     if(this.filtroDuplicati == null){
  221.         return null;
  222.     }else{
  223.         return this.filtroDuplicati.toString();
  224.     }
  225.   }

  226.   public org.openspcoop2.core.registry.constants.StatoFunzionalita getFiltroDuplicati() {
  227.     return this.filtroDuplicati;
  228.   }

  229.   public void setFiltroDuplicati(org.openspcoop2.core.registry.constants.StatoFunzionalita filtroDuplicati) {
  230.     this.filtroDuplicati = filtroDuplicati;
  231.   }

  232.   public void setConfermaRicezioneRawEnumValue(String value) {
  233.     this.confermaRicezione = (StatoFunzionalita) StatoFunzionalita.toEnumConstantFromString(value);
  234.   }

  235.   public String getConfermaRicezioneRawEnumValue() {
  236.     if(this.confermaRicezione == null){
  237.         return null;
  238.     }else{
  239.         return this.confermaRicezione.toString();
  240.     }
  241.   }

  242.   public org.openspcoop2.core.registry.constants.StatoFunzionalita getConfermaRicezione() {
  243.     return this.confermaRicezione;
  244.   }

  245.   public void setConfermaRicezione(org.openspcoop2.core.registry.constants.StatoFunzionalita confermaRicezione) {
  246.     this.confermaRicezione = confermaRicezione;
  247.   }

  248.   public void setIdCollaborazioneRawEnumValue(String value) {
  249.     this.idCollaborazione = (StatoFunzionalita) StatoFunzionalita.toEnumConstantFromString(value);
  250.   }

  251.   public String getIdCollaborazioneRawEnumValue() {
  252.     if(this.idCollaborazione == null){
  253.         return null;
  254.     }else{
  255.         return this.idCollaborazione.toString();
  256.     }
  257.   }

  258.   public org.openspcoop2.core.registry.constants.StatoFunzionalita getIdCollaborazione() {
  259.     return this.idCollaborazione;
  260.   }

  261.   public void setIdCollaborazione(org.openspcoop2.core.registry.constants.StatoFunzionalita idCollaborazione) {
  262.     this.idCollaborazione = idCollaborazione;
  263.   }

  264.   public void setIdRiferimentoRichiestaRawEnumValue(String value) {
  265.     this.idRiferimentoRichiesta = (StatoFunzionalita) StatoFunzionalita.toEnumConstantFromString(value);
  266.   }

  267.   public String getIdRiferimentoRichiestaRawEnumValue() {
  268.     if(this.idRiferimentoRichiesta == null){
  269.         return null;
  270.     }else{
  271.         return this.idRiferimentoRichiesta.toString();
  272.     }
  273.   }

  274.   public org.openspcoop2.core.registry.constants.StatoFunzionalita getIdRiferimentoRichiesta() {
  275.     return this.idRiferimentoRichiesta;
  276.   }

  277.   public void setIdRiferimentoRichiesta(org.openspcoop2.core.registry.constants.StatoFunzionalita idRiferimentoRichiesta) {
  278.     this.idRiferimentoRichiesta = idRiferimentoRichiesta;
  279.   }

  280.   public void setConsegnaInOrdineRawEnumValue(String value) {
  281.     this.consegnaInOrdine = (StatoFunzionalita) StatoFunzionalita.toEnumConstantFromString(value);
  282.   }

  283.   public String getConsegnaInOrdineRawEnumValue() {
  284.     if(this.consegnaInOrdine == null){
  285.         return null;
  286.     }else{
  287.         return this.consegnaInOrdine.toString();
  288.     }
  289.   }

  290.   public org.openspcoop2.core.registry.constants.StatoFunzionalita getConsegnaInOrdine() {
  291.     return this.consegnaInOrdine;
  292.   }

  293.   public void setConsegnaInOrdine(org.openspcoop2.core.registry.constants.StatoFunzionalita consegnaInOrdine) {
  294.     this.consegnaInOrdine = consegnaInOrdine;
  295.   }

  296.   public java.lang.String getScadenza() {
  297.     return this.scadenza;
  298.   }

  299.   public void setScadenza(java.lang.String scadenza) {
  300.     this.scadenza = scadenza;
  301.   }

  302.   private static final long serialVersionUID = 1L;



  303.   @XmlElement(name="request",required=false,nillable=false)
  304.   protected ResourceRequest request;

  305.   @XmlElement(name="response",required=true,nillable=false)
  306.   private List<ResourceResponse> response = new ArrayList<>();

  307.   /**
  308.    * Use method getResponseList
  309.    * @return List&lt;ResourceResponse&gt;
  310.   */
  311.   public List<ResourceResponse> getResponse() {
  312.     return this.getResponseList();
  313.   }

  314.   /**
  315.    * Use method setResponseList
  316.    * @param response List&lt;ResourceResponse&gt;
  317.   */
  318.   public void setResponse(List<ResourceResponse> response) {
  319.     this.setResponseList(response);
  320.   }

  321.   /**
  322.    * Use method sizeResponseList
  323.    * @return lunghezza della lista
  324.   */
  325.   public int sizeResponse() {
  326.     return this.sizeResponseList();
  327.   }

  328.   @XmlElement(name="protocol-property",required=true,nillable=false)
  329.   private List<ProtocolProperty> protocolProperty = new ArrayList<>();

  330.   /**
  331.    * Use method getProtocolPropertyList
  332.    * @return List&lt;ProtocolProperty&gt;
  333.   */
  334.   public List<ProtocolProperty> getProtocolProperty() {
  335.     return this.getProtocolPropertyList();
  336.   }

  337.   /**
  338.    * Use method setProtocolPropertyList
  339.    * @param protocolProperty List&lt;ProtocolProperty&gt;
  340.   */
  341.   public void setProtocolProperty(List<ProtocolProperty> protocolProperty) {
  342.     this.setProtocolPropertyList(protocolProperty);
  343.   }

  344.   /**
  345.    * Use method sizeProtocolPropertyList
  346.    * @return lunghezza della lista
  347.   */
  348.   public int sizeProtocolProperty() {
  349.     return this.sizeProtocolPropertyList();
  350.   }

  351.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  352.   @XmlAttribute(name="prof-azione",required=false)
  353.   protected java.lang.String profAzione;

  354.   @javax.xml.bind.annotation.XmlTransient
  355.   protected java.lang.Long idAccordo;

  356.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  357.   @XmlAttribute(name="nome",required=true)
  358.   protected java.lang.String nome;

  359.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  360.   @XmlAttribute(name="descrizione",required=false)
  361.   protected java.lang.String descrizione;

  362.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  363.   @XmlAttribute(name="path",required=false)
  364.   protected java.lang.String path;

  365.   @javax.xml.bind.annotation.XmlTransient
  366.   protected java.lang.String methodRawEnumValue;

  367.   @XmlAttribute(name="method",required=false)
  368.   protected HttpMethod method;

  369.   @javax.xml.bind.annotation.XmlTransient
  370.   protected java.lang.String messageTypeRawEnumValue;

  371.   @XmlAttribute(name="message-type",required=false)
  372.   protected MessageType messageType;

  373.   @javax.xml.bind.annotation.XmlTransient
  374.   protected java.lang.String requestMessageTypeRawEnumValue;

  375.   @XmlAttribute(name="request-message-type",required=false)
  376.   protected MessageType requestMessageType;

  377.   @javax.xml.bind.annotation.XmlTransient
  378.   protected java.lang.String responseMessageTypeRawEnumValue;

  379.   @XmlAttribute(name="response-message-type",required=false)
  380.   protected MessageType responseMessageType;

  381.   @javax.xml.bind.annotation.XmlTransient
  382.   protected java.lang.String filtroDuplicatiRawEnumValue;

  383.   @XmlAttribute(name="filtro-duplicati",required=false)
  384.   protected StatoFunzionalita filtroDuplicati;

  385.   @javax.xml.bind.annotation.XmlTransient
  386.   protected java.lang.String confermaRicezioneRawEnumValue;

  387.   @XmlAttribute(name="conferma-ricezione",required=false)
  388.   protected StatoFunzionalita confermaRicezione;

  389.   @javax.xml.bind.annotation.XmlTransient
  390.   protected java.lang.String idCollaborazioneRawEnumValue;

  391.   @XmlAttribute(name="id-collaborazione",required=false)
  392.   protected StatoFunzionalita idCollaborazione;

  393.   @javax.xml.bind.annotation.XmlTransient
  394.   protected java.lang.String idRiferimentoRichiestaRawEnumValue;

  395.   @XmlAttribute(name="id-riferimento-richiesta",required=false)
  396.   protected StatoFunzionalita idRiferimentoRichiesta;

  397.   @javax.xml.bind.annotation.XmlTransient
  398.   protected java.lang.String consegnaInOrdineRawEnumValue;

  399.   @XmlAttribute(name="consegna-in-ordine",required=false)
  400.   protected StatoFunzionalita consegnaInOrdine;

  401.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  402.   @XmlAttribute(name="scadenza",required=false)
  403.   protected java.lang.String scadenza;

  404. }