com.highdeal.bart.hci
Class InvalidCDRException

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

public class InvalidCDRException
extends com.highdeal.hci.OperationFailureException

This class implements the methods for the description of an invalid CDR exception.

See Also:
Serialized Form

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 Summary
static int CANNOT_RATE_INVALID_ITEM
          The CDR cannot be rated because of the invalid item.
static int CDR_ALREADY_RATED
          The CDR is already rated.
static int CDR_BEING_RATED
          The CDR cannot be modified because it is being rated.
static int CDR_DOES_NOT_EXIST
          The given CDR Id doesn't refer to an existing CDR.
static int CDR_IGNORED
          The CDR is ignored.
static int DUPLICATE_CDR
          The CDR is a duplicate one.
static int INTERNAL_ERROR
          Reserved for internal use.
static int INVALID_CDR
          The CDR is not valid.
static int INVALID_CREATION_MODE
          The creation mode is invalid.
static int INVALID_DELETION_MODE
          The deletion mode is invalid.
static int INVALID_MAGIC_NUMBER
          The magic number is invalid.
static int INVALID_MODIFICATION_MODE
          The modification mode is invalid.
static int INVALID_RATING_MODE
          The rating mode is invalid.
static int MALFORMED_PROPERTY
          One or more Properties of the CDR are invalid.
static int NULL_CDR
          The given CDR is null.
static int NULL_CHARGEABLE_ITEM
          The given chargeable item is null.
static int NULL_CONSUMPTION_DATE
          The consumption date of this CDR is null.
static int NULL_SERVICE_ID
          The service id of this CDR is null.
static int NULL_SUBSCRIPTION_ID
          The subscription id of this CDR is null.
static int NULL_USER_ID
          The user id of this CDR is null.
 
Constructor Summary
InvalidCDRException()
          Builds an empty InvalidCDRException.
InvalidCDRException(int reason)
          Builds an InvalidCDRException.
InvalidCDRException(int reason, CDRModel cdr)
          Builds an InvalidCDRException.
InvalidCDRException(int reason, java.lang.String operandReference)
          Builds an InvalidCDRException.
InvalidCDRException(int reason, java.lang.String operandReference, CDRModel cdr)
          Builds an InvalidCDRException.
 
Method Summary
 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.
 CDRModel getCdr()
          Gets the cdr.
 java.lang.String getMessage()
          Gets the message.
 java.lang.String getOperandReference()
           
 int getReason()
          Returns the reason of the exception.
 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.
 java.lang.String toString()
          Returns the reason of the exception in readable format.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INTERNAL_ERROR

public static final int INTERNAL_ERROR
Reserved for internal use.

See Also:
Constant Field Values

INVALID_CDR

public static final int INVALID_CDR
The CDR is not valid.

See Also:
Constant Field Values

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:
Constant Field Values

DUPLICATE_CDR

public static final int DUPLICATE_CDR
The CDR is a duplicate one.

See Also:
Constant Field Values

NULL_CDR

public static final int NULL_CDR
The given CDR is null.

See Also:
Constant Field Values

NULL_CHARGEABLE_ITEM

public static final int NULL_CHARGEABLE_ITEM
The given chargeable item is null.

See Also:
Constant Field Values

NULL_CONSUMPTION_DATE

public static final int NULL_CONSUMPTION_DATE
The consumption date of this CDR is null.

See Also:
Constant Field Values

NULL_USER_ID

public static final int NULL_USER_ID
The user id of this CDR is null.

See Also:
Constant Field Values

NULL_SERVICE_ID

public static final int NULL_SERVICE_ID
The service id of this CDR is null.

See Also:
Constant Field Values

NULL_SUBSCRIPTION_ID

public static final int NULL_SUBSCRIPTION_ID
The subscription id of this CDR is null.

See Also:
Constant Field Values

INVALID_MAGIC_NUMBER

public static final int INVALID_MAGIC_NUMBER
The magic number is invalid.

See Also:
Constant Field Values

CDR_ALREADY_RATED

public static final int CDR_ALREADY_RATED
The CDR is already rated.

See Also:
Constant Field Values

CDR_IGNORED

public static final int CDR_IGNORED
The CDR is ignored.

See Also:
Constant Field Values

INVALID_MODIFICATION_MODE

public static final int INVALID_MODIFICATION_MODE
The modification mode is invalid.

See Also:
Constant Field Values

INVALID_DELETION_MODE

public static final int INVALID_DELETION_MODE
The deletion mode is invalid.

See Also:
Constant Field Values

INVALID_RATING_MODE

public static final int INVALID_RATING_MODE
The rating mode is invalid.

See Also:
Constant Field Values

CANNOT_RATE_INVALID_ITEM

public static final int CANNOT_RATE_INVALID_ITEM
The CDR cannot be rated because of the invalid item.

See Also:
Constant Field Values

CDR_BEING_RATED

public static final int CDR_BEING_RATED
The CDR cannot be modified because it is being rated.

See Also:
Constant Field Values

INVALID_CREATION_MODE

public static final int INVALID_CREATION_MODE
The creation mode is invalid.

See Also:
Constant Field Values

MALFORMED_PROPERTY

public static final int MALFORMED_PROPERTY
One or more Properties of the CDR are invalid.

See Also:
Constant Field Values
Constructor Detail

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,
                           java.lang.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,
                           java.lang.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 Detail

getReason

public int getReason()
Returns the reason of the exception.

Returns:
the reason of the exception.

getOperandReference

public java.lang.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 java.lang.String toString()
Returns the reason of the exception in readable format.

Overrides:
toString in class java.lang.Throwable
Returns:
a string describing the reason of the exception.

getMessage

public java.lang.String getMessage()
Gets the message.

Overrides:
getMessage in class java.lang.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(java.lang.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(java.lang.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

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)