Interface IssueSecuritySchemeManager

All Superinterfaces:
SchemeManager
All Known Implementing Classes:
IssueSecuritySchemeManagerImpl

@PublicApi public interface IssueSecuritySchemeManager extends SchemeManager
  • Method Details

    • getSchemeObject

      Scheme getSchemeObject(Long id) throws DataAccessException
      Deprecated.
      Use getIssueSecurityLevelScheme(Long) instead. Since v5.2.
      Gets a scheme by id from the database.
      Specified by:
      getSchemeObject in interface SchemeManager
      Parameters:
      id - the id of the scheme to get.
      Returns:
      the Scheme
      Throws:
      DataAccessException - if there is trouble retrieving from the database.
    • getIssueSecurityLevelScheme

      IssueSecurityLevelScheme getIssueSecurityLevelScheme(Long schemeId)
      Returns the IssueSecurityLevelScheme for the given ID.
      Parameters:
      schemeId - Scheme ID
      Returns:
      the IssueSecurityLevelScheme for the given ID.
    • getIssueSecurityLevelSchemes

      Collection<IssueSecurityLevelScheme> getIssueSecurityLevelSchemes()
      Returns a list containing all defined IssueSecuritySchemes
      Returns:
      a list of IssueSecuritySchemes
    • getEntitiesBySecurityLevel

      List getEntitiesBySecurityLevel(Long securityLevelId) throws org.ofbiz.core.entity.GenericEntityException
      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:
      org.ofbiz.core.entity.GenericEntityException
    • getPermissionsBySecurityLevel

      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.
    • getEntities

      List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme) throws org.ofbiz.core.entity.GenericEntityException
      Get all Scheme entity records for a particular scheme. Inherited from SchemeManager.
      Specified by:
      getEntities in interface SchemeManager
      Parameters:
      scheme - The scheme that the entities belong to
      Returns:
      List of (GenericValue) entities
      Throws:
      org.ofbiz.core.entity.GenericEntityException - If a DB error occurs
    • getEntities

      List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, Long securityLevelId) throws org.ofbiz.core.entity.GenericEntityException
      Deprecated.
      Use getPermissionsBySecurityLevel(Long) instead. Since v5.2.
      Inherited from SchemeManager.
      Specified by:
      getEntities in interface SchemeManager
      Throws:
      org.ofbiz.core.entity.GenericEntityException
    • getEntities

      List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, String entityTypeId) throws org.ofbiz.core.entity.GenericEntityException
      Deprecated.
      Never worked for String anyway. Since v6.4.
      Inherited from SchemeManager.
      Specified by:
      getEntities in interface SchemeManager
      Throws:
      org.ofbiz.core.entity.GenericEntityException
    • getEntities

      List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, Long entityTypeId, String parameter) throws org.ofbiz.core.entity.GenericEntityException
      Deprecated.
      Not used - presumably this was invented in SchemeManager for Permission Schemes.
      Inherited from SchemeManager.
      Specified by:
      getEntities in interface SchemeManager
      Throws:
      org.ofbiz.core.entity.GenericEntityException
    • getEntities

      List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, String type, Long entityTypeId) throws org.ofbiz.core.entity.GenericEntityException
      Deprecated.
      Not used - presumably this was invented in SchemeManager for Permission Schemes.
      Inherited from SchemeManager.
      Specified by:
      getEntities in interface SchemeManager
      Throws:
      org.ofbiz.core.entity.GenericEntityException
    • getSchemesContainingEntity

      Collection<org.ofbiz.core.entity.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
    • getProjectsUsingScheme

      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.
    • setSchemeForProject

      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".
    • assignSchemeToProject

      String assignSchemeToProject(@Nonnull Project project, @Nullable Long newSchemeId, Map<Long,Long> oldToNewSecurityLevelMappings)
      Set the issue security level scheme to be used by the given Project and map any old security levels to new ones.
      Parameters:
      project - The Project
      newSchemeId - The desired new security level scheme to use - null indicates "no issue security levels".
      oldToNewSecurityLevelMappings - Mappings of old to new security levels. This must not contain null values. '-1' is used to represent the value "none".
      Returns:
      the URL of the progress page.
      Since:
      V7.1.1
    • hasSecurityLevelAccess

      boolean hasSecurityLevelAccess(@Nonnull Issue issue, @Nullable 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.