Package com.highdeal.hci
Class OperationFailureErrorException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.highdeal.hci.OperationFailureException
com.highdeal.hci.OperationFailureErrorException
- All Implemented Interfaces:
IErrorException,IXMLMarshallable,OperationResult,XMLMarshallable,Serializable
- Direct Known Subclasses:
InvalidCreationErrorException,InvalidDeletionErrorException,InvalidMaintainErrorException,InvalidModificationErrorException,InvalidOperationErrorException,InvalidSearchErrorException,InvalidSubscriberDataExportErrorException,InvalidSubscriberDataImportErrorException,ServerErrorException
public abstract class OperationFailureErrorException
extends OperationFailureException
implements IErrorException, IXMLMarshallable
This
abstract Java class is the base representation of an OperationFailureException that includes an error
(error code and arguments, comprehensive message, potential causes);
Consider the direct known subclasses: ServerErrorException,
InvalidCreationErrorException, and other error exceptions.
This class should be implemented by all the failure exceptions.
This class implements both the IXMLMarshallable and the XMLMarshallable Java interfaces.
Implementation in Your Client Application
Consider the known subclasses that represent an HCI operation exception; They are listed in this page.
- See Also:
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="cause" type="IErrorType" />
<xs:element name="causedBy" type="IErrorType" />
<xs:complexType name="IErrorType">
<xs:sequence>
<xs:element name="message" type="xs:string" />
<xs:choice>
<xs:element ref="string" />
<xs:element ref="date" />
<xs:element ref="number" />
<xs:element ref="boolean" />
</xs:choice>
</xs:sequence>
<xs:attribute name="module" type="xs:string" />
<xs:attribute name="code" type="xs:integer" />
</xs:complexType>
<xs:complexType name="OperationFailureError">
<xs:sequence>
<xs:element ref="cause" minOccurs="1" maxOccurs="1"/>
<xs:element ref="causedBy" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstant for the XML tag name of theerrorembedded in the Operation Failure: "cause"static final StringConstant for the XML tag name of the nestedIErrors errorsembedded in the Operation Failure: "causedBy"static final StringConstant for the XML tag name of the message describing theerrorembedded in the Operation Failure: "message" -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor of the Operation Failure exception used to unmarshal its XML representation.Builds the Operation Failure exception with the specifiedIError.Builds the Operation Failure exception with the specifiedIErrorand its triggering operation failure.OperationFailureErrorException(IError error, Throwable cause) Builds the Operation Failure exception with the specifiedIErrorand its triggering exception. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.getError()Returns the text message of the error in this exception.abstract StringGets the XML tag name of the HCI model.final voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidmarshalChildren(XMLOutputter output) Gives an XML representation of the child objects of an object.static final voidmarshalIError(XMLOutputter output, IError err) voidSets theerrorcontained in this Operation Failure.static final IErrorunmarshalIError(XMLMarshallable child) 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, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.highdeal.hci.IXMLMarshallable
marshalAttributesMethods inherited from interface com.highdeal.hci.XMLMarshallable
addCharacterData, setAttributes
-
Field Details
-
CAUSE_TAG_NAME
Constant for the XML tag name of theerrorembedded in the Operation Failure: "cause"- See Also:
-
CAUSED_BY_TAG_NAME
Constant for the XML tag name of the nestedIErrors errorsembedded in the Operation Failure: "causedBy"- See Also:
-
MESSAGE_TAG_NAME
Constant for the XML tag name of the message describing theerrorembedded in the Operation Failure: "message"- See Also:
-
-
Constructor Details
-
OperationFailureErrorException
public OperationFailureErrorException()Default constructor of the Operation Failure exception used to unmarshal its XML representation. -
OperationFailureErrorException
Builds the Operation Failure exception with the specifiedIError.- Parameters:
error- The IError to embed in the operation failure
-
OperationFailureErrorException
Builds the Operation Failure exception with the specifiedIErrorand its triggering operation failure.- Parameters:
error- The IError to embed in the operation failurecause- The Operation Failure that has triggered the current Operation Failure
-
OperationFailureErrorException
Builds the Operation Failure exception with the specifiedIErrorand its triggering exception.- Parameters:
error- The IError to embed in the operation failurecause- The exception that has triggered the current Operation Failure
-
-
Method Details
-
getMessage
Returns the text message of the error in this exception.- Overrides:
getMessagein classThrowable- Returns:
- The error message
-
getError
Description copied from interface:IErrorException- Specified by:
getErrorin interfaceIErrorException- Returns:
- The
errorassociated in this exception
-
setError
Sets theerrorcontained in this Operation Failure.- Parameters:
error- The IError to embed in this operation failure
-
getTagName
Gets the XML tag name of the HCI model.- Returns:
- The XML tag name
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceIXMLMarshallable- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- TheXML outputto marshal the object into
-
marshalChildren
Description copied from interface:IXMLMarshallableGives an XML representation of the child objects of an object.- Specified by:
marshalChildrenin interfaceIXMLMarshallable- Parameters:
output- TheXML outputto marshal the child objects into
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Specified by:
addChildin interfaceXMLMarshallable- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
marshalIError
- Parameters:
output- The output to marshal the error intoerr- The error to marshal
-
unmarshalIError
- Parameters:
child- The element to read the error from- Returns:
- The error
-