2.17.2: 2011-06-17

net.sf.basedb.core
Class PermissionDeniedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by net.sf.basedb.core.BaseException
                  extended by 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
private static long serialVersionUID
           
 
Constructor Summary
PermissionDeniedException(Permission permission)
          Creates a new PermissionDeniedException.
PermissionDeniedException(Permission permission, String what)
          Creates a new PermissionDeniedException.
PermissionDeniedException(String message)
          Creates a new PermissionDeniedException.
PermissionDeniedException(String message, Throwable cause)
          Creates a new PermissionDeniedException.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

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

2.17.2: 2011-06-17