Class InvalidCDRException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.highdeal.hci.OperationFailureException
com.highdeal.bart.hci.InvalidCDRException
All Implemented Interfaces:
com.highdeal.hci.OperationResult, XMLMarshallable, Serializable

public class InvalidCDRException extends com.highdeal.hci.OperationFailureException
This class implements the methods for the description of an invalid CDR exception.
See Also:

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="invalidCDRFault">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="cdr" minOccurs="0" maxOccurs="1"/>
     </xs:sequence>
     <xs:attribute name="reason" type="InvalidCDRReasonType"/>
     <xs:attribute name="message" type="xs:string"/>
   </xs:complexType>
 </xs:element>
<xs:simpleType name="InvalidCDRReasonType">
   <xs:restriction base="xs:string">
     <xs:enumeration value="internalError"/>
     <xs:enumeration value="invalidCDR"/>
     <xs:enumeration value="cdrDoesNotExist"/>
     <xs:enumeration value="duplicateCDR"/>
     <xs:enumeration value="cdrIsNull"/>
     <xs:enumeration value="chargeableItemIsNull"/>
     <xs:enumeration value="consumptionDateIsNull"/>
     <xs:enumeration value="userIDIsNull"/>
     <xs:enumeration value="serviceIDIsNull"/>
     <xs:enumeration value="subscriptionIDisNull"/>
     <xs:enumeration value="invalidMagicNumber"/>
     <xs:enumeration value="alreadyRated"/>
     <xs:enumeration value="ignoredCDR"/>
     <xs:enumeration value="invalidCreationMode"/>
     <xs:enumeration value="invalidModficationMode"/>
     <xs:enumeration value="invalidDeletionMode"/>
     <xs:enumeration value="invalidRatingMode"/>
     <xs:enumeration value="cannotRateInvalidItem"/>
     <xs:enumeration value="beingRated"/>
     <xs:enumeration value="malformedProperty"/>
   </xs:restriction>
 </xs:simpleType>

  • Field Details

    • INTERNAL_ERROR

      public static final int INTERNAL_ERROR
      Reserved for internal use.
      See Also:
    • INVALID_CDR

      public static final int INVALID_CDR
      The CDR is not valid.
      See Also:
    • CDR_DOES_NOT_EXIST

      public static final int CDR_DOES_NOT_EXIST
      The given CDR Id doesn't refer to an existing CDR.
      See Also:
    • DUPLICATE_CDR

      public static final int DUPLICATE_CDR
      The CDR is a duplicate one.
      See Also:
    • NULL_CDR

      public static final int NULL_CDR
      The given CDR is null.
      See Also:
    • NULL_CHARGEABLE_ITEM

      public static final int NULL_CHARGEABLE_ITEM
      The given chargeable item is null.
      See Also:
    • NULL_CONSUMPTION_DATE

      public static final int NULL_CONSUMPTION_DATE
      The consumption date of this CDR is null.
      See Also:
    • NULL_USER_ID

      public static final int NULL_USER_ID
      The user id of this CDR is null.
      See Also:
    • NULL_SERVICE_ID

      public static final int NULL_SERVICE_ID
      The service id of this CDR is null.
      See Also:
    • NULL_SUBSCRIPTION_ID

      public static final int NULL_SUBSCRIPTION_ID
      The subscription id of this CDR is null.
      See Also:
    • INVALID_MAGIC_NUMBER

      public static final int INVALID_MAGIC_NUMBER
      The magic number is invalid.
      See Also:
    • CDR_ALREADY_RATED

      public static final int CDR_ALREADY_RATED
      The CDR is already rated.
      See Also:
    • CDR_IGNORED

      public static final int CDR_IGNORED
      The CDR is ignored.
      See Also:
    • INVALID_MODIFICATION_MODE

      public static final int INVALID_MODIFICATION_MODE
      The modification mode is invalid.
      See Also:
    • INVALID_DELETION_MODE

      public static final int INVALID_DELETION_MODE
      The deletion mode is invalid.
      See Also:
    • INVALID_RATING_MODE

      public static final int INVALID_RATING_MODE
      The rating mode is invalid.
      See Also:
    • CANNOT_RATE_INVALID_ITEM

      public static final int CANNOT_RATE_INVALID_ITEM
      The CDR cannot be rated because of the invalid item.
      See Also:
    • CDR_BEING_RATED

      public static final int CDR_BEING_RATED
      The CDR cannot be modified because it is being rated.
      See Also:
    • INVALID_CREATION_MODE

      public static final int INVALID_CREATION_MODE
      The creation mode is invalid.
      See Also:
    • MALFORMED_PROPERTY

      public static final int MALFORMED_PROPERTY
      One or more Properties of the CDR are invalid.
      See Also:
  • Constructor Details

    • InvalidCDRException

      public InvalidCDRException()
      Builds an empty InvalidCDRException.
    • InvalidCDRException

      public InvalidCDRException(int reason)
      Builds an InvalidCDRException.
      Parameters:
      reason - the reason of the exception.
    • InvalidCDRException

      public InvalidCDRException(int reason, CDRModel cdr)
      Builds an InvalidCDRException.
      Parameters:
      reason - the reason of the exception.
      cdr - the cdr leading to the exception.
    • InvalidCDRException

      public InvalidCDRException(int reason, String operandReference)
      Builds an InvalidCDRException.
      Parameters:
      reason - the reason of the exception.
      operandReference - an operand reference such as faultly CDR OID.
    • InvalidCDRException

      public InvalidCDRException(int reason, String operandReference, CDRModel cdr)
      Builds an InvalidCDRException.
      Parameters:
      reason - the reason of the exception.
      operandReference - an operand reference such as faultly CDR OID.
      cdr - the cdr leading to the exception.
  • Method Details

    • getReason

      public int getReason()
      Returns the reason of the exception.
      Returns:
      the reason of the exception.
    • getOperandReference

      public String getOperandReference()
      Specified by:
      getOperandReference in interface com.highdeal.hci.OperationResult
      Overrides:
      getOperandReference in class com.highdeal.hci.OperationFailureException
    • getCdr

      public CDRModel getCdr()
      Gets the cdr.
      Returns:
      the CDRModel.
    • toString

      public String toString()
      Returns the reason of the exception in readable format.
      Overrides:
      toString in class Throwable
      Returns:
      a string describing the reason of the exception.
    • getMessage

      public String getMessage()
      Gets the message.
      Overrides:
      getMessage in class Throwable
      Returns:
      the message.
    • 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
    • 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
    • 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
    • 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