public interface

PermissionSchemeManager

implements SchemeManager
com.atlassian.jira.permission.PermissionSchemeManager
Known Indirect Subclasses

Class Overview

This class is used to handle Permission Schemes. Permission Schemes are created, removed and edited through this class

See Also
  • {@link com.atlassian.jira.permission.PermissionSchemeService} for higher level operations.

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.scheme.SchemeManager
Public Methods
void flushSchemeEntities()
String getAssociationType()
@Deprecated List<GenericValue> getEntities(GenericValue scheme, ProjectPermissionKey permissionKey, String type, String parameter)
@Deprecated List<GenericValue> getEntities(GenericValue scheme, ProjectPermissionKey permissionKey, String parameter)
List<GenericValue> getEntities(GenericValue scheme, ProjectPermissionKey permissionKey)
@Deprecated List<GenericValue> getEntities(GenericValue scheme, String permissionKey)
@Deprecated List<GenericValue> getEntities(GenericValue scheme, String type, Long entityTypeId)
List<GenericValue> getEntities(GenericValue scheme)
Get all Scheme entity records for a particular scheme.
@Deprecated List<GenericValue> getEntities(GenericValue scheme, Long permissionId, String type, String parameter)
This method is deprecated. Use getEntities(GenericValue, ProjectPermissionKey, String, String). Since v6.3.
@Deprecated List<GenericValue> getEntities(GenericValue scheme, Long entityTypeId, String parameter)
@Deprecated List<GenericValue> getEntities(GenericValue scheme, Long entityTypeId)
@Deprecated List<GenericValue> getEntitiesByType(GenericValue scheme, ProjectPermissionKey permissionKey, String type)
String getEntityName()
Collection<Group> getGroups(ProjectPermissionKey permissionKey, Project project)
@Deprecated Collection<Group> getGroups(Long permissionId, Project project)
This method is deprecated. Use getGroups(ProjectPermissionKey, Project). Since v6.3.
Collection<PermissionSchemeEntry> getPermissionSchemeEntries(Scheme scheme, ProjectPermissionKey permissionKey)
Returns the PermissionSchemeEntries for the given Permission Scheme and ProjectPermissionKey.
Collection<PermissionSchemeEntry> getPermissionSchemeEntries(long schemeId, ProjectPermissionKey permissionKey, String type)
Returns the PermissionSchemeEntries for the given Permission Scheme and ProjectPermissionKey.
Collection<PermissionSchemeEntry> getPermissionSchemeEntries(long schemeId, ProjectPermissionKey permissionKey)
Returns the PermissionSchemeEntries for the given Permission Scheme and ProjectPermissionKey.
String getSchemeDesc()
String getSchemeEntityName()
Collection<GenericValue> getSchemesContainingEntity(String type, String parameter)
This is a method that is meant to quickly get you all the schemes that contain an entity of the specified type and parameter.
@Deprecated Collection<ApplicationUser> getUsers(Long permissionId, PermissionContext ctx)
This method is deprecated. Use getUsers(ProjectPermissionKey, PermissionContext). Since v6.3.
Collection<ApplicationUser> getUsers(ProjectPermissionKey permissionKey, PermissionContext ctx)
@Internal ProjectWidePermission hasProjectWidePermission(ProjectPermissionKey permissionKey, Project project, ApplicationUser user, boolean issueCreation)
@Internal boolean hasSchemePermission(ProjectPermissionKey permissionKey, Project project)
Checks anonymous permission of the given permission type for the given project.
@Internal boolean hasSchemePermission(ProjectPermissionKey permissionKey, Issue issue)
Checks anonymous permission of the given permission type for the given issue.
@Internal boolean hasSchemePermission(ProjectPermissionKey permissionKey, Project project, ApplicationUser user, boolean issueCreation)
Checks the given user's permission of the given permission type for the given project.
@Internal boolean hasSchemePermission(ProjectPermissionKey permissionKey, Issue issue, ApplicationUser user, boolean issueCreation)
Checks the given user's permission of the given permission type for the given issue.
[Expand]
Inherited Methods
From interface com.atlassian.jira.scheme.SchemeManager

Public Methods

public void flushSchemeEntities ()

public String getAssociationType ()

@Deprecated public List<GenericValue> getEntities (GenericValue scheme, ProjectPermissionKey permissionKey, String type, String parameter)

