com.sas.services.user
Class UserInitializationException

com.sas.services.user.UserInitializationException
All Implemented Interfaces:
com.sas.util.ChainedExceptionInterface, java.io.Serializable

public class UserInitializationException
implements java.io.Serializable

This class encapsulates an exception that occurs during UserContext initialization, but may still leave the UserContext in a usable state. There may actually be more than one exception that can occur during the initialization, and this aggregates them and provides access to them so the application can decide whether to continue or not.

Since:
1.0
See Also:
Serialized Form

Constructor Summary
UserInitializationException()
          Constructs a default exception to indicate that the User Service failed to configure.
UserInitializationException(UserContextInterface user)
          Create a new UserInitializationException with the UserContext that was being created.
 
Method Summary
 void addException(java.lang.Exception exception)
          Add an exception to the collection.
 java.lang.Exception[] getExceptions()
          Get the exceptions that occurred during initialization of the UserContext.
 java.lang.String getMessage()
          Gets a message detailing why the User Service failed to configure.
 java.lang.Throwable getRootException()
          Gets the root cause of the exception preventing the initialization of the User Service.
 UserContextInterface getUser()
          Get the UserContext that was being initialized when the problems happened.
 

Constructor Detail

UserInitializationException

public UserInitializationException()
Constructs a default exception to indicate that the User Service failed to configure.


UserInitializationException

public UserInitializationException(UserContextInterface user)
Create a new UserInitializationException with the UserContext that was being created. This is not changable through this interface.

Parameters:
user - User context.
Method Detail

getRootException

public java.lang.Throwable getRootException()
Gets the root cause of the exception preventing the initialization of the User Service.

Overrides:
getRootException in class com.sas.util.ChainedException
Returns:
Root exception

getMessage

public java.lang.String getMessage()
Gets a message detailing why the User Service failed to configure.

Overrides:
getMessage in class java.lang.Throwable
Returns:
Message detailing why the User Service failed to configure.

addException

public void addException(java.lang.Exception exception)
Add an exception to the collection. More than one thing could have gone wrong during the initialization, and we want all of them listed here.

Parameters:
exception - A new exception to add to the list of things that went wrong during initialization.

getExceptions

public java.lang.Exception[] getExceptions()
Get the exceptions that occurred during initialization of the UserContext.

Returns:
An array of Exception objects.

getUser

public UserContextInterface getUser()
Get the UserContext that was being initialized when the problems happened. This allows the client code to continue processing.

Returns:
The UserContext.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.