@PublicApi public interface

IssueSecurityLevelManager

com.atlassian.jira.issue.security.IssueSecurityLevelManager
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

Public Methods
@Internal void clearProjectLevels(GenericValue project)
@Internal void clearUsersLevels()
IssueSecurityLevel createIssueSecurityLevel(long schemeId, String name, String description)
Creates an Issue Security Level with the given properties.
void deleteSecurityLevel(Long levelId)
Deletes the given Issue Security Level and any child permissions.
Collection<IssueSecurityLevel> getAllIssueSecurityLevels()
Get all the different levels of security across all schemes.
Collection<GenericValue> getAllSecurityLevels()
This method is deprecated. Use getAllIssueSecurityLevels() instead. Since v5.0.
@Nonnull Collection<IssueSecurityLevel> getAllSecurityLevelsForUser(User user)
Get the different levels of security that the user can see across all projects.
Collection<GenericValue> getAllUsersSecurityLevels(User user)
This method is deprecated. Use getAllSecurityLevelsForUser(com.atlassian.crowd.embedded.api.User) instead. Since v5.0.
Long getDefaultSecurityLevel(Project project)
Returns the default Security Level as defined in the Issue Security Level scheme for the given project.
GenericValue getIssueSecurity(Long id)
This method is deprecated. Use getSecurityLevel(long) instead. Since v5.0.
String getIssueSecurityDescription(Long id)
GenericValue getIssueSecurityLevel(Long id)
This method is deprecated. Use getSecurityLevel(long) instead. Since v5.0.
List<IssueSecurityLevel> getIssueSecurityLevels(long schemeId)
Returns the list of Security Levels for the given Issue Security Level Scheme.
Collection<IssueSecurityLevel> getIssueSecurityLevelsByName(String securityLevelName)
Get the different levels of security that have the specified name.
String getIssueSecurityName(Long id)
Long getSchemeDefaultSecurityLevel(GenericValue project)
This method is deprecated. Use getDefaultSecurityLevel(com.atlassian.jira.project.Project) instead. Since v5.0.
List<GenericValue> getSchemeIssueSecurityLevels(Long schemeId)
This method is deprecated. Use getIssueSecurityLevels(long) instead. Since v5.0.
IssueSecurityLevel getSecurityLevel(long id)
Returns the IssueSecurityLevel with the given ID.
Collection<GenericValue> getSecurityLevelsByName(String securityLevelName)
This method is deprecated. Use getIssueSecurityLevelsByName(String) instead. Since v5.0.
Collection<IssueSecurityLevel> getSecurityLevelsForUserByName(User user, String securityLevelName)
Get the different levels of security that a user can see that have the specified name.
List<IssueSecurityLevel> getUsersSecurityLevels(Project project, User user)
Get the different levels of security that can be set for an issue created in this project.
List<IssueSecurityLevel> getUsersSecurityLevels(Issue issue, User user)
Get the different levels of security that can be set for this issue.
List<GenericValue> getUsersSecurityLevels(GenericValue entity, User user)
This method is deprecated. Use getUsersSecurityLevels(Issue, User) orgetUsersSecurityLevels(Project, User) instead. Since v5.0.
Collection<GenericValue> getUsersSecurityLevelsByName(User user, String securityLevelName)
This method is deprecated. Use getSecurityLevelsForUserByName(com.atlassian.crowd.embedded.api.User, String) instead. Since v5.0.
boolean schemeIssueSecurityExists(Long id)
This method is deprecated. Use getSecurityLevel(long) != null instead. Since v5.0.

Public Methods

@Internal public void clearProjectLevels (GenericValue 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).

@Internal public void clearUsersLevels ()

@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).

public IssueSecurityLevel createIssueSecurityLevel (long schemeId, String name, String description)

Creates an Issue Security Level with the given properties.

Parameters
schemeId The Issue security scheme that this level belongs to.
name The name of the new level
description an optional description
Returns
  • the newly created Issue Security Level

public void deleteSecurityLevel (Long levelId)

Deletes the given Issue Security Level and any child permissions.

Parameters
levelId Issue Security Level ID

public Collection<IssueSecurityLevel> getAllIssueSecurityLevels ()

Get all the different levels of security across all schemes.

Returns
  • list containing the security levels, can be null

public Collection<GenericValue> getAllSecurityLevels ()

This method is deprecated.
Use getAllIssueSecurityLevels() instead. Since v5.0.

Get all the different levels of security across all schemes.

Returns
  • list containing the security levels, can be null
Throws
GenericEntityException Exception in the OFBiz persistence layer.

@Nonnull public Collection<IssueSecurityLevel> getAllSecurityLevelsForUser (User user)

Get the different levels of security that the user can see across all projects.

Parameters
user The user used for the security check
Returns
  • list containing the security levels

public Collection<GenericValue> getAllUsersSecurityLevels (User user)

This method is deprecated.
Use getAllSecurityLevelsForUser(com.atlassian.crowd.embedded.api.User) instead. Since v5.0.

Get the different levels of security that the user can see across all projects.

Parameters
user The user used for the security check
Returns
  • list containing the security levels, can be null
Throws
GenericEntityException Exception in the OFBiz persistence layer.

