Web.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.protocol.manifest;

  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 web complex type.
  30.  *
  31.  * <p>The following schema fragment specifies the expected content contained within this class.
  32.  *
  33.  * <pre>
  34.  * &lt;complexType name="web"&gt;
  35.  *      &lt;sequence&gt;
  36.  *          &lt;element name="context" type="{http://www.openspcoop2.org/protocol/manifest}Context" minOccurs="0" maxOccurs="unbounded"/&gt;
  37.  *          &lt;element name="emptyContext" type="{http://www.openspcoop2.org/protocol/manifest}WebEmptyContext" minOccurs="0" maxOccurs="1"/&gt;
  38.  *      &lt;/sequence&gt;
  39.  * &lt;/complexType&gt;
  40.  * </pre>
  41.  *
  42.  * @version $Rev$, $Date$
  43.  *
  44.  * @author Poli Andrea (poli@link.it)
  45.  * @author $Author$
  46.  * */

  47. @XmlAccessorType(XmlAccessType.FIELD)
  48. @XmlType(name = "web",
  49.   propOrder = {
  50.     "context",
  51.     "emptyContext"
  52.   }
  53. )

  54. @XmlRootElement(name = "web")

  55. public class Web extends org.openspcoop2.utils.beans.BaseBean implements Serializable , Cloneable {
  56.   public Web() {
  57.     super();
  58.   }

  59.   public void addContext(Context context) {
  60.     this.context.add(context);
  61.   }

  62.   public Context getContext(int index) {
  63.     return this.context.get( index );
  64.   }

  65.   public Context removeContext(int index) {
  66.     return this.context.remove( index );
  67.   }

  68.   public List<Context> getContextList() {
  69.     return this.context;
  70.   }

  71.   public void setContextList(List<Context> context) {
  72.     this.context=context;
  73.   }

  74.   public int sizeContextList() {
  75.     return this.context.size();
  76.   }

  77.   public WebEmptyContext getEmptyContext() {
  78.     return this.emptyContext;
  79.   }

  80.   public void setEmptyContext(WebEmptyContext emptyContext) {
  81.     this.emptyContext = emptyContext;
  82.   }

  83.   private static final long serialVersionUID = 1L;



  84.   @XmlElement(name="context",required=true,nillable=false)
  85.   private List<Context> context = new ArrayList<>();

  86.   /**
  87.    * Use method getContextList
  88.    * @return List&lt;Context&gt;
  89.   */
  90.   public List<Context> getContext() {
  91.     return this.getContextList();
  92.   }

  93.   /**
  94.    * Use method setContextList
  95.    * @param context List&lt;Context&gt;
  96.   */
  97.   public void setContext(List<Context> context) {
  98.     this.setContextList(context);
  99.   }

  100.   /**
  101.    * Use method sizeContextList
  102.    * @return lunghezza della lista
  103.   */
  104.   public int sizeContext() {
  105.     return this.sizeContextList();
  106.   }

  107.   @XmlElement(name="emptyContext",required=false,nillable=false)
  108.   protected WebEmptyContext emptyContext;

  109. }