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

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.scheme.SchemeManager
Public Methods
void flushSchemeEntities()
String getAssociationType()
@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.
List<GenericValue> getEntities(GenericValue scheme, ProjectPermissionKey permissionKey)
List<GenericValue> getEntities(GenericValue scheme, ProjectPermissionKey permissionKey, String parameter)
List<GenericValue> getEntities(GenericValue scheme, ProjectPermissionKey permissionKey, String type, String parameter)
Get all Generic Value permission records for a particular scheme and permission Id
List<GenericValue> getEntities(GenericValue scheme, String permissionKey)
List<GenericValue> getEntitiesByType(GenericValue scheme, ProjectPermissionKey permissionKey, String type)
String getEntityName()
@Deprecated Collection<Group> getGroups(Long permissionId, Project project)
This method is deprecated. Use getGroups(ProjectPermissionKey, Project). Since v6.3.
Collection<Group> getGroups(ProjectPermissionKey permissionKey, Project project)
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.
Collection<User> getUsers(ProjectPermissionKey permissionKey, PermissionContext ctx)
@Deprecated Collection<User> getUsers(Long permissionId, PermissionContext ctx)
This method is deprecated. Use getUsers(ProjectPermissionKey, PermissionContext). Since v6.3.
@Deprecated boolean hasSchemeAuthority(Long entityType, GenericValue entity)
This method is deprecated. Use hasSchemeAuthority(ProjectPermissionKey, GenericValue). Since v6.3.
@Deprecated boolean hasSchemeAuthority(Long entityType, GenericValue entity, User user, boolean issueCreation)
This method is deprecated. Use hasSchemeAuthority(ProjectPermissionKey, GenericValue, User, boolean). Since v6.3.
boolean hasSchemeAuthority(ProjectPermissionKey permissionKey, GenericValue entity, User user, boolean issueCreation)
Checks the given user's permission of the given permission type for the given entity.
boolean hasSchemeAuthority(ProjectPermissionKey permissionKey, GenericValue entity)
Checks anonymous permission of the given permission type for the given entity.
[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, 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

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

Throws
GenericEntityException

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

Throws
GenericEntityException

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

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

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

Throws
GenericEntityException

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

Throws
GenericEntityException

public String getEntityName ()

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

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

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

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

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

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

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

@Deprecated public boolean hasSchemeAuthority (Long entityType, GenericValue entity)

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

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

Parameters
entityType permission type.
entity the entity to which permission is being checked.
Returns
  • true only if the anonymous user is permitted.

@Deprecated public boolean hasSchemeAuthority (Long entityType, GenericValue entity, User user, boolean issueCreation)

This method is deprecated.
Use hasSchemeAuthority(ProjectPermissionKey, GenericValue, User, boolean). Since v6.3.

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

Parameters
entityType permission type.
entity the entity 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.

public boolean hasSchemeAuthority (ProjectPermissionKey permissionKey, GenericValue entity, User user, boolean issueCreation)

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

Parameters
permissionKey permission key.
entity the entity 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.

public boolean hasSchemeAuthority (ProjectPermissionKey permissionKey, GenericValue entity)

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

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