org.n52.security.common.protocol.artifact
Class ServiceException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.n52.security.common.protocol.artifact.ServiceException
All Implemented Interfaces:
java.io.Serializable, TransferableCreator

public class ServiceException
extends java.lang.Exception
implements TransferableCreator

This exception is thrown when an error during the authentication process occurred. This implementation supports just service exceptions, which contain exactly one < ServiceException> element.

See Also:
Serialized Form

Field Summary
static java.lang.String AUTHENTICATION_FAILED
           
static java.lang.String AUTHORIZATION_FAILED
           
protected  java.lang.String code
           
static java.lang.String INVALID_FORMAT
           
static java.lang.String INVALID_SAMLRESPONSE
           
static java.lang.String INVALID_SESSION
           
static java.lang.String PASS_FORMATION_ERROR
           
static java.lang.String SERVICE_ERROR
           
static java.lang.String SESSION_EXPIRED
           
 
Constructor Summary
ServiceException(java.lang.String message, java.lang.String code)
          Constructs an Exception with a detailed message.
ServiceException(java.lang.String message, java.lang.String code, java.lang.Throwable cause)
          Constructs an Exception with a detailed message and the cause of the exception.
 
Method Summary
static ServiceException createFromXML(org.xml.sax.InputSource in)
          Creates an instance of this class from an XML file.
 Transferable getAsTransferable()
           
 java.lang.String getErrorCode()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AUTHENTICATION_FAILED

public static final java.lang.String AUTHENTICATION_FAILED
See Also:
Constant Field Values

AUTHORIZATION_FAILED

public static final java.lang.String AUTHORIZATION_FAILED
See Also:
Constant Field Values

PASS_FORMATION_ERROR

public static final java.lang.String PASS_FORMATION_ERROR
See Also:
Constant Field Values

SESSION_EXPIRED

public static final java.lang.String SESSION_EXPIRED
See Also:
Constant Field Values

INVALID_FORMAT

public static final java.lang.String INVALID_FORMAT
See Also:
Constant Field Values

INVALID_SESSION

public static final java.lang.String INVALID_SESSION
See Also:
Constant Field Values

SERVICE_ERROR

public static final java.lang.String SERVICE_ERROR
See Also:
Constant Field Values

INVALID_SAMLRESPONSE

public static final java.lang.String INVALID_SAMLRESPONSE
See Also:
Constant Field Values

code

protected java.lang.String code
Constructor Detail

ServiceException

public ServiceException(java.lang.String message,
                        java.lang.String code)
Constructs an Exception with a detailed message.

Parameters:
message - The message associated with the exception.
code - Error code describing the exception. Code values are defines in the WAS and WSS specification. However, it is recommended to use the constants of this class, which completely reproduce the specified error codes.

ServiceException

public ServiceException(java.lang.String message,
                        java.lang.String code,
                        java.lang.Throwable cause)
Constructs an Exception with a detailed message and the cause of the exception.

Parameters:
message -
code -
cause -
Method Detail

getErrorCode

public java.lang.String getErrorCode()

createFromXML

public static ServiceException createFromXML(org.xml.sax.InputSource in)
                                      throws org.xml.sax.SAXException,
                                             java.io.IOException
Creates an instance of this class from an XML file.

Parameters:
in - a service excpetion XML document
Returns:
Throws:
org.xml.sax.SAXException
java.io.IOException

getAsTransferable

public Transferable getAsTransferable()
Specified by:
getAsTransferable in interface TransferableCreator


Copyright © 2004-2007 52 North. All Rights Reserved.