Class DefaultHCIException

All Implemented Interfaces:
OperationResult, XMLMarshallable, Serializable
Direct Known Subclasses:
InvalidSubscriberAccountException

public abstract class DefaultHCIException extends OperationFailureException
This class must be extended by all the operation failure exceptions. It provides the way to have meanful reason about the exception like a pretty name, a description, and a list of arguments.
See Also:
  • Constructor Details

    • DefaultHCIException

      public DefaultHCIException()
      Initializes an empty DefaultHCIException; It is initialized without arguments.

      Note

      Should only be used to be initialized using XML.

    • DefaultHCIException

      public DefaultHCIException(DefaultHCIException.ExceptionReason reason, String... args)
      Initializes a DefaultHCIException with a reason and an argument list.
      Parameters:
      reason - The reason of the exception. Is mandatory and cannot be null.
      args - The arguments of the reason. Is optional and can be null. If specified, the argument count must be equals to the argument name count defined by the reason.
  • Method Details

    • getArgs

      public List<String> getArgs()
      Returns the arguments of this exception.
      Returns:
      The value of the arguments of this exception if exists, null otherwise
    • getReason

      Returns the reason of this exception.
      Returns:
      The reason of the exception if exists, null otherwise
    • getMessage

      public String getMessage()
      Returns the text message of this exception.
      Overrides:
      getMessage in class Throwable
      Returns:
      The message of the exception is exists, null otherwise
    • setAttributes

      public final 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 final 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 final 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 final 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
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object