Class IssueSecuritySchemeServiceImpl

java.lang.Object
com.atlassian.jira.issue.security.IssueSecuritySchemeServiceImpl
All Implemented Interfaces:
IssueSecuritySchemeService

public class IssueSecuritySchemeServiceImpl extends Object implements IssueSecuritySchemeService
Since:
7.0
  • Constructor Details

  • Method Details

    • getIssueSecurityLevelSchemes

      public ServiceOutcome<? extends Collection<IssueSecurityLevelScheme>> getIssueSecurityLevelSchemes(ApplicationUser user)
      Description copied from interface: IssueSecuritySchemeService
      Returns all defined security level schemes.
      Specified by:
      getIssueSecurityLevelSchemes in interface IssueSecuritySchemeService
      Parameters:
      user - user for which permission checks are performed. Only users with an admin permission can perform this action.
      Returns:
      a service outcome with a collection of security level schemes or with an error collection
    • getIssueSecurityLevelScheme

      public ServiceOutcome<IssueSecurityLevelScheme> getIssueSecurityLevelScheme(ApplicationUser user, long schemeId)
      Description copied from interface: IssueSecuritySchemeService
      Returns a single issue security scheme with a given id.
      Specified by:
      getIssueSecurityLevelScheme in interface IssueSecuritySchemeService
      Parameters:
      user - user for which permission checks are performed. Permission to get the issue security scheme with a given key is granted in the following cases: 1. User has the administrator global permission. 2. The scheme is used in a project to which the user has the project administrator permission.
      Returns:
      a service outcome with an IssueSecurityLevelScheme or an error collection
    • getIssueSecurityLevelSchemeForProject

      public ServiceOutcome<IssueSecurityLevelScheme> getIssueSecurityLevelSchemeForProject(ApplicationUser user, long projectId)
      Description copied from interface: IssueSecuritySchemeService
      Returns a single issue security scheme for a given project.
      Specified by:
      getIssueSecurityLevelSchemeForProject in interface IssueSecuritySchemeService
      Parameters:
      user - user for which permissions checks are performed. Permission to get the issue security scheme with a given key is granted in the following cases: 1. User has the administrator global permission. 2. The scheme is used in a project to which the user has the project administrator permission.
      projectId - id of the project to return scheme for.
      Returns:
      a service outcome with an issueSecurityLevelScheme or an error collection
    • getIssueSecurityLevelSchemeForProject

      public ServiceOutcome<IssueSecurityLevelScheme> getIssueSecurityLevelSchemeForProject(ApplicationUser user, String projectKey)
      Description copied from interface: IssueSecuritySchemeService
      Returns a single issue security scheme for a given project.
      Specified by:
      getIssueSecurityLevelSchemeForProject in interface IssueSecuritySchemeService
      Parameters:
      user - user for which permissions checks are performed. Permission to get the issue security scheme with a given key is granted in the following cases: 1. User has the administrator global permission. 2. The scheme is used in a project to which the user has the project administrator permission.
      projectKey - key of the project to return scheme for.
      Returns:
      a service outcome with an issueSecurityLevelScheme or an error collection
    • assignSchemeToProject

      public ServiceOutcome<String> assignSchemeToProject(ApplicationUser user, long projectId, Long newSchemeId, Map<Long,Long> oldToNewSecurityLevelMappings)
      Description copied from interface: IssueSecuritySchemeService
      Assigns a new Issue Security Scheme to a project. If there was a prior scheme in place a mapping of old to new levels should be passed.
      Specified by:
      assignSchemeToProject in interface IssueSecuritySchemeService
      Parameters:
      user - user for which permissions checks are performed. Permission to get the issue security scheme with a given key is granted in the following cases: 1. User has the administrator global permission. 2. The scheme is used in a project to which the user has the project administrator permission.
      projectId - Project to assign
      newSchemeId - Id of the new IssueSecurity Scheme
      oldToNewSecurityLevelMappings - Mapping of old to new security levels to apply to issues in the project.
      Returns:
      a service outcome with a Task progress URL.
    • getIssueSecurityLevels

      public ServiceOutcome<? extends List<IssueSecurityLevel>> getIssueSecurityLevels(ApplicationUser user, long schemeId)
      Description copied from interface: IssueSecuritySchemeService
      Returns the list of security levels for the given issue security level scheme. The elements are ordered by name.
      Specified by:
      getIssueSecurityLevels in interface IssueSecuritySchemeService
      Parameters:
      user - user for which permission checks are performed. Permission to get the issue security levels for a scheme with a given key is granted in the following cases: 1. User has the administrator global permission. 2. The scheme is used in a project to which the user has the project administrator permission.
      Returns:
      a service outcome with a list of Security Levels for the given issue security level scheme, or with an error collection
    • getIssueSecurityLevel

      public ServiceOutcome<IssueSecurityLevel> getIssueSecurityLevel(ApplicationUser user, long securityLevelId)
      Description copied from interface: IssueSecuritySchemeService
      Returns an issue security level with a given id.
      Specified by:
      getIssueSecurityLevel in interface IssueSecuritySchemeService
      Parameters:
      user - user for which permission checks are performed. Only users with an admin permission can perform this action.
      Returns:
      a service outcome with an issue security level or an error collection
    • getPermissionsByIssueSecurityLevel

      public ServiceOutcome<? extends Collection<IssueSecurityLevelPermission>> getPermissionsByIssueSecurityLevel(ApplicationUser user, long securityLevelId)
      Description copied from interface: IssueSecuritySchemeService
      Returns permissions for the given issue security level.
      Specified by:
      getPermissionsByIssueSecurityLevel in interface IssueSecuritySchemeService
      Parameters:
      user - user for which permission checks are performed. Only users with an admin permission can perform this action.
      Returns:
      a service outcome with a list of issue security level permissions or an error collection