com.highdeal.bart.hci
Class RatingErrorException

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.RatingErrorException
All Implemented Interfaces:
com.highdeal.hci.OperationResult, XMLMarshallable, java.io.Serializable

public class RatingErrorException
extends com.highdeal.hci.OperationFailureException

This class implements the method for the description of a rating error exception.

See Also:
Serialized Form

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="ratingFault">
   <xs:complexType>
     <xs:attribute name="code" type="xs:string"/>
     <xs:attribute name="message" type="xs:string"/>
   </xs:complexType>
 </xs:element>


Field Summary
static int NO_ERROR
          Reserved for internal use.
 
Constructor Summary
RatingErrorException(int code, java.lang.String name, java.lang.String message)
          Builds an empty RatingErrorException.
 
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.
 int getCode()
          Gets the error code
 java.lang.String getMessage()
          Gets the message.
 java.lang.String getOperandReference()
          Return a reference for this exception.
 int getPosition()
          Gets the position of the CDR in error, when use the batch charge operation.
 boolean isRedoable()
          Returns true if this rating error is redoable, which means a CDR resubmission may not raise an error again.
 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 setOperandReference(java.lang.String reference)
           
 void setPosition(int position)
          Sets the position of the CDR in error, when use the batch charge operation.
 void setRedoable(boolean b)
          Sets this exception as redoable or not
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_ERROR

public static final int NO_ERROR
Reserved for internal use.

See Also:
Constant Field Values
Constructor Detail

RatingErrorException

public RatingErrorException(int code,
                            java.lang.String name,
                            java.lang.String message)
Builds an empty RatingErrorException.

Method Detail

getCode

public int getCode()
Gets the error code

Returns:
the error code.

setPosition

public void setPosition(int position)
Sets the position of the CDR in error, when use the batch charge operation.

Parameters:
position - the position of the CDR in error

getPosition

public int getPosition()
Gets the position of the CDR in error, when use the batch charge operation.

Returns:
the position of the CDR in error.

getOperandReference

public java.lang.String getOperandReference()
Return a reference for this exception. The reference depends of the context this is raised from. In case it is a redoable exception isRedoable the reference is likely to point to the rating object on server side that as raised this exception.

Specified by:
getOperandReference in interface com.highdeal.hci.OperationResult
Overrides:
getOperandReference in class com.highdeal.hci.OperationFailureException

setOperandReference

public void setOperandReference(java.lang.String reference)

isRedoable

public boolean isRedoable()
Returns true if this rating error is redoable, which means a CDR resubmission may not raise an error again. This kind of error is usually the consequence of a locking exception on the rating engine exception.


setRedoable

public void setRedoable(boolean b)
Sets this exception as redoable or not


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)