MessageContext.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.message.context;

  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 java.io.Serializable;


  28. /** <p>Java class for message-context complex type.
  29.  *
  30.  * <p>The following schema fragment specifies the expected content contained within this class.
  31.  *
  32.  * <pre>
  33.  * &lt;complexType name="message-context"&gt;
  34.  *      &lt;sequence&gt;
  35.  *          &lt;element name="transport-request-context" type="{http://www.openspcoop2.org/message/context}transport-request-context" minOccurs="0" maxOccurs="1"/&gt;
  36.  *          &lt;element name="transport-response-context" type="{http://www.openspcoop2.org/message/context}transport-response-context" minOccurs="0" maxOccurs="1"/&gt;
  37.  *          &lt;element name="forced-response" type="{http://www.openspcoop2.org/message/context}forced-response" minOccurs="0" maxOccurs="1"/&gt;
  38.  *          &lt;element name="serialized-context" type="{http://www.openspcoop2.org/message/context}serialized-context" minOccurs="0" maxOccurs="1"/&gt;
  39.  *          &lt;element name="content-type-parameters" type="{http://www.openspcoop2.org/message/context}content-type-parameters" minOccurs="0" maxOccurs="1"/&gt;
  40.  *          &lt;element name="content-length" type="{http://www.openspcoop2.org/message/context}content-length" minOccurs="0" maxOccurs="1"/&gt;
  41.  *          &lt;element name="soap" type="{http://www.openspcoop2.org/message/context}soap" minOccurs="0" maxOccurs="1"/&gt;
  42.  *      &lt;/sequence&gt;
  43.  *      &lt;attribute name="message-type" type="{http://www.w3.org/2001/XMLSchema}string" use="required"/&gt;
  44.  *      &lt;attribute name="message-role" type="{http://www.w3.org/2001/XMLSchema}string" use="required"/&gt;
  45.  *      &lt;attribute name="protocol" type="{http://www.w3.org/2001/XMLSchema}string" use="required"/&gt;
  46.  * &lt;/complexType&gt;
  47.  * </pre>
  48.  *
  49.  * @version $Rev$, $Date$
  50.  *
  51.  * @author Poli Andrea (poli@link.it)
  52.  * @author $Author$
  53.  * */

  54. @XmlAccessorType(XmlAccessType.FIELD)
  55. @XmlType(name = "message-context",
  56.   propOrder = {
  57.     "transportRequestContext",
  58.     "transportResponseContext",
  59.     "forcedResponse",
  60.     "serializedContext",
  61.     "contentTypeParameters",
  62.     "contentLength",
  63.     "soap"
  64.   }
  65. )

  66. @XmlRootElement(name = "message-context")

  67. public class MessageContext extends org.openspcoop2.utils.beans.BaseBeanWithId implements Serializable , Cloneable {
  68.   public MessageContext() {
  69.     super();
  70.   }

  71.   public TransportRequestContext getTransportRequestContext() {
  72.     return this.transportRequestContext;
  73.   }

  74.   public void setTransportRequestContext(TransportRequestContext transportRequestContext) {
  75.     this.transportRequestContext = transportRequestContext;
  76.   }

  77.   public TransportResponseContext getTransportResponseContext() {
  78.     return this.transportResponseContext;
  79.   }

  80.   public void setTransportResponseContext(TransportResponseContext transportResponseContext) {
  81.     this.transportResponseContext = transportResponseContext;
  82.   }

  83.   public ForcedResponse getForcedResponse() {
  84.     return this.forcedResponse;
  85.   }

  86.   public void setForcedResponse(ForcedResponse forcedResponse) {
  87.     this.forcedResponse = forcedResponse;
  88.   }

  89.   public SerializedContext getSerializedContext() {
  90.     return this.serializedContext;
  91.   }

  92.   public void setSerializedContext(SerializedContext serializedContext) {
  93.     this.serializedContext = serializedContext;
  94.   }

  95.   public ContentTypeParameters getContentTypeParameters() {
  96.     return this.contentTypeParameters;
  97.   }

  98.   public void setContentTypeParameters(ContentTypeParameters contentTypeParameters) {
  99.     this.contentTypeParameters = contentTypeParameters;
  100.   }

  101.   public ContentLength getContentLength() {
  102.     return this.contentLength;
  103.   }

  104.   public void setContentLength(ContentLength contentLength) {
  105.     this.contentLength = contentLength;
  106.   }

  107.   public Soap getSoap() {
  108.     return this.soap;
  109.   }

  110.   public void setSoap(Soap soap) {
  111.     this.soap = soap;
  112.   }

  113.   public java.lang.String getMessageType() {
  114.     return this.messageType;
  115.   }

  116.   public void setMessageType(java.lang.String messageType) {
  117.     this.messageType = messageType;
  118.   }

  119.   public java.lang.String getMessageRole() {
  120.     return this.messageRole;
  121.   }

  122.   public void setMessageRole(java.lang.String messageRole) {
  123.     this.messageRole = messageRole;
  124.   }

  125.   public java.lang.String getProtocol() {
  126.     return this.protocol;
  127.   }

  128.   public void setProtocol(java.lang.String protocol) {
  129.     this.protocol = protocol;
  130.   }

  131.   private static final long serialVersionUID = 1L;

  132.   private static org.openspcoop2.message.context.model.MessageContextModel modelStaticInstance = null;
  133.   private static synchronized void initModelStaticInstance(){
  134.       if(org.openspcoop2.message.context.MessageContext.modelStaticInstance==null){
  135.             org.openspcoop2.message.context.MessageContext.modelStaticInstance = new org.openspcoop2.message.context.model.MessageContextModel();
  136.       }
  137.   }
  138.   public static org.openspcoop2.message.context.model.MessageContextModel model(){
  139.       if(org.openspcoop2.message.context.MessageContext.modelStaticInstance==null){
  140.             initModelStaticInstance();
  141.       }
  142.       return org.openspcoop2.message.context.MessageContext.modelStaticInstance;
  143.   }


  144.   @XmlElement(name="transport-request-context",required=false,nillable=false)
  145.   protected TransportRequestContext transportRequestContext;

  146.   @XmlElement(name="transport-response-context",required=false,nillable=false)
  147.   protected TransportResponseContext transportResponseContext;

  148.   @XmlElement(name="forced-response",required=false,nillable=false)
  149.   protected ForcedResponse forcedResponse;

  150.   @XmlElement(name="serialized-context",required=false,nillable=false)
  151.   protected SerializedContext serializedContext;

  152.   @XmlElement(name="content-type-parameters",required=false,nillable=false)
  153.   protected ContentTypeParameters contentTypeParameters;

  154.   @XmlElement(name="content-length",required=false,nillable=false)
  155.   protected ContentLength contentLength;

  156.   @XmlElement(name="soap",required=false,nillable=false)
  157.   protected Soap soap;

  158.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  159.   @XmlAttribute(name="message-type",required=true)
  160.   protected java.lang.String messageType;

  161.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  162.   @XmlAttribute(name="message-role",required=true)
  163.   protected java.lang.String messageRole;

  164.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  165.   @XmlAttribute(name="protocol",required=true)
  166.   protected java.lang.String protocol;

  167. }