Package net.sf.basedb.core
Class PermissionDeniedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.sf.basedb.core.BaseException
net.sf.basedb.core.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:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description PermissionDeniedException(String message)
Creates a newPermissionDeniedException
.PermissionDeniedException(String message, Throwable cause)
Creates a newPermissionDeniedException
.PermissionDeniedException(Permission permission)
Creates a newPermissionDeniedException
.PermissionDeniedException(Permission permission, String what)
Creates a newPermissionDeniedException
. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
- Constant Field Values
-
-
Constructor Details
-
PermissionDeniedException
Creates a newPermissionDeniedException
. 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 thePermission
class}
-
PermissionDeniedException
Creates a newPermissionDeniedException
. 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 thePermission
class}what
- A description of what access is denied to, for example: User[ID=1]
-
PermissionDeniedException
Creates a newPermissionDeniedException
. The error message produced will look like:Permission denied: message
- Parameters:
message
- The message explaining why permission was denied
-
PermissionDeniedException
Creates a newPermissionDeniedException
. The error message produced will look like:Permission denied: message
- Parameters:
message
- The message explaining why permission was deniedcause
- The original cause of the exception
-