Class UserException

All Implemented Interfaces:
Serializable

public class UserException extends Exception
User exception class used when a user is not permitted an action.
Author:
Christopher Mindus
See Also:
  • Constructor Details

    • UserException

      public UserException(UserIdentifier userIdentifier, SigninResult authenticationResult)
      Creates a user exception with an empty detail message.
      Parameters:
      userIdentifier - The user identifier.
      authenticationResult - The authentication result causing the error.
      Throws:
      NullPointerException - if userIdentifier parameter is null.
    • UserException

      public UserException(UserIdentifier userIdentifier, String message)
      Creates a user exception with a message.
      Parameters:
      userIdentifier - The user identifier.
      message - the detail message.
      Throws:
      NullPointerException - if userIdentifier parameter is null.
    • UserException

      public UserException(UserIdentifier userIdentifier, String message, 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:
      NullPointerException - if userIdentifier parameter is null.
  • Method Details

    • getUserIdentifier

      public UserIdentifier getUserIdentifier()
      Gets the User Identifier.
    • getAuthenticationResult

      public SigninResult 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 Throwable.getCause() to retrieve it).