SubContextMapping.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.XmlAttribute;
  24. import javax.xml.bind.annotation.XmlRootElement;
  25. import javax.xml.bind.annotation.XmlType;
  26. import org.openspcoop2.protocol.manifest.constants.FunctionType;
  27. import org.openspcoop2.protocol.manifest.constants.MessageType;
  28. import java.io.Serializable;


  29. /** <p>Java class for SubContextMapping complex type.
  30.  *
  31.  * <p>The following schema fragment specifies the expected content contained within this class.
  32.  *
  33.  * <pre>
  34.  * &lt;complexType name="SubContextMapping"&gt;
  35.  *      &lt;xsd:simpleContent&gt;
  36.  *          &lt;xsd:extension base="{http://www.w3.org/2001/XMLSchema}string"&gt;
  37.  *              &lt;attribute name="function" type="{http://www.openspcoop2.org/protocol/manifest}FunctionType" use="optional"/&gt;
  38.  *              &lt;attribute name="messageType" type="{http://www.openspcoop2.org/protocol/manifest}MessageType" use="required"/&gt;
  39.  *          &lt;/xsd:extension&gt;
  40.  *      &lt;/xsd:simpleContent&gt;
  41.  * &lt;/complexType&gt;
  42.  * </pre>
  43.  *
  44.  * @version $Rev$, $Date$
  45.  *
  46.  * @author Poli Andrea (poli@link.it)
  47.  * @author $Author$
  48.  * */

  49. @XmlAccessorType(XmlAccessType.FIELD)
  50. @XmlType(name = "SubContextMapping")

  51. @XmlRootElement(name = "SubContextMapping")

  52. public class SubContextMapping extends org.openspcoop2.utils.beans.BaseBean implements Serializable , Cloneable {
  53.   public SubContextMapping() {
  54.     super();
  55.   }

  56.   public String getBase() {
  57.     if(this.base!=null && ("".equals(this.base)==false)){
  58.         return this.base.trim();
  59.     }else{
  60.         return null;
  61.     }

  62.   }

  63.   public void setBase(String base) {
  64.     this.base=base;
  65.   }

  66.   public void setFunctionRawEnumValue(String value) {
  67.     this.function = (FunctionType) FunctionType.toEnumConstantFromString(value);
  68.   }

  69.   public String getFunctionRawEnumValue() {
  70.     if(this.function == null){
  71.         return null;
  72.     }else{
  73.         return this.function.toString();
  74.     }
  75.   }

  76.   public org.openspcoop2.protocol.manifest.constants.FunctionType getFunction() {
  77.     return this.function;
  78.   }

  79.   public void setFunction(org.openspcoop2.protocol.manifest.constants.FunctionType function) {
  80.     this.function = function;
  81.   }

  82.   public void setMessageTypeRawEnumValue(String value) {
  83.     this.messageType = (MessageType) MessageType.toEnumConstantFromString(value);
  84.   }

  85.   public String getMessageTypeRawEnumValue() {
  86.     if(this.messageType == null){
  87.         return null;
  88.     }else{
  89.         return this.messageType.toString();
  90.     }
  91.   }

  92.   public org.openspcoop2.protocol.manifest.constants.MessageType getMessageType() {
  93.     return this.messageType;
  94.   }

  95.   public void setMessageType(org.openspcoop2.protocol.manifest.constants.MessageType messageType) {
  96.     this.messageType = messageType;
  97.   }

  98.   private static final long serialVersionUID = 1L;



  99.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  100.   @javax.xml.bind.annotation.XmlValue()
  101.   public String base;

  102.   @javax.xml.bind.annotation.XmlTransient
  103.   protected java.lang.String functionRawEnumValue;

  104.   @XmlAttribute(name="function",required=false)
  105.   protected FunctionType function;

  106.   @javax.xml.bind.annotation.XmlTransient
  107.   protected java.lang.String messageTypeRawEnumValue;

  108.   @XmlAttribute(name="messageType",required=true)
  109.   protected MessageType messageType;

  110. }