Back to index

nordugrid-arc-nox  1.1.0~rc6
SOAPFault.java
Go to the documentation of this file.
00001 /* ----------------------------------------------------------------------------
00002  * This file was automatically generated by SWIG (http://www.swig.org).
00003  * Version 1.3.36
00004  *
00005  * Do not make changes to this file unless you know what you are doing--modify
00006  * the SWIG interface file instead.
00007  * ----------------------------------------------------------------------------- */
00008 
00009 package nordugrid.arc;
00010 
00011 public class SOAPFault {
00012   private long swigCPtr;
00013   protected boolean swigCMemOwn;
00014 
00015   protected SOAPFault(long cPtr, boolean cMemoryOwn) {
00016     swigCMemOwn = cMemoryOwn;
00017     swigCPtr = cPtr;
00018   }
00019 
00020   protected static long getCPtr(SOAPFault obj) {
00021     return (obj == null) ? 0 : obj.swigCPtr;
00022   }
00023 
00024   public synchronized void delete() {
00025     if(swigCPtr != 0 && swigCMemOwn) {
00026       swigCMemOwn = false;
00027       throw new UnsupportedOperationException("C++ destructor does not have public access");
00028     }
00029     swigCPtr = 0;
00030   }
00031 
00032   public SOAPFault(XMLNode body) {
00033     this(arcJNI.new_SOAPFault__SWIG_0(XMLNode.getCPtr(body), body), true);
00034   }
00035 
00036   public SOAPFault(XMLNode body, SOAPFault.SOAPFaultCode code, String reason) {
00037     this(arcJNI.new_SOAPFault__SWIG_1(XMLNode.getCPtr(body), body, code.swigValue(), reason), true);
00038   }
00039 
00040   public SOAPFault(XMLNode body, SOAPFault.SOAPFaultCode code, String reason, boolean ver12) {
00041     this(arcJNI.new_SOAPFault__SWIG_2(XMLNode.getCPtr(body), body, code.swigValue(), reason, ver12), true);
00042   }
00043 
00044   public boolean toBool() {
00045     return arcJNI.SOAPFault_toBool(swigCPtr, this);
00046   }
00047 
00048   public SOAPFault.SOAPFaultCode Code() {
00049     return SOAPFault.SOAPFaultCode.swigToEnum(arcJNI.SOAPFault_Code__SWIG_0(swigCPtr, this));
00050   }
00051 
00052   public void Code(SOAPFault.SOAPFaultCode code) {
00053     arcJNI.SOAPFault_Code__SWIG_1(swigCPtr, this, code.swigValue());
00054   }
00055 
00056   public String Subcode(int level) {
00057     return arcJNI.SOAPFault_Subcode__SWIG_0(swigCPtr, this, level);
00058   }
00059 
00060   public void Subcode(int level, String subcode) {
00061     arcJNI.SOAPFault_Subcode__SWIG_1(swigCPtr, this, level, subcode);
00062   }
00063 
00064   public String Reason(int num) {
00065     return arcJNI.SOAPFault_Reason__SWIG_0(swigCPtr, this, num);
00066   }
00067 
00068   public String Reason() {
00069     return arcJNI.SOAPFault_Reason__SWIG_1(swigCPtr, this);
00070   }
00071 
00072   public void Reason(int num, String reason) {
00073     arcJNI.SOAPFault_Reason__SWIG_2(swigCPtr, this, num, reason);
00074   }
00075 
00076   public void Reason(String reason) {
00077     arcJNI.SOAPFault_Reason__SWIG_3(swigCPtr, this, reason);
00078   }
00079 
00080   public String Node() {
00081     return arcJNI.SOAPFault_Node__SWIG_0(swigCPtr, this);
00082   }
00083 
00084   public void Node(String node) {
00085     arcJNI.SOAPFault_Node__SWIG_1(swigCPtr, this, node);
00086   }
00087 
00088   public String Role() {
00089     return arcJNI.SOAPFault_Role__SWIG_0(swigCPtr, this);
00090   }
00091 
00092   public void Role(String role) {
00093     arcJNI.SOAPFault_Role__SWIG_1(swigCPtr, this, role);
00094   }
00095 
00096   public XMLNode Detail(boolean create) {
00097     return new XMLNode(arcJNI.SOAPFault_Detail__SWIG_0(swigCPtr, this, create), true);
00098   }
00099 
00100   public XMLNode Detail() {
00101     return new XMLNode(arcJNI.SOAPFault_Detail__SWIG_1(swigCPtr, this), true);
00102   }
00103 
00104   public static SOAPEnvelope MakeSOAPFault(SOAPFault.SOAPFaultCode code, String reason) {
00105     long cPtr = arcJNI.SOAPFault_MakeSOAPFault__SWIG_0(code.swigValue(), reason);
00106     return (cPtr == 0) ? null : new SOAPEnvelope(cPtr, false);
00107   }
00108 
00109   public static SOAPEnvelope MakeSOAPFault(SOAPFault.SOAPFaultCode code) {
00110     long cPtr = arcJNI.SOAPFault_MakeSOAPFault__SWIG_1(code.swigValue());
00111     return (cPtr == 0) ? null : new SOAPEnvelope(cPtr, false);
00112   }
00113 
00114   public final static class SOAPFaultCode {
00115     public final static SOAPFaultCode undefined = new SOAPFaultCode("undefined");
00116     public final static SOAPFaultCode unknown = new SOAPFaultCode("unknown");
00117     public final static SOAPFaultCode VersionMismatch = new SOAPFaultCode("VersionMismatch");
00118     public final static SOAPFaultCode MustUnderstand = new SOAPFaultCode("MustUnderstand");
00119     public final static SOAPFaultCode Sender = new SOAPFaultCode("Sender");
00120     public final static SOAPFaultCode Receiver = new SOAPFaultCode("Receiver");
00121     public final static SOAPFaultCode DataEncodingUnknown = new SOAPFaultCode("DataEncodingUnknown");
00122 
00123     public final int swigValue() {
00124       return swigValue;
00125     }
00126 
00127     public String toString() {
00128       return swigName;
00129     }
00130 
00131     public static SOAPFaultCode swigToEnum(int swigValue) {
00132       if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
00133         return swigValues[swigValue];
00134       for (int i = 0; i < swigValues.length; i++)
00135         if (swigValues[i].swigValue == swigValue)
00136           return swigValues[i];
00137       throw new IllegalArgumentException("No enum " + SOAPFaultCode.class + " with value " + swigValue);
00138     }
00139 
00140     private SOAPFaultCode(String swigName) {
00141       this.swigName = swigName;
00142       this.swigValue = swigNext++;
00143     }
00144 
00145     private SOAPFaultCode(String swigName, int swigValue) {
00146       this.swigName = swigName;
00147       this.swigValue = swigValue;
00148       swigNext = swigValue+1;
00149     }
00150 
00151     private SOAPFaultCode(String swigName, SOAPFaultCode swigEnum) {
00152       this.swigName = swigName;
00153       this.swigValue = swigEnum.swigValue;
00154       swigNext = this.swigValue+1;
00155     }
00156 
00157     private static SOAPFaultCode[] swigValues = { undefined, unknown, VersionMismatch, MustUnderstand, Sender, Receiver, DataEncodingUnknown };
00158     private static int swigNext = 0;
00159     private final int swigValue;
00160     private final String swigName;
00161   }
00162 
00163 }