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>missingAuthorizationsprotected java.lang.StringpermissionNameDeprecated.protected java.lang.StringresourceIdDeprecated.protected java.lang.StringresourceTypeDeprecated.protected java.lang.StringuserId-
Fields inherited from class org.camunda.bpm.engine.ProcessEngineException
code
-
-
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 Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.StringgenerateMissingAuthorizationsList(java.util.List<MissingAuthorization> missingAuthorizations)Generate a String containing a list of missing authorizations.java.util.List<MissingAuthorization>getMissingAuthorizations()java.lang.StringgetResourceId()Deprecated.UsegetMissingAuthorizations()to get the id of the resource of theMissingAuthorization(s).java.lang.StringgetResourceType()Deprecated.UsegetMissingAuthorizations()to get the type of the resource of theMissingAuthorization(s).java.lang.StringgetUserId()java.lang.StringgetViolatedPermissionName()Deprecated.UsegetMissingAuthorizations()to get the violated permission name of theMissingAuthorization(s).-
Methods inherited from class org.camunda.bpm.engine.ProcessEngineException
getCode, setCode
-
-
-
-
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,nullotherwise
-
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,nullotherwise
-
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,nullotherwise
-
getMissingAuthorizations
public java.util.List<MissingAuthorization> getMissingAuthorizations()
- Returns:
- Disjunctive list of
MissingAuthorizationfrom which a user needs to have at least one for the authorization to pass
-
generateMissingAuthorizationsList
public static java.lang.String generateMissingAuthorizationsList(java.util.List<MissingAuthorization> missingAuthorizations)
Generate a String containing a list of missing authorizations.- Parameters:
missingAuthorizations-
-
-