Package com.iizix.user
Class UserException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.iizix.user.UserException
-
- All Implemented Interfaces:
java.io.Serializable
public class UserException extends java.lang.Exception
User exception class used when a user is not permitted an action.- Author:
- Christopher Mindus
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UserException(UserIdentifier userIdentifier, LoginResult authenticationResult)
Creates a user exception with an empty detail message.UserException(UserIdentifier userIdentifier, java.lang.String message)
Creates a user exception with a message.UserException(UserIdentifier userIdentifier, java.lang.String message, java.lang.Throwable exception)
Creates a user exception with a message and an exception cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LoginResult
getAuthenticationResult()
Gets the authentication result causing the exception.UserIdentifier
getUserIdentifier()
Gets the User Identifier.
-
-
-
Constructor Detail
-
UserException
public UserException(UserIdentifier userIdentifier, LoginResult authenticationResult)
Creates a user exception with an empty detail message.- Parameters:
userIdentifier
- The user identifier.authenticationResult
- The authentication result causing the error.- Throws:
java.lang.NullPointerException
- ifuserIdentifier
parameter is null.
-
UserException
public UserException(UserIdentifier userIdentifier, java.lang.String message)
Creates a user exception with a message.- Parameters:
userIdentifier
- The user identifier.message
- the detail message.- Throws:
java.lang.NullPointerException
- ifuserIdentifier
parameter is null.
-
UserException
public UserException(UserIdentifier userIdentifier, java.lang.String message, java.lang.Throwable exception)
Creates a user exception with a message and an exception cause.- Parameters:
userIdentifier
- The user identifier.message
- the detail message.exception
- the exception, i.e. the real cause.- Throws:
java.lang.NullPointerException
- ifuserIdentifier
parameter is null.
-
-
Method Detail
-
getUserIdentifier
public UserIdentifier getUserIdentifier()
Gets the User Identifier.
-
getAuthenticationResult
public LoginResult getAuthenticationResult()
Gets the authentication result causing the exception.- Returns:
- The authentication result that caused the error, null if a nested exception caused it
(use
@{link
to retrieve it).Throwable.getCause()
-
-