public class PostRateException extends OperationFailureException
PostRateOp execution.
invalidReservationUID error occurs either when there is no
unresolved rating record present in the database for the reservationUID given
into the PostRateOp.invalidResolution error occurs when the resolution passed
into the PostRateOp is invalid (null or unknown).invalidResultType occurs when the result type is unknown.incompatibleCurrencies occurs when computing the total amount with amounts of
different currencies.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>
| Modifier and Type | Field and Description |
|---|---|
static int |
INCOMPATIBLE_CURRENCIES
Constant for
incompatibleCurrencies error. |
static int |
INVALID_RESERVATION_UID
Constant for
invalidReservationUID error. |
static int |
INVALID_RESOLUTION
Constant for
invalidResolution error. |
static int |
INVALID_RESULT_TYPE
Constant for
invalidResultType error. |
| Constructor and Description |
|---|
PostRateException()
Constructs an empty exception.
|
PostRateException(int reason,
java.lang.String message)
Creates a new
PostRateException with reason and message |
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element.
|
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
java.lang.String |
getMessage()
Gets the message for this
PostRateException. |
int |
getReason()
Gets the reason of this
PostRateException. |
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setMessage(java.lang.String message)
Sets the message for this
PostRateException. |
void |
setReason(int reason)
Sets the reason of this
PostRateException. |
java.lang.String |
toString() |
getOperandReferencepublic static final int INVALID_RESERVATION_UID
invalidReservationUID error.public static final int INVALID_RESOLUTION
invalidResolution error.public static final int INVALID_RESULT_TYPE
invalidResultType error.public static final int INCOMPATIBLE_CURRENCIES
incompatibleCurrencies error.public PostRateException()
public PostRateException(int reason,
java.lang.String message)
PostRateException with reason and messagereason - the reasonmessage - the additional messageINVALID_RESERVATION_UID,
INVALID_RESOLUTION,
INVALID_RESULT_TYPE,
INCOMPATIBLE_CURRENCIESpublic void setReason(int reason)
PostRateException.reason - the reason of this ExceptionINVALID_RESERVATION_UID,
INVALID_RESOLUTION,
INVALID_RESULT_TYPE,
INCOMPATIBLE_CURRENCIESpublic int getReason()
PostRateException.INVALID_RESERVATION_UID,
INVALID_RESOLUTION,
INVALID_RESULT_TYPE,
INCOMPATIBLE_CURRENCIESpublic void setMessage(java.lang.String message)
PostRateException.message - the message for this PostRateExceptionpublic java.lang.String getMessage()
PostRateException.getMessage in class java.lang.ThrowablePostRateExceptionpublic void setAttributes(XMLAttributes atts)
XMLMarshallableatts - The XML attributes of the current elementpublic void addCharacterData(java.lang.String cData)
XMLMarshallablecData - The character data to be addedpublic void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.tagName - The name of tag for the childchild - The child to be addedpublic void marshal(XMLOutputter output)
XMLMarshallableoutput - The XML output to marshal the object intopublic java.lang.String toString()
toString in class java.lang.Throwable