Class PostRateException

All Implemented Interfaces:
OperationResult, XMLMarshallable, Serializable

public class PostRateException extends OperationFailureException
Exception that may occur during a PostRateOp execution.
This Exception has one of the reasons below:
  • 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.
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 Details

    • INVALID_RESERVATION_UID

      public static final int INVALID_RESERVATION_UID
      Constant for invalidReservationUID error.
      See Also:
    • INVALID_RESOLUTION

      public static final int INVALID_RESOLUTION
      Constant for invalidResolution error.
      See Also:
    • INVALID_RESULT_TYPE

      public static final int INVALID_RESULT_TYPE
      Constant for invalidResultType error.
      See Also:
    • INCOMPATIBLE_CURRENCIES

      public static final int INCOMPATIBLE_CURRENCIES
      Constant for incompatibleCurrencies error.
      See Also:
  • Constructor Details

  • Method Details

    • setReason

      public void setReason(int reason)
      Sets the reason of this PostRateException.
      Parameters:
      reason - the reason of this Exception
      See Also:
    • getReason

      public int getReason()
      Gets the reason of this PostRateException.
      Returns:
      the reason of this Exception
      See Also:
    • setMessage

      public void setMessage(String message)
      Sets the message for this PostRateException.
      Parameters:
      message - the message for this PostRateException
    • getMessage

      public String getMessage()
      Gets the message for this PostRateException.
      Overrides:
      getMessage in class Throwable
      Returns:
      the message of this PostRateException
    • setAttributes

      public void setAttributes(XMLAttributes atts)
      Description copied from interface: XMLMarshallable
      Sets the attributes of the XML representation of the element being processed.
      Parameters:
      atts - The XML attributes of the current element
    • addCharacterData

      public void addCharacterData(String cData)
      Description copied from interface: XMLMarshallable
      Adds character data to the content element.
      Parameters:
      cData - The character data to be added
    • addChild

      public void addChild(String tagName, XMLMarshallable child)
      Description copied from interface: XMLMarshallable
      Adds a child to the object, the child representing the marshallable object which must be added to the element.
      Parameters:
      tagName - The name of tag for the child
      child - The child to be added
    • marshal

      public void marshal(XMLOutputter output)
      Description copied from interface: XMLMarshallable
      Gives an XML representation of this object, including its children.
      Parameters:
      output - The XML output to marshal the object into
    • toString

      public String toString()
      Overrides:
      toString in class Throwable