This method is deprecated.
Use getPermissionSchemeEntries(long, com.atlassian.jira.security.plugin.ProjectPermissionKey, String) instead. Since v6.4.

Get all Generic Value permission records for a particular scheme and permission Id

Parameters
scheme The scheme that the permissions belong to
permissionKey The key of the permission
type The type of the permission(Group, Current Reporter etc)
parameter The permission parameter (group name etc)
Returns
  • List of (GenericValue) permissions
Throws
GenericEntityException
GenericEntityException

@Deprecated public List<GenericValue> getEntities (GenericValue scheme, ProjectPermissionKey permissionKey, String parameter)

This method is deprecated.
Use getPermissionSchemeEntries(com.atlassian.jira.scheme.Scheme, com.atlassian.jira.security.plugin.ProjectPermissionKey) instead. Since v6.4.

Throws
GenericEntityException

public List<GenericValue> getEntities (GenericValue scheme, ProjectPermissionKey permissionKey)

This method is deprecated.
Use getPermissionSchemeEntries(com.atlassian.jira.scheme.Scheme, com.atlassian.jira.security.plugin.ProjectPermissionKey) instead. Since v6.4.

Throws
GenericEntityException

@Deprecated public List<GenericValue> getEntities (GenericValue scheme, String permissionKey)

This method is deprecated.
Use getPermissionSchemeEntries(com.atlassian.jira.scheme.Scheme, com.atlassian.jira.security.plugin.ProjectPermissionKey) instead. Since v6.4.

Inherited from SchemeManager.

Throws
GenericEntityException

@Deprecated public List<GenericValue> getEntities (GenericValue scheme, String type, Long entityTypeId)

This method is deprecated.
Use getPermissionSchemeEntries(long, com.atlassian.jira.security.plugin.ProjectPermissionKey, String) instead. Since v6.4.

Inherited from SchemeManager.

Throws
GenericEntityException

public List<GenericValue> getEntities (GenericValue scheme)

Get all Scheme entity records for a particular scheme. Inherited from SchemeManager.

Parameters
scheme The scheme that the entities belong to
Returns
  • List of (GenericValue) entities
Throws
GenericEntityException If a DB error occurs

@Deprecated public List<GenericValue> getEntities (GenericValue scheme, Long permissionId, String type, String parameter)

This method is deprecated.
Use getEntities(GenericValue, ProjectPermissionKey, String, String). Since v6.3.

Get all Generic Value permission records for a particular scheme and permission Id

Parameters
scheme The scheme that the permissions belong to
permissionId The Id of the permission
type The type of the permission(Group, Current Reporter etc)
parameter The permission parameter (group name etc)
Returns
  • List of (GenericValue) permissions
Throws
GenericEntityException
GenericEntityException

@Deprecated public List<GenericValue> getEntities (GenericValue scheme, Long entityTypeId, String parameter)

This method is deprecated.
Use getPermissionSchemeEntries(com.atlassian.jira.scheme.Scheme, com.atlassian.jira.security.plugin.ProjectPermissionKey) instead. Since v6.4.

Inherited from SchemeManager.

Throws
GenericEntityException

@Deprecated public List<GenericValue> getEntities (GenericValue scheme, Long entityTypeId)

This method is deprecated.
Use getPermissionSchemeEntries(com.atlassian.jira.scheme.Scheme, com.atlassian.jira.security.plugin.ProjectPermissionKey) instead. Since v6.4.

Inherited from SchemeManager.

Throws
GenericEntityException

@Deprecated public List<GenericValue> getEntitiesByType (GenericValue scheme, ProjectPermissionKey permissionKey, String type)

This method is deprecated.
Use getPermissionSchemeEntries(long, com.atlassian.jira.security.plugin.ProjectPermissionKey, String) instead. Since v6.4.

Throws
GenericEntityException

public String getEntityName ()

public Collection<Group> getGroups (ProjectPermissionKey permissionKey, Project project)

@Deprecated public Collection<Group> getGroups (Long permissionId, Project project)

This method is deprecated.
Use getGroups(ProjectPermissionKey, Project). Since v6.3.

public Collection<PermissionSchemeEntry> getPermissionSchemeEntries (Scheme scheme, ProjectPermissionKey permissionKey)

Returns the PermissionSchemeEntries for the given Permission Scheme and ProjectPermissionKey.

