org.jafer.registry.uddi
Class RegistryExceptionImpl

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.jafer.registry.RegistryException
              extended by org.jafer.registry.uddi.RegistryExceptionImpl
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CategoryDoesNotExistException, InvalidAuthorisationDetailsException, InvalidLengthException, InvalidNameException, RegistryNotInitialisedException, ServiceDoesNotExistException

public class RegistryExceptionImpl
extends RegistryException

This is the base class for all the Jafer UDDI Exceptions that can occur

See Also:
Serialized Form

Field Summary
private  boolean hasMessage
          Stores a reference to the whether an extra message was added other than just the exception.
private  org.uddi4j.response.Result result
          Stores a reference to the result if available
 
Fields inherited from class org.jafer.registry.RegistryException
E_accountLimitExceeded, E_assertionNotFound, E_authTokenExpired, E_authTokenRequired, E_busy, E_categorizationNotAllowed, E_fatalError, E_invalidCategory, E_invalidCompletionStatus, E_invalidKeyPassed, E_invalidProjection, E_invalidURLPassed, E_invalidValue, E_keyRetired, E_languageError, E_messageTooLarge, E_nameTooLong, E_operatorMismatch, E_publisherCancelled, E_requestDenied, E_requestTimeout, E_secretUnknown, E_success, E_tooManyOptions, E_transferAborted, E_unknownUser, E_unrecognizedVersion, E_unsupported, E_unvalidatable, E_userMismatch, E_valueNotAllowed
 
Constructor Summary
RegistryExceptionImpl(java.lang.Exception exc)
          Constructor supplying a message
RegistryExceptionImpl(java.lang.String message)
          Constructor supplying a message
RegistryExceptionImpl(java.lang.String message, java.lang.Exception exc)
          Constructor supplying a message and exception
 
Method Summary
private  void extractResult(java.lang.Exception exc)
          finds out if Exception is UDDI related and extracts the first result object
 java.lang.String getErrorCode()
          Returns the UDDI defined code
 java.lang.String getErrorNumber()
          Returns the UDDI defined error number
 java.lang.String getErrorText()
          Returns the UDDI defined error text
 java.lang.String getStackTraceString()
          This method returns the error message with a full stack trace.
static boolean isErrorOfType(org.uddi4j.response.DispositionReport report, java.lang.String code)
          Checks if the DispositionReport contains the specified code
 java.lang.String toString()
          This method returns the String message for this Exception adding in the Result details if available
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

result

private org.uddi4j.response.Result result
Stores a reference to the result if available


hasMessage

private boolean hasMessage
Stores a reference to the whether an extra message was added other than just the exception. Used to print string correctly

Constructor Detail

RegistryExceptionImpl

public RegistryExceptionImpl(java.lang.String message)
Constructor supplying a message

Parameters:
message -

RegistryExceptionImpl

public RegistryExceptionImpl(java.lang.Exception exc)
Constructor supplying a message

Parameters:
exc -

RegistryExceptionImpl

public RegistryExceptionImpl(java.lang.String message,
                             java.lang.Exception exc)
Constructor supplying a message and exception

Parameters:
message -
exc -
Method Detail

extractResult

private void extractResult(java.lang.Exception exc)
finds out if Exception is UDDI related and extracts the first result object

Parameters:
exc - The exception to examine

isErrorOfType

public static boolean isErrorOfType(org.uddi4j.response.DispositionReport report,
                                    java.lang.String code)
Checks if the DispositionReport contains the specified code

Parameters:
report - The DispositionReport to search
code - code to search for
Returns:
boolean true if code found in report

getErrorNumber

public java.lang.String getErrorNumber()
Returns the UDDI defined error number

Specified by:
getErrorNumber in class RegistryException
Returns:
The erro rnumber

getErrorCode

public java.lang.String getErrorCode()
Returns the UDDI defined code

Specified by:
getErrorCode in class RegistryException
Returns:
The code

getErrorText

public java.lang.String getErrorText()
Returns the UDDI defined error text

Specified by:
getErrorText in class RegistryException
Returns:
The error Text

getStackTraceString

public java.lang.String getStackTraceString()
This method returns the error message with a full stack trace. This is done by calling printStackTrace on Exception that internally calls toString() to get our message.

Specified by:
getStackTraceString in class RegistryException
Returns:
The full stack trace string of the exception

toString

public java.lang.String toString()
This method returns the String message for this Exception adding in the Result details if available

Overrides:
toString in class java.lang.Throwable
Returns:
String formated (ErrNo= XX Code=XX Error Text)