org.n52.security.common.artifact
Class ServiceException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.n52.security.common.artifact.ServiceException
All Implemented Interfaces:
Serializable, TransferableCreator

public class ServiceException
extends Exception
implements TransferableCreator

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

See Also:
Serialized Form

Field Summary
static String AUTHENTICATION_FAILED
           
static String AUTHORIZATION_FAILED
           
static String INVALID_FORMAT
           
static String INVALID_SAMLRESPONSE
           
static String INVALID_SESSION
           
protected  String m_code
          Contains code of this exception.
static String PASS_FORMATION_ERROR
           
static String SERVICE_ERROR
           
static String SESSION_EXPIRED
           
 
Constructor Summary
ServiceException(String message, String code)
          Constructs an Exception with a detailed message.
ServiceException(String message, String code, Throwable cause)
          Constructs an Exception with a detailed message and the cause of the exception.
 
Method Summary
static ServiceException createFromXML(InputSource in)
          Creates an instance of this class from an XML file.
 Transferable getAsTransferable()
           
 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 String AUTHENTICATION_FAILED
See Also:
Constant Field Values

AUTHORIZATION_FAILED

public static final String AUTHORIZATION_FAILED
See Also:
Constant Field Values

PASS_FORMATION_ERROR

public static final String PASS_FORMATION_ERROR
See Also:
Constant Field Values

SESSION_EXPIRED

public static final String SESSION_EXPIRED
See Also:
Constant Field Values

INVALID_FORMAT

public static final String INVALID_FORMAT
See Also:
Constant Field Values

INVALID_SESSION

public static final String INVALID_SESSION
See Also:
Constant Field Values

SERVICE_ERROR

public static final String SERVICE_ERROR
See Also:
Constant Field Values

INVALID_SAMLRESPONSE

public static final String INVALID_SAMLRESPONSE
See Also:
Constant Field Values

m_code

protected String m_code
Contains code of this exception.

Constructor Detail

ServiceException

public ServiceException(String message,
                        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(String message,
                        String code,
                        Throwable cause)
Constructs an Exception with a detailed message and the cause of the exception.

Parameters:
message -
code -
cause -
Method Detail

getErrorCode

public String getErrorCode()

createFromXML

public static ServiceException createFromXML(InputSource in)
Creates an instance of this class from an XML file.

Parameters:
in - a service excpetion XML document
Returns:
Throws:
SAXException
IOException

getAsTransferable

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


Copyright © 2004–2013 52north.org. All rights reserved.