IntegrationError.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.XmlElement;
  25. import javax.xml.bind.annotation.XmlRootElement;
  26. import javax.xml.bind.annotation.XmlType;
  27. import org.openspcoop2.protocol.manifest.constants.IntegrationErrorMessageDetailType;
  28. import org.openspcoop2.protocol.manifest.constants.IntegrationErrorMessageType;
  29. import java.io.Serializable;


  30. /** <p>Java class for IntegrationError complex type.
  31.  *
  32.  * <p>The following schema fragment specifies the expected content contained within this class.
  33.  *
  34.  * <pre>
  35.  * &lt;complexType name="IntegrationError"&gt;
  36.  *      &lt;sequence&gt;
  37.  *          &lt;element name="errorCode" type="{http://www.openspcoop2.org/protocol/manifest}IntegrationErrorCode" minOccurs="1" maxOccurs="1"/&gt;
  38.  *      &lt;/sequence&gt;
  39.  *      &lt;attribute name="messageType" type="{http://www.openspcoop2.org/protocol/manifest}IntegrationErrorMessageType" use="required"/&gt;
  40.  *      &lt;attribute name="retry" type="{http://www.w3.org/2001/XMLSchema}boolean" use="optional" default="false"/&gt;
  41.  *      &lt;attribute name="errorMessage" type="{http://www.openspcoop2.org/protocol/manifest}IntegrationErrorMessageDetailType" use="optional" default="generic"/&gt;
  42.  * &lt;/complexType&gt;
  43.  * </pre>
  44.  *
  45.  * @version $Rev$, $Date$
  46.  *
  47.  * @author Poli Andrea (poli@link.it)
  48.  * @author $Author$
  49.  * */

  50. @XmlAccessorType(XmlAccessType.FIELD)
  51. @XmlType(name = "IntegrationError",
  52.   propOrder = {
  53.     "errorCode"
  54.   }
  55. )

  56. @XmlRootElement(name = "IntegrationError")

  57. public class IntegrationError extends org.openspcoop2.utils.beans.BaseBean implements Serializable , Cloneable {
  58.   public IntegrationError() {
  59.     super();
  60.   }

  61.   public IntegrationErrorCode getErrorCode() {
  62.     return this.errorCode;
  63.   }

  64.   public void setErrorCode(IntegrationErrorCode errorCode) {
  65.     this.errorCode = errorCode;
  66.   }

  67.   public void setMessageTypeRawEnumValue(String value) {
  68.     this.messageType = (IntegrationErrorMessageType) IntegrationErrorMessageType.toEnumConstantFromString(value);
  69.   }

  70.   public String getMessageTypeRawEnumValue() {
  71.     if(this.messageType == null){
  72.         return null;
  73.     }else{
  74.         return this.messageType.toString();
  75.     }
  76.   }

  77.   public org.openspcoop2.protocol.manifest.constants.IntegrationErrorMessageType getMessageType() {
  78.     return this.messageType;
  79.   }

  80.   public void setMessageType(org.openspcoop2.protocol.manifest.constants.IntegrationErrorMessageType messageType) {
  81.     this.messageType = messageType;
  82.   }

  83.   public boolean isRetry() {
  84.     return this.retry;
  85.   }

  86.   public boolean getRetry() {
  87.     return this.retry;
  88.   }

  89.   public void setRetry(boolean retry) {
  90.     this.retry = retry;
  91.   }

  92.   public void setErrorMessageRawEnumValue(String value) {
  93.     this.errorMessage = (IntegrationErrorMessageDetailType) IntegrationErrorMessageDetailType.toEnumConstantFromString(value);
  94.   }

  95.   public String getErrorMessageRawEnumValue() {
  96.     if(this.errorMessage == null){
  97.         return null;
  98.     }else{
  99.         return this.errorMessage.toString();
  100.     }
  101.   }

  102.   public org.openspcoop2.protocol.manifest.constants.IntegrationErrorMessageDetailType getErrorMessage() {
  103.     return this.errorMessage;
  104.   }

  105.   public void setErrorMessage(org.openspcoop2.protocol.manifest.constants.IntegrationErrorMessageDetailType errorMessage) {
  106.     this.errorMessage = errorMessage;
  107.   }

  108.   private static final long serialVersionUID = 1L;



  109.   @XmlElement(name="errorCode",required=true,nillable=false)
  110.   protected IntegrationErrorCode errorCode;

  111.   @javax.xml.bind.annotation.XmlTransient
  112.   protected java.lang.String messageTypeRawEnumValue;

  113.   @XmlAttribute(name="messageType",required=true)
  114.   protected IntegrationErrorMessageType messageType;

  115.   @javax.xml.bind.annotation.XmlSchemaType(name="boolean")
  116.   @XmlAttribute(name="retry",required=false)
  117.   protected boolean retry = false;

  118.   @javax.xml.bind.annotation.XmlTransient
  119.   protected java.lang.String errorMessageRawEnumValue;

  120.   @XmlAttribute(name="errorMessage",required=false)
  121.   protected IntegrationErrorMessageDetailType errorMessage = (IntegrationErrorMessageDetailType) IntegrationErrorMessageDetailType.toEnumConstantFromString("generic");

  122. }