Package com.highdeal.pnr.hci
Class UpdateRateException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.highdeal.hci.OperationFailureException
com.highdeal.pnr.hci.UpdateRateException
- All Implemented Interfaces:
OperationResult,XMLMarshallable,Serializable
Exception thrown when the
Update Rate operation failed due to several possible reasons.
- See Also:
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="updateRateFault">
<xs:complexType>
<xs:sequence>
<xs:element ref="serverFault" minOccurs="0" maxOccurs="1"/>
<xs:element ref="stopRateFault" minOccurs="0" maxOccurs="1"/>
<xs:element ref="startRateFault" minOccurs="0" maxOccurs="1"/>
<xs:element ref="stopRateResult" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="reason" type="UpdateRateFaultType"/>
<xs:attribute name="message" type="xs:string"/>
</xs:complexType>
</xs:element><xs:simpleType name="UpdateRateFaultType">
<xs:restriction base="xs:string">
<xs:enumeration value="invalidSessionID"/>
<xs:enumeration value="invalidResultType"/>
<xs:enumeration value="noSessionFound"/>
<xs:enumeration value="notEnoughSpace"/>
<xs:enumeration value="sessionNotAccessible"/>
</xs:restriction>
</xs:simpleType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe result type is not a valid one.static final intThe session is not valid or missing for instance.static final intThe session is not found.static final intThere is not enough space on to store a session.static final intThe session is linked to an access different than those of the update operation. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty udpate exception.UpdateRateException(int reason, String message) Constructs an udpate exception with a reason and a message.UpdateRateException(int reason, String message, StartRateException e) Constructs an udpate exception with a reason and a message.UpdateRateException(int reason, String message, StopRateException e) Constructs an udpate exception with a reason and a message.Constructs an udpate exception from a server failure exception on a start rate.Constructs an udpate exception from a start rate exception.Constructs an udpate exception from a stop rate exception. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.Gets the exception origin (StopRateException, StartRateException or ServerFailureException).getName()intGets the reason.Gets the stop rate result if the exception origin is a StartRateException exception or a ServerFailureException exception.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidsetReason(int reason) Sets the reason.voidsetStopRateResult(StopRateResult result) Sets the stop rate result.toString()Methods inherited from class com.highdeal.hci.OperationFailureException
getOperandReferenceMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
INVALID_SESSION_ID
public static final int INVALID_SESSION_IDThe session is not valid or missing for instance.- See Also:
-
INVALID_RESULT_TYPE
public static final int INVALID_RESULT_TYPEThe result type is not a valid one.- See Also:
-
NO_SESSION_FOUND
public static final int NO_SESSION_FOUNDThe session is not found.- See Also:
-
NOT_ENOUGH_SPACE
public static final int NOT_ENOUGH_SPACEThere is not enough space on to store a session.- See Also:
-
SESSION_NOT_ACCESSIBLE
public static final int SESSION_NOT_ACCESSIBLEThe session is linked to an access different than those of the update operation.- See Also:
-
-
Constructor Details
-
UpdateRateException
public UpdateRateException()Constructs an empty udpate exception. -
UpdateRateException
Constructs an udpate exception from a stop rate exception. -
UpdateRateException
Constructs an udpate exception from a start rate exception. -
UpdateRateException
Constructs an udpate exception from a server failure exception on a start rate. -
UpdateRateException
Constructs an udpate exception with a reason and a message.- Parameters:
reason- The reasonmessage- The message
-
UpdateRateException
Constructs an udpate exception with a reason and a message.- Parameters:
reason- The reasonmessage- The message
-
UpdateRateException
Constructs an udpate exception with a reason and a message.- Parameters:
reason- The reasonmessage- The message
-
-
Method Details
-
getName
-
setReason
public void setReason(int reason) Sets the reason.- Parameters:
reason- The reason
-
getReason
public int getReason()Gets the reason.- Returns:
- The reason
-
getExceptionOrigin
Gets the exception origin (StopRateException, StartRateException or ServerFailureException).- Returns:
- Can be null
-
getStopRateResult
Gets the stop rate result if the exception origin is a StartRateException exception or a ServerFailureException exception.- Returns:
- The stop rate result
-
setStopRateResult
Sets the stop rate result.- Parameters:
result-
-
getMessage
- Overrides:
getMessagein classThrowable
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Parameters:
atts- TheXML attributesof the current element
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Parameters:
cData- The character data to be added
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Parameters:
output- TheXML outputto marshal the object into
-
toString
-