Package com.atlassian.jira.permission
Class PermissionHolder
java.lang.Object
com.atlassian.jira.permission.PermissionHolder
A person or a group of people that holds a permission.
When you grant a permission, you need to define to whom you grant it. PermissionHolder lets you do that.
It consists of two things:
PermissionHolderTypetype-
Type of the permission holder. This can be e.g. user, group, project role but also more ephemeral things like
issue assignee or reporter.
Standard JIRA reporter types are gathered in the
JiraPermissionHolderTypeenum. Stringparameter-
Some types require a parameter (e.g. when the type is user, the parameter needs to
contain the user id, group requires the group id, etc.) and some don't (e.g. assignee, reporter, project lead).
Note that each
PermissionHolderTypehas aPermissionHolderType.requiresParameter()method, which specifies whether it requires a parameter or not. It is not possible to create aPermissionHolderwithout a parameter when the type requires one, and vice versa.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanio.atlassian.fugue.Option<String>getType()inthashCode()static PermissionHolderholder(PermissionHolderType type) static PermissionHolderholder(PermissionHolderType type, String parameter) toString()