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