@PublicApi public interface

IssueSecuritySchemeManager

implements SchemeManager
com.atlassian.jira.issue.security.IssueSecuritySchemeManager
Known Indirect Subclasses

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.scheme.SchemeManager
Public Methods
List<GenericValue> getEntities(GenericValue scheme, String entityTypeId)
This method is deprecated. Never worked for String anyway. Since v6.4.
List<GenericValue> getEntities(GenericValue scheme, String type, Long entityTypeId)
This method is deprecated. Not used - presumably this was invented in SchemeManager for Permission Schemes.
List<GenericValue> getEntities(GenericValue scheme)
Get all Scheme entity records for a particular scheme.
List<GenericValue> getEntities(GenericValue scheme, Long entityTypeId, String parameter)
This method is deprecated. Not used - presumably this was invented in SchemeManager for Permission Schemes.
List<GenericValue> getEntities(GenericValue scheme, Long securityLevelId)
This method is deprecated. Use getPermissionsBySecurityLevel(Long) instead. Since v5.2.
List getEntitiesBySecurityLevel(Long securityLevelId)
This method is deprecated. Use getPermissionsBySecurityLevel(Long) instead. Since v5.2.
IssueSecurityLevelScheme getIssueSecurityLevelScheme(Long schemeId)
Returns the IssueSecurityLevelScheme for the given ID.
Collection<IssueSecurityLevelScheme> getIssueSecurityLevelSchemes()
Returns a list containing all defined IssueSecuritySchemes
List<IssueSecurityLevelPermission> getPermissionsBySecurityLevel(Long securityLevelId)
Returns the configured permissions for the given Security Level.
List<Project> getProjectsUsingScheme(long schemeId)
Returns all projects that use the given Issue Security Level Scheme.
Scheme getSchemeObject(Long id)
This method is deprecated. Use getIssueSecurityLevelScheme(Long) instead. Since v5.2.
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.
boolean hasSecurityLevelAccess(Issue issue, ApplicationUser user)
Checks if the given user has permission to see the Issue Security Level of the given issue.
void setSchemeForProject(Project project, Long issueSecuritySchemeId)
Set the issue security level scheme to be used by the given Project.
[Expand]
Inherited Methods
From interface com.atlassian.jira.scheme.SchemeManager

Public Methods

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

This method is deprecated.
Never worked for String anyway. Since v6.4.

Inherited from SchemeManager.

Throws
GenericEntityException

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

This method is deprecated.
Not used - presumably this was invented in SchemeManager for Permission Schemes.

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

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

This method is deprecated.
Not used - presumably this was invented in SchemeManager for Permission Schemes.

Inherited from SchemeManager.

Throws
GenericEntityException

public List<GenericValue> getEntities (GenericValue scheme, Long securityLevelId)

This method is deprecated.
Use getPermissionsBySecurityLevel(Long) instead. Since v5.2.

Inherited from SchemeManager.

Throws
GenericEntityException

public List getEntitiesBySecurityLevel (Long securityLevelId)

This method is deprecated.
Use getPermissionsBySecurityLevel(Long) instead. Since v5.2.

Returns the configured permissions for the given Security Level.

Parameters
securityLevelId the Security Level
Returns
  • the configured permissions for the given Security Level.
Throws
GenericEntityException

public IssueSecurityLevelScheme getIssueSecurityLevelScheme (Long schemeId)

Returns the IssueSecurityLevelScheme for the given ID.

Parameters
schemeId Scheme ID
Returns
  • the IssueSecurityLevelScheme for the given ID.

public Collection<IssueSecurityLevelScheme> getIssueSecurityLevelSchemes ()

Returns a list containing all defined IssueSecuritySchemes

Returns
  • a list of IssueSecuritySchemes

public List<IssueSecurityLevelPermission> getPermissionsBySecurityLevel (Long securityLevelId)

Returns the configured permissions for the given Security Level.

Parameters
securityLevelId the Security Level
Returns
  • the configured permissions for the given Security Level.

public List<Project> getProjectsUsingScheme (long schemeId)

Returns all projects that use the given Issue Security Level Scheme.

Parameters
schemeId ID of the Issue Security Level Scheme
Returns
  • all projects that use the given Issue Security Level Scheme.

public Scheme getSchemeObject (Long id)

This method is deprecated.
Use getIssueSecurityLevelScheme(Long) instead. Since v5.2.

Gets a scheme by id from the database.

Parameters
id the id of the scheme to get.
Returns
  • the Scheme
Throws
DataAccessException if there is trouble retrieving from the database.

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 boolean hasSecurityLevelAccess (Issue issue, ApplicationUser user)

Checks if the given user has permission to see the Issue Security Level of the given issue.

Note that this does not check other permissions.

Parameters
issue the Issue
user the User (null for anonymous)
Returns
  • true if the user hase Security Level permission for the issue.

public void setSchemeForProject (Project project, Long issueSecuritySchemeId)

Set the issue security level scheme to be used by the given Project.

Parameters
project The Project
issueSecuritySchemeId The desired new security level scheme to use - null indicates "no issue security levels".