Package com.atlassian.jira.permission
Class PermissionSchemeUtil
java.lang.Object
com.atlassian.jira.permission.PermissionSchemeUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.atlassian.fugue.Option<ProjectPermissionKey> getPermissionKey(SchemeEntity schemeEntity) Retrieves a permission key from a scheme entity'sentityTypeIdfield.
-
Method Details
-
getPermissionKey
public static io.atlassian.fugue.Option<ProjectPermissionKey> getPermissionKey(SchemeEntity schemeEntity) Retrieves a permission key from a scheme entity'sentityTypeIdfield.As
SchemeEntity'sentityTypeIdfield is of typeObjectthere can be a lot of different things there. We accept and are able to process the following classes:- ProjectPermissionKey - returned verbatim
- String - literal permission key
- Long - we use
- Integer - we use
LegacyProjectPermissionKeyMappingto resolve the keyLegacyProjectPermissionKeyMappingto resolve the keyOption.none() is returned if
entityTypeIdif we couldn't find a legacy mapping from numeric value.- Returns:
- some project permission key if successful, none() otherwise
- Throws:
IllegalArgumentException- whenentityTypeIdfield is not a valid class.
-