public Long getDefaultSecurityLevel (Project project)

Returns the default Security Level as defined in the Issue Security Level scheme for the given project.

Parameters
project the Project
Returns
  • the default Security Level as defined in the Issue Security Level scheme for the given project. Can be null.

public GenericValue getIssueSecurity (Long id)

This method is deprecated.
Use getSecurityLevel(long) instead. Since v5.0.

Returns the IssueSecurityLevel with the given ID.

Parameters
id the ID
Returns
  • the IssueSecurityLevel with the given ID.

public String getIssueSecurityDescription (Long id)

public GenericValue getIssueSecurityLevel (Long id)

This method is deprecated.
Use getSecurityLevel(long) instead. Since v5.0.

Returns the IssueSecurityLevel with the given ID.

Parameters
id the ID
Returns
  • the IssueSecurityLevel with the given ID.
Throws
GenericEntityException Exception in the OFBiz persistence layer.

public List<IssueSecurityLevel> getIssueSecurityLevels (long schemeId)

Returns the list of Security Levels for the given Issue Security Level Scheme.

Parameters
schemeId ID of the Issue Security Level Scheme.
Returns
  • the list of Security Levels for the given Issue Security Level Scheme.

public Collection<IssueSecurityLevel> getIssueSecurityLevelsByName (String securityLevelName)

Get the different levels of security that have the specified name.

Parameters
securityLevelName the name of the security level.
Returns
  • a collection of the IssueSecurityLevels with the specified name.

public String getIssueSecurityName (Long id)

public Long getSchemeDefaultSecurityLevel (GenericValue project)

This method is deprecated.
Use getDefaultSecurityLevel(com.atlassian.jira.project.Project) instead. Since v5.0.

Returns the default Security Level as defined in the Issue Security Level scheme for the given project.

Parameters
project the Project
Returns
  • the default Security Level as defined in the Issue Security Level scheme for the given project. Can be null.
Throws
GenericEntityException Exception in the OFBiz persistence layer.

public List<GenericValue> getSchemeIssueSecurityLevels (Long schemeId)

This method is deprecated.
Use getIssueSecurityLevels(long) instead. Since v5.0.

Returns the list of Security Levels for the given Issue Security Level Scheme.

Parameters
schemeId ID of the Issue Security Level Scheme.
Returns
  • the list of Security Levels for the given Issue Security Level Scheme.

public IssueSecurityLevel getSecurityLevel (long id)

Returns the IssueSecurityLevel with the given ID.

Parameters
id the ID
Returns
  • the IssueSecurityLevel with the given ID.

public Collection<GenericValue> getSecurityLevelsByName (String securityLevelName)

This method is deprecated.
Use getIssueSecurityLevelsByName(String) instead. Since v5.0.

Get the different levels of security that have the specified name.

Parameters
securityLevelName the name of the security level.
Returns
  • a collection of the GenericValues representing each level with the specified name.
Throws
GenericEntityException Exception in the OFBiz persistence layer.

public Collection<IssueSecurityLevel> getSecurityLevelsForUserByName (User user, String securityLevelName)

Get the different levels of security that a user can see that have the specified name.

Parameters
user the user
securityLevelName the name of the security level.
Returns
  • a collection of each IssueSecurityLevel they can see with the specified name.

public List<IssueSecurityLevel> getUsersSecurityLevels (Project project, User user)

Get the different levels of security that can be set for an issue created in this project. If you are editing an existing Issue, then use getUsersSecurityLevels(Issue, User).

Parameters
project the project that the security is being checked for
user The user used for the security check
Returns
  • list containing the security levels, can be null

public List<IssueSecurityLevel> getUsersSecurityLevels (Issue issue, User user)

Get the different levels of security that can be set for this issue. If you are creating a new Issue, then use getUsersSecurityLevels(com.atlassian.jira.project.Project, com.atlassian.crowd.embedded.api.User).

Parameters
issue This is the issue that the security is being checked for
user The user used for the security check
Returns
  • list containing the security levels, can be null

public List<GenericValue> getUsersSecurityLevels (GenericValue entity, User user)

This method is deprecated.
Use getUsersSecurityLevels(Issue, User) orgetUsersSecurityLevels(Project, User) instead. Since v5.0.

Get the different levels of security that can be set for this issue.

Parameters
entity This is the issue or the project that the security is being checked for
user The user used for the security check
Returns
  • list containing the security levels, can be null
Throws
GenericEntityException Exception in the OFBiz persistence layer.

public Collection<GenericValue> getUsersSecurityLevelsByName (User user, String securityLevelName)

This method is deprecated.
Use getSecurityLevelsForUserByName(com.atlassian.crowd.embedded.api.User, String) instead. Since v5.0.

Get the different levels of security that a user can see that have the specified name.

Parameters
user the user
securityLevelName the name of the security level.
Returns
  • a collection of the GenericValues representing each level they can see with the specified name.
Throws
GenericEntityException Exception in the OFBiz persistence layer.

public boolean schemeIssueSecurityExists (Long id)

This method is deprecated.
Use getSecurityLevel(long) != null instead. Since v5.0.

Parameters
id IssueSecurityLevel ID
Returns
  • true if exists