Class PermissionDeniedException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AccountExpiredException, AlreadyLoggedInException, ItemInUseException, ItemModifiedException, NotLoggedInException

public class PermissionDeniedException extends BaseException
This exception is thrown when trying to load or manipulate an item in the database and you don't have the required permission.
Version:
2.0
Author:
Nicklas
See Also:
  • Field Details

  • Constructor Details

    • PermissionDeniedException

      public PermissionDeniedException(Permission permission)
      Creates a new PermissionDeniedException. The error message produced will look like: Permission denied: Not allowed to write
      Parameters:
      permission - The permission requested. Should be one of the values defined in the Permission class}
    • PermissionDeniedException

      public PermissionDeniedException(Permission permission, String what)
      Creates a new PermissionDeniedException. The error message produced will look like: Permission denied: Not allowed to read User[ID=1]
      Parameters:
      permission - The permission requested. Should be one of the values defined in the Permission class}
      what - A description of what access is denied to, for example: User[ID=1]
    • PermissionDeniedException

      public PermissionDeniedException(String message)
      Creates a new PermissionDeniedException. The error message produced will look like: Permission denied: message
      Parameters:
      message - The message explaining why permission was denied
    • PermissionDeniedException

      public PermissionDeniedException(String message, Throwable cause)
      Creates a new PermissionDeniedException. The error message produced will look like: Permission denied: message
      Parameters:
      message - The message explaining why permission was denied
      cause - The original cause of the exception