Package org.camunda.bpm.engine
Class AuthorizationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.camunda.bpm.engine.ProcessEngineException
-
- org.camunda.bpm.engine.AuthorizationException
-
- All Implemented Interfaces:
java.io.Serializable
public class AuthorizationException extends ProcessEngineException
Exception thrown by the process engine in case a user tries to interact with a resource in an unauthorized way.
The exception contains a list of Missing authorizations. The List is a disjunction i.e. a user should have any of the authorization for the engine to continue the execution beyond the point where it failed.
- Author:
- Daniel Meyer
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<MissingAuthorization>
missingAuthorizations
protected java.lang.String
permissionName
Deprecated.protected java.lang.String
resourceId
Deprecated.protected java.lang.String
resourceType
Deprecated.protected java.lang.String
userId
-
Constructor Summary
Constructors Constructor Description AuthorizationException(java.lang.String message)
AuthorizationException(java.lang.String userId, java.lang.String permissionName, java.lang.String resourceType, java.lang.String resourceId)
AuthorizationException(java.lang.String userId, java.util.List<MissingAuthorization> info)
AuthorizationException(java.lang.String userId, MissingAuthorization exceptionInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.List<MissingAuthorization>
getMissingAuthorizations()
java.lang.String
getResourceId()
Deprecated.UsegetMissingAuthorizations()
to get the id of the resource of theMissingAuthorization
(s).java.lang.String
getResourceType()
Deprecated.UsegetMissingAuthorizations()
to get the type of the resource of theMissingAuthorization
(s).java.lang.String
getUserId()
java.lang.String
getViolatedPermissionName()
Deprecated.UsegetMissingAuthorizations()
to get the violated permission name of theMissingAuthorization
(s).
-
-
-
Field Detail
-
userId
protected final java.lang.String userId
-
missingAuthorizations
protected final java.util.List<MissingAuthorization> missingAuthorizations
-
resourceType
@Deprecated protected java.lang.String resourceType
Deprecated.
-
permissionName
@Deprecated protected java.lang.String permissionName
Deprecated.
-
resourceId
@Deprecated protected java.lang.String resourceId
Deprecated.
-
-
Constructor Detail
-
AuthorizationException
public AuthorizationException(java.lang.String message)
-
AuthorizationException
public AuthorizationException(java.lang.String userId, java.lang.String permissionName, java.lang.String resourceType, java.lang.String resourceId)
-
AuthorizationException
public AuthorizationException(java.lang.String userId, MissingAuthorization exceptionInfo)
-
AuthorizationException
public AuthorizationException(java.lang.String userId, java.util.List<MissingAuthorization> info)
-
-
Method Detail
-
getResourceType
@Deprecated public java.lang.String getResourceType()
Deprecated.UsegetMissingAuthorizations()
to get the type of the resource of theMissingAuthorization
(s). This method may be removed in future versions.- Returns:
- the type of the resource if there
is only one
MissingAuthorization
,null
otherwise
-
getViolatedPermissionName
@Deprecated public java.lang.String getViolatedPermissionName()
Deprecated.UsegetMissingAuthorizations()
to get the violated permission name of theMissingAuthorization
(s). This method may be removed in future versions.- Returns:
- the type of the violated permission name if there
is only one
MissingAuthorization
,null
otherwise
-
getUserId
public java.lang.String getUserId()
- Returns:
- id of the user in which context the request was made and who misses authorizations to perform it successfully
-
getResourceId
@Deprecated public java.lang.String getResourceId()
Deprecated.UsegetMissingAuthorizations()
to get the id of the resource of theMissingAuthorization
(s). This method may be removed in future versions.- Returns:
- the id of the resource if there
is only one
MissingAuthorization
,null
otherwise
-
getMissingAuthorizations
public java.util.List<MissingAuthorization> getMissingAuthorizations()
- Returns:
- Disjunctive list of
MissingAuthorization
from which a user needs to have at least one for the authorization to pass
-
-