Interface PermissionSchemeManager

All Superinterfaces:
SchemeManager
All Known Implementing Classes:
DefaultPermissionSchemeManager, WorkflowBasedPermissionSchemeManager

public interface PermissionSchemeManager extends SchemeManager
This class is used to handle Permission Schemes. Permission Schemes are created, removed and edited through this class
  • Method Details

    • getSchemeEntityName

      String getSchemeEntityName()
    • getEntityName

      String getEntityName()
    • getAssociationType

      String getAssociationType()
    • getSchemeDesc

      String getSchemeDesc()
    • 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

      @Deprecated List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, Long entityTypeId) throws org.ofbiz.core.entity.GenericEntityException
      Inherited from SchemeManager.
      Specified by:
      getEntities in interface SchemeManager
      Throws:
      org.ofbiz.core.entity.GenericEntityException
    • getEntities

      @Deprecated List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, String permissionKey) throws org.ofbiz.core.entity.GenericEntityException
      Inherited from SchemeManager.
      Specified by:
      getEntities in interface SchemeManager
      Throws:
      org.ofbiz.core.entity.GenericEntityException
    • getEntities

      @Deprecated List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, Long entityTypeId, String parameter) throws org.ofbiz.core.entity.GenericEntityException
      Inherited from SchemeManager.
      Specified by:
      getEntities in interface SchemeManager
      Throws:
      org.ofbiz.core.entity.GenericEntityException
    • getEntities

      @Deprecated List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, String type, Long entityTypeId) throws org.ofbiz.core.entity.GenericEntityException
      Inherited from SchemeManager.
      Specified by:
      getEntities in interface SchemeManager
      Throws:
      org.ofbiz.core.entity.GenericEntityException
    • getPermissionSchemeEntries

      Collection<PermissionSchemeEntry> getPermissionSchemeEntries(@Nonnull Scheme scheme, @Nonnull ProjectPermissionKey permissionKey)
      Returns the PermissionSchemeEntries for the given Permission Scheme and ProjectPermissionKey.
      Parameters:
      scheme - The permission scheme
      permissionKey - The permission type
      Returns:
      the PermissionSchemeEntries for the given Permission Scheme and ProjectPermissionKey.
      Since:
      6.4
      See Also:
    • getPermissionSchemeEntries

      Collection<PermissionSchemeEntry> getPermissionSchemeEntries(long schemeId, @Nonnull ProjectPermissionKey permissionKey)
      Returns the PermissionSchemeEntries for the given Permission Scheme and ProjectPermissionKey.
      Parameters:
      schemeId - The permission scheme
      permissionKey - The permission type
      Returns:
      the PermissionSchemeEntries for the given Permission Scheme and ProjectPermissionKey.
      Since:
      6.4
      See Also:
    • getPermissionSchemeEntries

      Collection<PermissionSchemeEntry> getPermissionSchemeEntries(long schemeId, @Nonnull ProjectPermissionKey permissionKey, @Nonnull String type)
      Returns the PermissionSchemeEntries for the given Permission Scheme and ProjectPermissionKey.
      Parameters:
      schemeId - The permission scheme
      permissionKey - The permission type
      Returns:
      the PermissionSchemeEntries for the given Permission Scheme and ProjectPermissionKey.
      Since:
      6.4
      See Also:
    • getEntities

      List<org.ofbiz.core.entity.GenericValue> getEntities(@Nonnull org.ofbiz.core.entity.GenericValue scheme, @Nonnull ProjectPermissionKey permissionKey) throws org.ofbiz.core.entity.GenericEntityException
      Throws:
      org.ofbiz.core.entity.GenericEntityException
      Since:
      v6.3
    • getEntities

      @Deprecated List<org.ofbiz.core.entity.GenericValue> getEntities(org.ofbiz.core.entity.GenericValue scheme, Long permissionId, String type, String parameter) throws org.ofbiz.core.entity.GenericEntityException
      Get all Generic Value permission records for a particular scheme and permission Id
      Parameters:
      scheme - The scheme that the permissions belong to
      permissionId - The Id of the permission
      parameter - The permission parameter (group name etc)
      type - The type of the permission(Group, Current Reporter etc)
      Returns:
      List of (GenericValue) permissions
      Throws:
      org.ofbiz.core.entity.GenericEntityException
    • getEntities

      @Deprecated List<org.ofbiz.core.entity.GenericValue> getEntities(@Nonnull org.ofbiz.core.entity.GenericValue scheme, @Nonnull ProjectPermissionKey permissionKey, @Nonnull String type, @Nonnull String parameter) throws org.ofbiz.core.entity.GenericEntityException
      Get all Generic Value permission records for a particular scheme and permission Id
      Parameters:
      scheme - The scheme that the permissions belong to
      permissionKey - The key of the permission
      parameter - The permission parameter (group name etc)
      type - The type of the permission(Group, Current Reporter etc)
      Returns:
      List of (GenericValue) permissions
      Throws:
      org.ofbiz.core.entity.GenericEntityException
      Since:
      v6.3
    • getEntities

      @Deprecated List<org.ofbiz.core.entity.GenericValue> getEntities(@Nonnull org.ofbiz.core.entity.GenericValue scheme, @Nonnull ProjectPermissionKey permissionKey, @Nonnull String parameter) throws org.ofbiz.core.entity.GenericEntityException
      Throws:
      org.ofbiz.core.entity.GenericEntityException
      Since:
      v6.3
    • flushSchemeEntities

      void flushSchemeEntities()
    • 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
    • hasSchemePermission

      @Internal boolean hasSchemePermission(@Nonnull ProjectPermissionKey permissionKey, @Nonnull Project project)
      Checks anonymous permission of the given permission type for the given project.
      Parameters:
      permissionKey - permission key.
      project - the project to which permission is being checked.
      Returns:
      true only if the anonymous user is permitted.
      Since:
      v6.4
    • hasSchemePermission

      @Internal boolean hasSchemePermission(@Nonnull ProjectPermissionKey permissionKey, @Nonnull Issue issue)
      Checks anonymous permission of the given permission type for the given issue.
      Parameters:
      permissionKey - permission key.
      issue - the issue to which permission is being checked.
      Returns:
      true only if the anonymous user is permitted.
      Since:
      v6.4
    • hasSchemePermission

      @Internal boolean hasSchemePermission(@Nonnull ProjectPermissionKey permissionKey, @Nonnull Project project, @Nullable ApplicationUser user, boolean issueCreation)
      Checks the given user's permission of the given permission type for the given project.
      Parameters:
      permissionKey - permission key.
      project - the project to which permission is being checked.
      user - the user.
      issueCreation - whether the permission is for creating an issue.
      Returns:
      true only if the user is permitted.
      Since:
      v6.4
    • hasProjectWidePermission

      @Internal ProjectWidePermission hasProjectWidePermission(@Nonnull ProjectPermissionKey permissionKey, @Nonnull Project project, @Nonnull ApplicationUser user, boolean issueCreation)
    • hasSchemePermission

      @Internal boolean hasSchemePermission(@Nonnull ProjectPermissionKey permissionKey, @Nonnull Issue issue, @Nullable ApplicationUser user, boolean issueCreation)
      Checks the given user's permission of the given permission type for the given issue.
      Parameters:
      permissionKey - permission key.
      issue - the issue to check permission against
      user - the user.
      issueCreation - whether the permission is for creating an issue.
      Returns:
      true only if the user is permitted.
      Since:
      v6.4
    • getGroups

      Collection<com.atlassian.crowd.embedded.api.Group> getGroups(@Nonnull ProjectPermissionKey permissionKey, @Nonnull Project project)
      Since:
      v6.3
    • getUsers

      Specified by:
      getUsers in interface SchemeManager
    • getUsers

      Collection<ApplicationUser> getUsers(@Nonnull ProjectPermissionKey permissionKey, @Nonnull PermissionContext ctx)
      Since:
      v6.3
    • hasExtendedProjectAdministration

      @ExperimentalApi boolean hasExtendedProjectAdministration(@Nullable Project project)
      Checks if scheme for project has com.atlassian.jira.permission.PermissionSchemeAttributeManager.AttributeKeys#EXTENDED_ADMINISTER_PROJECTS_ENABLED_ATTRIBUTE enabled.
      Parameters:
      project -
      Returns:
      true if scheme for project has com.atlassian.jira.permission.PermissionSchemeAttributeManager.AttributeKeys#EXTENDED_ADMINISTER_PROJECTS_ENABLED_ATTRIBUTE enabled, false otherwise.
      Since:
      7.4