public class AccessDeniedException extends DataSecurityException
Exception thrown when a DataService request fails due to access being denied.
| Modifier | Constructor and Description |
|---|---|
|
AccessDeniedException()
Default constructor.
|
protected |
AccessDeniedException(java.lang.String message,
java.lang.Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
static AccessDeniedException |
cannotAccess(java.lang.String access,
java.lang.String resource)
|
static AccessDeniedException |
cannotAccess(java.lang.String access,
java.lang.String resource,
StringList roles)
Return a new exception for an "access denied" security condition.
|
static AccessDeniedException |
cannotCreate(java.lang.String resource)
|
static AccessDeniedException |
cannotCreate(java.lang.String resource,
StringList roles)
Return exception for the case that create access is denied.
|
static AccessDeniedException |
cannotDelete(java.lang.String resource)
|
static AccessDeniedException |
cannotDelete(java.lang.String resource,
StringList roles)
Return exception for the case that delete access is denied.
|
static AccessDeniedException |
cannotInvoke(java.lang.String resource)
|
static AccessDeniedException |
cannotInvoke(java.lang.String resource,
StringList roles)
Return exception for the case that invoke access is denied.
|
static AccessDeniedException |
cannotRead(java.lang.String resource)
|
static AccessDeniedException |
cannotRead(java.lang.String resource,
StringList roles)
Return exception for the case that read access is denied.
|
static AccessDeniedException |
cannotUpdate(java.lang.String resource)
|
static AccessDeniedException |
cannotUpdate(java.lang.String resource,
StringList roles)
Return exception for the case that update access is denied.
|
static AccessDeniedException |
cannotWrite(java.lang.String resource)
|
static AccessDeniedException |
cannotWrite(java.lang.String resource,
StringList roles)
Return exception for the case that write access is denied.
|
createEntityNotImplemented, createEntityNotImplemented, deleteEntityNotImplemented, deleteEntityNotImplemented, executeQueryNotImplemented, executeQueryNotImplemented, getResponse, getStatus, getStatusText, methodNotAllowed, notImplemented, setResponse, setStatus, updateEntityNotImplemented, updateEntityNotImplemented, validationError, withCause, withCauseAndMessage, withMessage, withResponse, withStatus, withStatusgetSafeMessage, safe, setSafeMessagegetCause, getMessage, setCause, setMessage, toStringprotected AccessDeniedException(java.lang.String message,
java.lang.Throwable cause)
public AccessDeniedException()
Default constructor.
public static AccessDeniedException cannotAccess(java.lang.String access, java.lang.String resource)
access - Access parameter.resource - Resource parameter.public static AccessDeniedException cannotAccess(java.lang.String access, java.lang.String resource, StringList roles)
Return a new exception for an "access denied" security condition.
access - Access mode that is denied (e.g. "create", "read", "update", "delete", "invoke").resource - Resouce that the client attempted to access.roles - Permitted roles for accessing this resource.public static AccessDeniedException cannotCreate(java.lang.String resource)
resource - Resource parameter.public static AccessDeniedException cannotCreate(java.lang.String resource, StringList roles)
Return exception for the case that create access is denied.
resource - Resource that user attempted to create.roles - Permitted roles for creating this resource.public static AccessDeniedException cannotDelete(java.lang.String resource)
resource - Resource parameter.public static AccessDeniedException cannotDelete(java.lang.String resource, StringList roles)
Return exception for the case that delete access is denied.
resource - Resource that user attempted to delete.roles - Permitted roles for deleting this resource.public static AccessDeniedException cannotInvoke(java.lang.String resource)
resource - Resource parameter.public static AccessDeniedException cannotInvoke(java.lang.String resource, StringList roles)
Return exception for the case that invoke access is denied.
resource - Resource that user attempted to invoke.roles - Permitted roles for invoking this resource.public static AccessDeniedException cannotRead(java.lang.String resource)
resource - Resource parameter.public static AccessDeniedException cannotRead(java.lang.String resource, StringList roles)
Return exception for the case that read access is denied.
resource - Resource that user attempted to read.roles - Permitted roles for reading this resource.public static AccessDeniedException cannotUpdate(java.lang.String resource)
resource - Resource parameter.public static AccessDeniedException cannotUpdate(java.lang.String resource, StringList roles)
Return exception for the case that update access is denied.
resource - Resource that user attempted to update.roles - Permitted roles for updating this resource.public static AccessDeniedException cannotWrite(java.lang.String resource)
resource - Resource parameter.public static AccessDeniedException cannotWrite(java.lang.String resource, StringList roles)
Return exception for the case that write access is denied.
resource - Resource that user attempted to read.roles - Permitted roles for reading this resource.