Package org.camunda.bpm.engine.impl.util
Class ResourceTypeUtil
java.lang.Object
org.camunda.bpm.engine.impl.util.ResourceTypeUtil
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Map<Integer,Class<? extends Enum<? extends Permission>>> A map containing allResourcesas a key and the respectivePermissionEnum class for this resource. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PermissiongetPermissionByNameAndResourceType(String permissionName, int resourceType) Currently used only in the Rest API Returns aPermissionbased on the specifiedpermissionNameandresourceTypestatic Map<Integer,Class<? extends Enum<? extends Permission>>> static Permission[]getPermissionsByResourceType(int givenResourceType) Retrieves thePermissionarray based on the predifinedPERMISSION_ENUMSstatic ResourcegetResourceByType(int resourceType) static booleanresourceIsContainedInArray(Integer resourceTypeId, Resource[] resources)
-
Field Details
-
PERMISSION_ENUMS
A map containing allResourcesas a key and the respectivePermissionEnum class for this resource.NOTE: In case of new
PermissionEnum class, please adjust the map accordingly
-
-
Constructor Details
-
ResourceTypeUtil
public ResourceTypeUtil()
-
-
Method Details
-
resourceIsContainedInArray
- Returns:
truein case the resource with the provided resourceTypeId is contained by the specified list
-
getPermissionEnums
- Returns:
- See
PERMISSION_ENUMS
-
getPermissionsByResourceType
Retrieves thePermissionarray based on the predifinedPERMISSION_ENUMS -
getPermissionByNameAndResourceType
public static Permission getPermissionByNameAndResourceType(String permissionName, int resourceType) Currently used only in the Rest API Returns aPermissionbased on the specifiedpermissionNameandresourceType- Throws:
BadUserRequestException- in case the permission is not valid for the specified resource type
-
getResourceByType
-