uk.org.ogsadai.exception
Class NonOGSADAIExceptionWrapper

java.lang.Object
  |
  +--uk.org.ogsadai.exception.NonOGSADAIExceptionWrapper
All Implemented Interfaces:
DAIExceptionInformation

public class NonOGSADAIExceptionWrapper
extends java.lang.Object
implements DAIExceptionInformation

This wrapper is designed to wrap non-OGSA-DAI exceptions in a format which allows their information - specifically their class name and exception message - to be presented in a form analogous to that used by OGSA-DAI exceptions.

This wrapper can be used when dumping exceptions into Response documents or building service faults for example.

Associated with error ID: uk.org.ogsadai.NON_OGSA_DAI_COMPLIANT_ERROR.

Author:
The OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
private static ErrorID ERROR_ID
          ErrorID
private  java.lang.String mLocalizedMessage
          Localized message
private  java.lang.String mMessage
          Message
private  java.lang.Object[] mParameters
          Parameters
 
Constructor Summary
NonOGSADAIExceptionWrapper(java.lang.Throwable exception)
          Constructor.
 
Method Summary
 ErrorID getErrorID()
          Gets the error ID of this type of exception.
 DAIUniqueID getExceptionID()
          Gets the unique ID associated with the server-side exception.
 java.lang.String getLocalizedMessage()
          Gets a localized message describing the error.
 java.lang.String getMessage()
          Gets a message describing the error.
 java.lang.Object[] getParameters()
          Gets the parameters associated with the error - a one-element array containing the unique exception ID.
 boolean hasChild()
          Gets whether there is a child exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

ERROR_ID

private static final ErrorID ERROR_ID
ErrorID


mParameters

private java.lang.Object[] mParameters
Parameters


mMessage

private java.lang.String mMessage
Message


mLocalizedMessage

private java.lang.String mLocalizedMessage
Localized message

Constructor Detail

NonOGSADAIExceptionWrapper

public NonOGSADAIExceptionWrapper(java.lang.Throwable exception)
Constructor.

Parameters:
exception - Exception to be wrapped.
Method Detail

getLocalizedMessage

public java.lang.String getLocalizedMessage()
Description copied from interface: DAIExceptionInformation
Gets a localized message describing the error.

Specified by:
getLocalizedMessage in interface DAIExceptionInformation
Returns:
message.

getMessage

public java.lang.String getMessage()
Description copied from interface: DAIExceptionInformation
Gets a message describing the error.

Specified by:
getMessage in interface DAIExceptionInformation
Returns:
message.

getExceptionID

public DAIUniqueID getExceptionID()
Gets the unique ID associated with the server-side exception.

Specified by:
getExceptionID in interface DAIExceptionInformation
Returns:
null

getErrorID

public ErrorID getErrorID()
Gets the error ID of this type of exception.

Specified by:
getErrorID in interface DAIExceptionInformation
Returns:
error ID.

getParameters

public java.lang.Object[] getParameters()
Gets the parameters associated with the error - a one-element array containing the unique exception ID.

Specified by:
getParameters in interface DAIExceptionInformation
Returns:
parameters.

hasChild

public boolean hasChild()
Gets whether there is a child exception.

Specified by:
hasChild in interface DAIExceptionInformation
Returns:
false always.
See Also:
DAIExceptionInformation.hasChild()