ResponseCachingConfigurazione.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 response-caching-configurazione complex type.
  32.  *
  33.  * <p>The following schema fragment specifies the expected content contained within this class.
  34.  *
  35.  * <pre>
  36.  * &lt;complexType name="response-caching-configurazione"&gt;
  37.  *      &lt;sequence&gt;
  38.  *          &lt;element name="hash-generator" type="{http://www.openspcoop2.org/core/config}response-caching-configurazione-hash-generator" minOccurs="0" maxOccurs="1"/&gt;
  39.  *          &lt;element name="control" type="{http://www.openspcoop2.org/core/config}response-caching-configurazione-control" minOccurs="0" maxOccurs="1"/&gt;
  40.  *          &lt;element name="regola" type="{http://www.openspcoop2.org/core/config}response-caching-configurazione-regola" minOccurs="0" maxOccurs="unbounded"/&gt;
  41.  *      &lt;/sequence&gt;
  42.  *      &lt;attribute name="stato" type="{http://www.openspcoop2.org/core/config}StatoFunzionalita" use="optional" default="disabilitato"/&gt;
  43.  *      &lt;attribute name="cache-timeout-seconds" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" use="optional" default="300"/&gt;
  44.  *      &lt;attribute name="max-message-size" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" use="optional"/&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 = "response-caching-configurazione",
  55.   propOrder = {
  56.     "hashGenerator",
  57.     "control",
  58.     "regola"
  59.   }
  60. )

  61. @XmlRootElement(name = "response-caching-configurazione")

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

  66.   public ResponseCachingConfigurazioneHashGenerator getHashGenerator() {
  67.     return this.hashGenerator;
  68.   }

  69.   public void setHashGenerator(ResponseCachingConfigurazioneHashGenerator hashGenerator) {
  70.     this.hashGenerator = hashGenerator;
  71.   }

  72.   public ResponseCachingConfigurazioneControl getControl() {
  73.     return this.control;
  74.   }

  75.   public void setControl(ResponseCachingConfigurazioneControl control) {
  76.     this.control = control;
  77.   }

  78.   public void addRegola(ResponseCachingConfigurazioneRegola regola) {
  79.     this.regola.add(regola);
  80.   }

  81.   public ResponseCachingConfigurazioneRegola getRegola(int index) {
  82.     return this.regola.get( index );
  83.   }

  84.   public ResponseCachingConfigurazioneRegola removeRegola(int index) {
  85.     return this.regola.remove( index );
  86.   }

  87.   public List<ResponseCachingConfigurazioneRegola> getRegolaList() {
  88.     return this.regola;
  89.   }

  90.   public void setRegolaList(List<ResponseCachingConfigurazioneRegola> regola) {
  91.     this.regola=regola;
  92.   }

  93.   public int sizeRegolaList() {
  94.     return this.regola.size();
  95.   }

  96.   public void setStatoRawEnumValue(String value) {
  97.     this.stato = (StatoFunzionalita) StatoFunzionalita.toEnumConstantFromString(value);
  98.   }

  99.   public String getStatoRawEnumValue() {
  100.     if(this.stato == null){
  101.         return null;
  102.     }else{
  103.         return this.stato.toString();
  104.     }
  105.   }

  106.   public org.openspcoop2.core.config.constants.StatoFunzionalita getStato() {
  107.     return this.stato;
  108.   }

  109.   public void setStato(org.openspcoop2.core.config.constants.StatoFunzionalita stato) {
  110.     this.stato = stato;
  111.   }

  112.   public java.lang.Integer getCacheTimeoutSeconds() {
  113.     return this.cacheTimeoutSeconds;
  114.   }

  115.   public void setCacheTimeoutSeconds(java.lang.Integer cacheTimeoutSeconds) {
  116.     this.cacheTimeoutSeconds = cacheTimeoutSeconds;
  117.   }

  118.   public java.lang.Long getMaxMessageSize() {
  119.     return this.maxMessageSize;
  120.   }

  121.   public void setMaxMessageSize(java.lang.Long maxMessageSize) {
  122.     this.maxMessageSize = maxMessageSize;
  123.   }

  124.   private static final long serialVersionUID = 1L;



  125.   @XmlElement(name="hash-generator",required=false,nillable=false)
  126.   protected ResponseCachingConfigurazioneHashGenerator hashGenerator;

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

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

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

  138.   /**
  139.    * Use method setRegolaList
  140.    * @param regola List&lt;ResponseCachingConfigurazioneRegola&gt;
  141.   */
  142.   public void setRegola(List<ResponseCachingConfigurazioneRegola> regola) {
  143.     this.setRegolaList(regola);
  144.   }

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

  152.   @javax.xml.bind.annotation.XmlTransient
  153.   protected java.lang.String statoRawEnumValue;

  154.   @XmlAttribute(name="stato",required=false)
  155.   protected StatoFunzionalita stato = (StatoFunzionalita) StatoFunzionalita.toEnumConstantFromString("disabilitato");

  156.   @javax.xml.bind.annotation.XmlSchemaType(name="unsignedInt")
  157.   @XmlAttribute(name="cache-timeout-seconds",required=false)
  158.   protected java.lang.Integer cacheTimeoutSeconds = java.lang.Integer.valueOf("300");

  159.   @javax.xml.bind.annotation.XmlSchemaType(name="unsignedLong")
  160.   @XmlAttribute(name="max-message-size",required=false)
  161.   protected java.lang.Long maxMessageSize;

  162. }