Package com.highdeal.pnr.hci
Class PreRateException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.highdeal.hci.OperationFailureException
com.highdeal.pnr.hci.PreRateException
- All Implemented Interfaces:
OperationResult,XMLMarshallable,Serializable
Exception that may occur during a
This Exception has one of the reasons below:
PreRateOp execution.
This Exception has one of the reasons below:
-
invalidReservationUIDerror occurs when the identifier isnull. -
invalidTTLerror is related to the ttl that can not be negative. -
invalidDefaultResolutionerror occurs when the default resolution passed into thePreRateOpis invalid (null or unknown). -
invalidResultTypeoccurs when the result type is unknown.
- See Also:
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="preRateFault">
<xs:complexType>
<xs:attribute name="reason" type="PreRateFaultType"/>
<xs:attribute name="message" type="xs:string"/>
</xs:complexType>
</xs:element><xs:simpleType name="PreRateFaultType">
<xs:restriction base="xs:string">
<xs:enumeration value="invalidReservationUID"/>
<xs:enumeration value="invalidTTL"/>
<xs:enumeration value="invalidDefaultResolution"/>
<xs:enumeration value="invalidResultType"/>
</xs:restriction>
</xs:simpleType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstant forinvalidDefaultResolutionerror.static final intConstant forinvalidReservationUIDerror.static final intConstant forinvalidResultTypeerror.static final intConstant forinvalidTTLerror. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty exception.PreRateException(int reason, String message) Creates a newPreRateExceptionwith reason and message -
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 message for thisPreRateException.intGets the reason of thisPreRateException.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.voidsetMessage(String message) Sets the message for thisPreRateException.voidsetReason(int reason) Sets the reason of thisPreRateException.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_RESERVATION_UID
public static final int INVALID_RESERVATION_UIDConstant forinvalidReservationUIDerror.- See Also:
-
INVALID_TTL
public static final int INVALID_TTLConstant forinvalidTTLerror.- See Also:
-
INVALID_DEFAULT_RESOLUTION
public static final int INVALID_DEFAULT_RESOLUTIONConstant forinvalidDefaultResolutionerror.- See Also:
-
INVALID_RESULT_TYPE
public static final int INVALID_RESULT_TYPEConstant forinvalidResultTypeerror.- See Also:
-
-
Constructor Details
-
PreRateException
public PreRateException()Constructs an empty exception. -
PreRateException
Creates a newPreRateExceptionwith reason and message- Parameters:
reason- the reasonmessage- the additional message- See Also:
-
-
Method Details
-
setReason
public void setReason(int reason) Sets the reason of thisPreRateException.- Parameters:
reason- the reason of thisPreRateException- See Also:
-
getReason
public int getReason()Gets the reason of thisPreRateException.- Returns:
- the reason of this
PreRateException - See Also:
-
setMessage
Sets the message for thisPreRateException.- Parameters:
message- the message for thisPreRateException
-
getMessage
Gets the message for thisPreRateException.- Overrides:
getMessagein classThrowable- Returns:
- the message of this
PreRateException
-
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
-