Parameters
scheme The permission scheme
permissionKey The permission type
Returns
  • the PermissionSchemeEntries for the given Permission Scheme and ProjectPermissionKey.

public Collection<PermissionSchemeEntry> getPermissionSchemeEntries (long schemeId, ProjectPermissionKey permissionKey, String type)

Returns the PermissionSchemeEntries for the given Permission Scheme and ProjectPermissionKey.

Parameters
schemeId The permission scheme
permissionKey The permission type
Returns
  • the PermissionSchemeEntries for the given Permission Scheme and ProjectPermissionKey.

public Collection<PermissionSchemeEntry> getPermissionSchemeEntries (long schemeId, ProjectPermissionKey permissionKey)

Returns the PermissionSchemeEntries for the given Permission Scheme and ProjectPermissionKey.

Parameters
schemeId The permission scheme
permissionKey The permission type
Returns
  • the PermissionSchemeEntries for the given Permission Scheme and ProjectPermissionKey.

public String getSchemeDesc ()

public String getSchemeEntityName ()

public Collection<GenericValue> getSchemesContainingEntity (String type, String parameter)

This is a method that is meant to quickly get you all the schemes that contain an entity of the specified type and parameter.

Parameters
type is the entity type
parameter is the scheme entries parameter value
Returns
  • Collection of GenericValues that represents a scheme

@Deprecated public Collection<ApplicationUser> getUsers (Long permissionId, PermissionContext ctx)

This method is deprecated.
Use getUsers(ProjectPermissionKey, PermissionContext). Since v6.3.

public Collection<ApplicationUser> getUsers (ProjectPermissionKey permissionKey, PermissionContext ctx)

@Internal public ProjectWidePermission hasProjectWidePermission (ProjectPermissionKey permissionKey, Project project, ApplicationUser user, boolean issueCreation)

@Internal

This method is an internal implementation detail and will change without notice.

Clients that depend on @Internal classes and interfaces can not expect to be compatible with any version other than the version they were compiled against (even minor version and milestone releases may break binary compatibility with respect to @Internal elements).

@Internal public boolean hasSchemePermission (ProjectPermissionKey permissionKey, Project project)

@Internal

This method is an internal implementation detail and will change without notice.

Clients that depend on @Internal classes and interfaces can not expect to be compatible with any version other than the version they were compiled against (even minor version and milestone releases may break binary compatibility with respect to @Internal elements).

Checks anonymous permission of the given permission type for the given project.

Parameters
permissionKey permission key.
project the project to which permission is being checked.
Returns
  • true only if the anonymous user is permitted.

@Internal public boolean hasSchemePermission (ProjectPermissionKey permissionKey, Issue issue)

@Internal

This method is an internal implementation detail and will change without notice.

Clients that depend on @Internal classes and interfaces can not expect to be compatible with any version other than the version they were compiled against (even minor version and milestone releases may break binary compatibility with respect to @Internal elements).

Checks anonymous permission of the given permission type for the given issue.

Parameters
permissionKey permission key.
issue the issue to which permission is being checked.
Returns
  • true only if the anonymous user is permitted.

@Internal public boolean hasSchemePermission (ProjectPermissionKey permissionKey, Project project, ApplicationUser user, boolean issueCreation)

@Internal

This method is an internal implementation detail and will change without notice.

Clients that depend on @Internal classes and interfaces can not expect to be compatible with any version other than the version they were compiled against (even minor version and milestone releases may break binary compatibility with respect to @Internal elements).

Checks the given user's permission of the given permission type for the given project.

Parameters
permissionKey permission key.
project the project to which permission is being checked.
user the user.
issueCreation whether the permission is for creating an issue.
Returns
  • true only if the user is permitted.

@Internal public boolean hasSchemePermission (ProjectPermissionKey permissionKey, Issue issue, ApplicationUser user, boolean issueCreation)

@Internal

This method is an internal implementation detail and will change without notice.

Clients that depend on @Internal classes and interfaces can not expect to be compatible with any version other than the version they were compiled against (even minor version and milestone releases may break binary compatibility with respect to @Internal elements).

Checks the given user's permission of the given permission type for the given issue.

Parameters
permissionKey permission key.
issue the issue to check permission against
user the user.
issueCreation whether the permission is for creating an issue.
Returns
  • true only if the user is permitted.