Package org.operaton.bpm.engine
Class AuthorizationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.operaton.bpm.engine.ProcessEngineException
org.operaton.bpm.engine.AuthorizationException
- All Implemented Interfaces:
Serializable
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<MissingAuthorization> protected StringDeprecated.protected StringDeprecated.protected StringDeprecated.protected final StringFields inherited from class org.operaton.bpm.engine.ProcessEngineException
code -
Constructor Summary
ConstructorsConstructorDescriptionAuthorizationException(String message) AuthorizationException(String userId, String permissionName, String resourceType, String resourceId) AuthorizationException(String userId, List<MissingAuthorization> info) AuthorizationException(String userId, MissingAuthorization exceptionInfo) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgenerateMissingAuthorizationsList(List<MissingAuthorization> missingAuthorizations) Generate a String containing a list of missing authorizations.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.UsegetMissingAuthorizations()instead to get the type of the resource of theMissingAuthorization(s).Deprecated, for removal: This API element is subject to removal in a future version.UsegetMissingAuthorizations()instead to get the violated permission name of theMissingAuthorization(s).Methods inherited from class org.operaton.bpm.engine.ProcessEngineException
getCode, setCodeMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
userId
-
missingAuthorizations
-
resourceType
Deprecated. -
permissionName
Deprecated. -
resourceId
Deprecated.
-
-
Constructor Details
-
AuthorizationException
-
AuthorizationException
-
AuthorizationException
-
AuthorizationException
-
-
Method Details
-
getResourceType
Deprecated, for removal: This API element is subject to removal in a future version.UsegetMissingAuthorizations()instead to get the type of the resource of theMissingAuthorization(s).- Returns:
- the type of the resource if there is only one
MissingAuthorization,nullotherwise.
-
getViolatedPermissionName
Deprecated, for removal: This API element is subject to removal in a future version.UsegetMissingAuthorizations()instead to get the violated permission name of theMissingAuthorization(s).- Returns:
- the type of the violated permission name if there
is only one
MissingAuthorization,nullotherwise.
-
getUserId
- Returns:
- id of the user in which context the request was made and who misses authorizations to perform it successfully.
-
getResourceId
Deprecated, for removal: This API element is subject to removal in a future version.UsegetMissingAuthorizations()instead to get the id of the resource of theMissingAuthorization(s).- Returns:
- the id of the resource if there is only one
MissingAuthorization,nullotherwise.
-
getMissingAuthorizations
- Returns:
- Disjunctive list of
MissingAuthorizationfrom which a user needs to have at least one for the authorization to pass
-
generateMissingAuthorizationsList
public static String generateMissingAuthorizationsList(List<MissingAuthorization> missingAuthorizations) Generate a String containing a list of missing authorizations.- Parameters:
missingAuthorizations-
-
getMissingAuthorizations()instead to get the id of the resource of theMissingAuthorization(s).