TrasformazioneRegola.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.config;

  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.config.constants.StatoFunzionalita;
  28. import java.io.Serializable;
  29. import java.util.ArrayList;
  30. import java.util.List;


  31. /** <p>Java class for trasformazione-regola complex type.
  32.  *
  33.  * <p>The following schema fragment specifies the expected content contained within this class.
  34.  *
  35.  * <pre>
  36.  * &lt;complexType name="trasformazione-regola"&gt;
  37.  *      &lt;sequence&gt;
  38.  *          &lt;element name="applicabilita" type="{http://www.openspcoop2.org/core/config}trasformazione-regola-applicabilita-richiesta" minOccurs="0" maxOccurs="1"/&gt;
  39.  *          &lt;element name="richiesta" type="{http://www.openspcoop2.org/core/config}trasformazione-regola-richiesta" minOccurs="0" maxOccurs="1"/&gt;
  40.  *          &lt;element name="risposta" type="{http://www.openspcoop2.org/core/config}trasformazione-regola-risposta" minOccurs="0" maxOccurs="unbounded"/&gt;
  41.  *      &lt;/sequence&gt;
  42.  *      &lt;attribute name="nome" type="{http://www.w3.org/2001/XMLSchema}string" use="required"/&gt;
  43.  *      &lt;attribute name="posizione" type="{http://www.w3.org/2001/XMLSchema}int" use="required"/&gt;
  44.  *      &lt;attribute name="stato" type="{http://www.openspcoop2.org/core/config}StatoFunzionalita" use="optional" default="abilitato"/&gt;
  45.  * &lt;/complexType&gt;
  46.  * </pre>
  47.  *
  48.  * @version $Rev$, $Date$
  49.  *
  50.  * @author Poli Andrea (poli@link.it)
  51.  * @author $Author$
  52.  * */

  53. @XmlAccessorType(XmlAccessType.FIELD)
  54. @XmlType(name = "trasformazione-regola",
  55.   propOrder = {
  56.     "applicabilita",
  57.     "richiesta",
  58.     "risposta"
  59.   }
  60. )

  61. @XmlRootElement(name = "trasformazione-regola")

  62. public class TrasformazioneRegola extends org.openspcoop2.utils.beans.BaseBeanWithId implements Serializable , Cloneable {
  63.   public TrasformazioneRegola() {
  64.     super();
  65.   }

  66.   public TrasformazioneRegolaApplicabilitaRichiesta getApplicabilita() {
  67.     return this.applicabilita;
  68.   }

  69.   public void setApplicabilita(TrasformazioneRegolaApplicabilitaRichiesta applicabilita) {
  70.     this.applicabilita = applicabilita;
  71.   }

  72.   public TrasformazioneRegolaRichiesta getRichiesta() {
  73.     return this.richiesta;
  74.   }

  75.   public void setRichiesta(TrasformazioneRegolaRichiesta richiesta) {
  76.     this.richiesta = richiesta;
  77.   }

  78.   public void addRisposta(TrasformazioneRegolaRisposta risposta) {
  79.     this.risposta.add(risposta);
  80.   }

  81.   public TrasformazioneRegolaRisposta getRisposta(int index) {
  82.     return this.risposta.get( index );
  83.   }

  84.   public TrasformazioneRegolaRisposta removeRisposta(int index) {
  85.     return this.risposta.remove( index );
  86.   }

  87.   public List<TrasformazioneRegolaRisposta> getRispostaList() {
  88.     return this.risposta;
  89.   }

  90.   public void setRispostaList(List<TrasformazioneRegolaRisposta> risposta) {
  91.     this.risposta=risposta;
  92.   }

  93.   public int sizeRispostaList() {
  94.     return this.risposta.size();
  95.   }

  96.   public java.lang.String getNome() {
  97.     return this.nome;
  98.   }

  99.   public void setNome(java.lang.String nome) {
  100.     this.nome = nome;
  101.   }

  102.   public int getPosizione() {
  103.     return this.posizione;
  104.   }

  105.   public void setPosizione(int posizione) {
  106.     this.posizione = posizione;
  107.   }

  108.   public void setStatoRawEnumValue(String value) {
  109.     this.stato = (StatoFunzionalita) StatoFunzionalita.toEnumConstantFromString(value);
  110.   }

  111.   public String getStatoRawEnumValue() {
  112.     if(this.stato == null){
  113.         return null;
  114.     }else{
  115.         return this.stato.toString();
  116.     }
  117.   }

  118.   public org.openspcoop2.core.config.constants.StatoFunzionalita getStato() {
  119.     return this.stato;
  120.   }

  121.   public void setStato(org.openspcoop2.core.config.constants.StatoFunzionalita stato) {
  122.     this.stato = stato;
  123.   }

  124.   private static final long serialVersionUID = 1L;



  125.   @XmlElement(name="applicabilita",required=false,nillable=false)
  126.   protected TrasformazioneRegolaApplicabilitaRichiesta applicabilita;

  127.   @XmlElement(name="richiesta",required=false,nillable=false)
  128.   protected TrasformazioneRegolaRichiesta richiesta;

  129.   @XmlElement(name="risposta",required=true,nillable=false)
  130.   private List<TrasformazioneRegolaRisposta> risposta = new ArrayList<>();

  131.   /**
  132.    * Use method getRispostaList
  133.    * @return List&lt;TrasformazioneRegolaRisposta&gt;
  134.   */
  135.   public List<TrasformazioneRegolaRisposta> getRisposta() {
  136.     return this.getRispostaList();
  137.   }

  138.   /**
  139.    * Use method setRispostaList
  140.    * @param risposta List&lt;TrasformazioneRegolaRisposta&gt;
  141.   */
  142.   public void setRisposta(List<TrasformazioneRegolaRisposta> risposta) {
  143.     this.setRispostaList(risposta);
  144.   }

  145.   /**
  146.    * Use method sizeRispostaList
  147.    * @return lunghezza della lista
  148.   */
  149.   public int sizeRisposta() {
  150.     return this.sizeRispostaList();
  151.   }

  152.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  153.   @XmlAttribute(name="nome",required=true)
  154.   protected java.lang.String nome;

  155.   @javax.xml.bind.annotation.XmlSchemaType(name="int")
  156.   @XmlAttribute(name="posizione",required=true)
  157.   protected int posizione;

  158.   @javax.xml.bind.annotation.XmlTransient
  159.   protected java.lang.String statoRawEnumValue;

  160.   @XmlAttribute(name="stato",required=false)
  161.   protected StatoFunzionalita stato = (StatoFunzionalita) StatoFunzionalita.toEnumConstantFromString("abilitato");

  162. }