Interface IssueSecurityLevelManager

All Known Implementing Classes:
IssueSecurityLevelManagerImpl

@PublicApi public interface IssueSecurityLevelManager
  • Method Details

    • getSchemeIssueSecurityLevels

      List<org.ofbiz.core.entity.GenericValue> getSchemeIssueSecurityLevels(Long schemeId)
      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.
    • getIssueSecurityLevels

      List<IssueSecurityLevel> getIssueSecurityLevels(long schemeId)
      Returns the list of Security Levels for the given Issue Security Level Scheme. The elements are ordered by name.
      Parameters:
      schemeId - ID of the Issue Security Level Scheme.
      Returns:
      the list of Security Levels for the given Issue Security Level Scheme.
      Since:
      v5.0
    • schemeIssueSecurityExists

      boolean schemeIssueSecurityExists(Long id)
      Deprecated.
      Use getSecurityLevel(long) != null instead. Since v5.0.
      Parameters:
      id - IssueSecurityLevel ID
      Returns:
      true if exists
    • getIssueSecurityName

      String getIssueSecurityName(Long id)
    • getIssueSecurityDescription

      String getIssueSecurityDescription(Long id)
    • getIssueSecurity

      @Nullable org.ofbiz.core.entity.GenericValue getIssueSecurity(@Nonnull Long id)
      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. May be null if you pass an invalid id.
    • getSecurityLevel

      IssueSecurityLevel getSecurityLevel(long id)
      Returns the IssueSecurityLevel with the given ID.
      Parameters:
      id - the ID
      Returns:
      the IssueSecurityLevel with the given ID.
      Since:
      v5.0
    • updateIssueSecurityLevel

      IssueSecurityLevel updateIssueSecurityLevel(IssueSecurityLevel issueSecurityLevel)
      Updates the name and/or description of security level.
      Parameters:
      issueSecurityLevel - the level to update
    • createIssueSecurityLevel

      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
    • createIssueSecurityLevel

      IssueSecurityLevel createIssueSecurityLevel(IssueSecurityLevel level)
      Creates an Issue Security Level with the same properties as in provided Issue Security Level.
      Parameters:
      level - The Issue security level to be created.
      Returns:
      the newly created Issue Security Level
    • getUsersSecurityLevels

      List<org.ofbiz.core.entity.GenericValue> getUsersSecurityLevels(org.ofbiz.core.entity.GenericValue entity, ApplicationUser user) throws org.ofbiz.core.entity.GenericEntityException
      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:
      org.ofbiz.core.entity.GenericEntityException - Exception in the OFBiz persistence layer.
    • getUsersSecurityLevels

      List<IssueSecurityLevel> getUsersSecurityLevels(Issue issue, ApplicationUser 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, ApplicationUser).
      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
      Since:
      v5.0
      See Also:
    • getUsersSecurityLevels

      List<IssueSecurityLevel> getUsersSecurityLevels(Project project, ApplicationUser 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, ApplicationUser).
      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
      Since:
      v5.0
      See Also:
    • getAllUsersSecurityLevels

      Collection<org.ofbiz.core.entity.GenericValue> getAllUsersSecurityLevels(ApplicationUser user) throws org.ofbiz.core.entity.GenericEntityException
      Deprecated.
      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:
      org.ofbiz.core.entity.GenericEntityException - Exception in the OFBiz persistence layer.
      Since:
      v4.0
    • getAllSecurityLevelsForUser

      @Nonnull Collection<IssueSecurityLevel> getAllSecurityLevelsForUser(ApplicationUser 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
      Since:
      v5.0
    • getAllSecurityLevels

      Collection<org.ofbiz.core.entity.GenericValue> getAllSecurityLevels() throws org.ofbiz.core.entity.GenericEntityException
      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:
      org.ofbiz.core.entity.GenericEntityException - Exception in the OFBiz persistence layer.
      Since:
      v4.0
    • getAllIssueSecurityLevels

      Collection<IssueSecurityLevel> getAllIssueSecurityLevels()
      Get all the different levels of security across all schemes.
      Returns:
      list containing the security levels, can be null
      Since:
      v5.0
    • getUsersSecurityLevelsByName

      Collection<org.ofbiz.core.entity.GenericValue> getUsersSecurityLevelsByName(ApplicationUser user, String securityLevelName) throws org.ofbiz.core.entity.GenericEntityException
      Deprecated.
      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:
      org.ofbiz.core.entity.GenericEntityException - Exception in the OFBiz persistence layer.
      Since:
      v4.0
    • getSecurityLevelsForUserByName

      Collection<IssueSecurityLevel> getSecurityLevelsForUserByName(ApplicationUser 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.
      Since:
      v5.0
    • getSecurityLevelsByName

      Collection<org.ofbiz.core.entity.GenericValue> getSecurityLevelsByName(String securityLevelName) throws org.ofbiz.core.entity.GenericEntityException
      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:
      org.ofbiz.core.entity.GenericEntityException - Exception in the OFBiz persistence layer.
      Since:
      v4.0
    • getIssueSecurityLevelsByName

      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.
      Since:
      v5.0
    • getSecurityLevelByNameAndSchema

      IssueSecurityLevel getSecurityLevelByNameAndSchema(String securityLevelName, Long schemaId)
      Get the level with specified name and schemaId.
      Parameters:
      securityLevelName - the name of the security level.
      schemaId - the id of security schema.
      Returns:
      the IssueSecurityLevel with the specified name and security level if was found, null otherwise.
      Since:
      v5.0
    • getSchemeDefaultSecurityLevel

      Long getSchemeDefaultSecurityLevel(org.ofbiz.core.entity.GenericValue project) throws org.ofbiz.core.entity.GenericEntityException
      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:
      org.ofbiz.core.entity.GenericEntityException - Exception in the OFBiz persistence layer.
    • getDefaultSecurityLevel

      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.
      Since:
      v5.0
    • getIssueSecurityLevel

      org.ofbiz.core.entity.GenericValue getIssueSecurityLevel(Long id) throws org.ofbiz.core.entity.GenericEntityException
      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:
      org.ofbiz.core.entity.GenericEntityException - Exception in the OFBiz persistence layer.
    • deleteSecurityLevel

      void deleteSecurityLevel(Long levelId)
      Deletes the given Issue Security Level and any child permissions.
      Parameters:
      levelId - Issue Security Level ID
    • clearUsersLevels

      @Internal void clearUsersLevels()
    • clearProjectLevels

      @Internal void clearProjectLevels(Project project)
    • getIssueCount

      Long getIssueCount(@Nullable Long issueSecurityLevelId, @Nonnull Long projectId)
      Get the count of issues at the given security level for a project.
      Parameters:
      issueSecurityLevelId - Issue Security Level
      projectId - Project
      Returns:
      count of issues at the given security level for a project.
      Since:
      V7.1.1