Package com.highdeal.pnr.hci
Class PostRateException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.highdeal.hci.OperationFailureException
com.highdeal.pnr.hci.PostRateException
- All Implemented Interfaces:
OperationResult,XMLMarshallable,Serializable
Exception that may occur during a
This Exception has one of the reasons below:
PostRateOp execution.
This Exception has one of the reasons below:
-
invalidReservationUIDerror occurs either when there is no unresolved rating record present in the database for the reservationUID given into thePostRateOp. -
invalidResolutionerror occurs when the resolution passed into thePostRateOpis invalid (null or unknown). -
invalidResultTypeoccurs when the result type is unknown. -
incompatibleCurrenciesoccurs when computing the total amount with amounts of different currencies.
- See Also:
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="postRateFault">
<xs:complexType>
<xs:attribute name="reason" type="PostRateFaultType"/>
<xs:attribute name="message" type="xs:string"/>
</xs:complexType>
</xs:element><xs:simpleType name="PostRateFaultType"> <xs:restriction base="xs:string"> <xs:enumeration value="invalidReservationUID"/> <xs:enumeration value="invalidResolution"/> <xs:enumeration value="invalidResultType"/> <xs:enumeration value="incompatibleCurrencies"/> </xs:restriction> </xs:simpleType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstant forincompatibleCurrencieserror.static final intConstant forinvalidReservationUIDerror.static final intConstant forinvalidResolutionerror.static final intConstant forinvalidResultTypeerror. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty exception.PostRateException(int reason, String message) Creates a newPostRateExceptionwith 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 thisPostRateException.intGets the reason of thisPostRateException.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 thisPostRateException.voidsetReason(int reason) Sets the reason of thisPostRateException.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_RESOLUTION
public static final int INVALID_RESOLUTIONConstant forinvalidResolutionerror.- See Also:
-
INVALID_RESULT_TYPE
public static final int INVALID_RESULT_TYPEConstant forinvalidResultTypeerror.- See Also:
-
INCOMPATIBLE_CURRENCIES
public static final int INCOMPATIBLE_CURRENCIESConstant forincompatibleCurrencieserror.- See Also:
-
-
Constructor Details
-
PostRateException
public PostRateException()Constructs an empty exception. -
PostRateException
Creates a newPostRateExceptionwith reason and message- Parameters:
reason- the reasonmessage- the additional message- See Also:
-
-
Method Details
-
setReason
public void setReason(int reason) Sets the reason of thisPostRateException.- Parameters:
reason- the reason of this Exception- See Also:
-
getReason
public int getReason()Gets the reason of thisPostRateException.- Returns:
- the reason of this Exception
- See Also:
-
setMessage
Sets the message for thisPostRateException.- Parameters:
message- the message for thisPostRateException
-
getMessage
Gets the message for thisPostRateException.- Overrides:
getMessagein classThrowable- Returns:
- the message of this
PostRateException
-
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
-