Package com.highdeal.bart.hci
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe CDR cannot be rated because of the invalid item.static final intThe CDR is already rated.static final intThe CDR cannot be modified because it is being rated.static final intThe given CDR Id doesn't refer to an existing CDR.static final intThe CDR is ignored.static final intThe CDR is a duplicate one.static final intReserved for internal use.static final intThe CDR is not valid.static final intThe creation mode is invalid.static final intThe deletion mode is invalid.static final intThe magic number is invalid.static final intThe modification mode is invalid.static final intThe rating mode is invalid.static final intOne or more Properties of the CDR are invalid.static final intThe given CDR is null.static final intThe given chargeable item is null.static final intThe consumption date of this CDR is null.static final intThe service id of this CDR is null.static final intThe subscription id of this CDR is null.static final intThe user id of this CDR is null. -
Constructor Summary
ConstructorsConstructorDescriptionBuilds an empty InvalidCDRException.InvalidCDRException(int reason) Builds an InvalidCDRException.InvalidCDRException(int reason, CDRModel cdr) Builds an InvalidCDRException.InvalidCDRException(int reason, String operandReference) Builds an InvalidCDRException.InvalidCDRException(int reason, String operandReference, CDRModel cdr) Builds an InvalidCDRException. -
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.getCdr()Gets the cdr.Gets the message.intReturns the reason of the exception.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.toString()Returns the reason of the exception in readable format.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
INTERNAL_ERROR
public static final int INTERNAL_ERRORReserved for internal use.- See Also:
-
INVALID_CDR
public static final int INVALID_CDRThe CDR is not valid.- See Also:
-
CDR_DOES_NOT_EXIST
public static final int CDR_DOES_NOT_EXISTThe given CDR Id doesn't refer to an existing CDR.- See Also:
-
DUPLICATE_CDR
public static final int DUPLICATE_CDRThe CDR is a duplicate one.- See Also:
-
NULL_CDR
public static final int NULL_CDRThe given CDR is null.- See Also:
-
NULL_CHARGEABLE_ITEM
public static final int NULL_CHARGEABLE_ITEMThe given chargeable item is null.- See Also:
-
NULL_CONSUMPTION_DATE
public static final int NULL_CONSUMPTION_DATEThe consumption date of this CDR is null.- See Also:
-
NULL_USER_ID
public static final int NULL_USER_IDThe user id of this CDR is null.- See Also:
-
NULL_SERVICE_ID
public static final int NULL_SERVICE_IDThe service id of this CDR is null.- See Also:
-
NULL_SUBSCRIPTION_ID
public static final int NULL_SUBSCRIPTION_IDThe subscription id of this CDR is null.- See Also:
-
INVALID_MAGIC_NUMBER
public static final int INVALID_MAGIC_NUMBERThe magic number is invalid.- See Also:
-
CDR_ALREADY_RATED
public static final int CDR_ALREADY_RATEDThe CDR is already rated.- See Also:
-
CDR_IGNORED
public static final int CDR_IGNOREDThe CDR is ignored.- See Also:
-
INVALID_MODIFICATION_MODE
public static final int INVALID_MODIFICATION_MODEThe modification mode is invalid.- See Also:
-
INVALID_DELETION_MODE
public static final int INVALID_DELETION_MODEThe deletion mode is invalid.- See Also:
-
INVALID_RATING_MODE
public static final int INVALID_RATING_MODEThe rating mode is invalid.- See Also:
-
CANNOT_RATE_INVALID_ITEM
public static final int CANNOT_RATE_INVALID_ITEMThe CDR cannot be rated because of the invalid item.- See Also:
-
CDR_BEING_RATED
public static final int CDR_BEING_RATEDThe CDR cannot be modified because it is being rated.- See Also:
-
INVALID_CREATION_MODE
public static final int INVALID_CREATION_MODEThe creation mode is invalid.- See Also:
-
MALFORMED_PROPERTY
public static final int MALFORMED_PROPERTYOne 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
Builds an InvalidCDRException.- Parameters:
reason- the reason of the exception.cdr- the cdr leading to the exception.
-
InvalidCDRException
Builds an InvalidCDRException.- Parameters:
reason- the reason of the exception.operandReference- an operand reference such as faultly CDR OID.
-
InvalidCDRException
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
- Specified by:
getOperandReferencein interfacecom.highdeal.hci.OperationResult- Overrides:
getOperandReferencein classcom.highdeal.hci.OperationFailureException
-
getCdr
Gets the cdr.- Returns:
- the
CDRModel.
-
toString
Returns the reason of the exception in readable format. -
getMessage
Gets the message.- Overrides:
getMessagein classThrowable- Returns:
- the message.
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Parameters:
atts- TheXML attributesof the current element
-
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
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Parameters:
cData- The character data 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
-