Package com.highdeal.pnr.hci
Class DefaultHCIException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.highdeal.hci.OperationFailureException
com.highdeal.pnr.hci.DefaultHCIException
- All Implemented Interfaces:
OperationResult,XMLMarshallable,Serializable
- Direct Known Subclasses:
InvalidSubscriberAccountException
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis class represents the reason of the exception; The reason has a code or a pretty name, a comprehensive message, and a list of arguments. -
Constructor Summary
ConstructorsConstructorDescriptionInitializes an empty DefaultHCIException; It is initialized without arguments.DefaultHCIException(DefaultHCIException.ExceptionReason reason, String... args) Initializes a DefaultHCIException with a reason and an argument list. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddCharacterData(String cData) Adds character data to the content element.final voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.booleangetArgs()Returns the arguments of this exception.Returns the text message of this exception.Returns thereasonof this exception.inthashCode()final voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.final voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.Methods inherited from class com.highdeal.hci.OperationFailureException
getOperandReferenceMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
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
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
Returns the arguments of this exception.- Returns:
- The value of the arguments of this exception if exists,
nullotherwise
-
getReason
Returns thereasonof this exception.- Returns:
- The
reasonof the exception if exists,nullotherwise
-
getMessage
Returns the text message of this exception.- Overrides:
getMessagein classThrowable- Returns:
- The message of the exception is exists,
nullotherwise
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Parameters:
atts- TheXML attributesof the current element
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Parameters:
cData- The character data to be added
-
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
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Parameters:
output- TheXML outputto marshal the object into
-
hashCode
public int hashCode() -
equals
-