Interface ProjectFieldScreenHelper

All Known Implementing Classes:
DefaultProjectFieldScreenHelper

public interface ProjectFieldScreenHelper
An internal helper class for Project Configuration.
Since:
v4.4
  • Method Details

    • getProjectsForFieldScreen

      List<Project> getProjectsForFieldScreen(FieldScreen fieldScreen)
      Gets the projects using a given FieldScreen. A project uses a given FieldScreen if it:

      1. uses a workflow that has the FieldScreen as a transition screen, or
      2. uses a field screen scheme thas has a FieldScreen for one of its issue operations

      Only projects for which the requesting user has ProjectAction.EDIT_PROJECT_CONFIG permissions are returned.

      Parameters:
      fieldScreen - field screen to find associated projects for.
      Returns:
      list of projects which use the given field screen. Sorted by ProjectNameComparator.COMPARATOR
    • getAllProjectsForFieldScreen

      List<Project> getAllProjectsForFieldScreen(FieldScreen fieldScreen)
      Gets the projects using a given FieldScreen. A project uses a given FieldScreen if it:

      1. uses a workflow that has the FieldScreen as a transition screen, or
      2. uses a field screen scheme thas has a FieldScreen for one of its issue operations

      This method return all projects existing on instance, also projects which should not be visible for the user.

      Parameters:
      fieldScreen - field screen to find associated projects for.
      Returns:
      list of projects which use the given field screen. Sorted by ProjectNameComparator.COMPARATOR
    • canUserViewFieldScreenForProject

      boolean canUserViewFieldScreenForProject(ApplicationUser user, FieldScreen fieldScreen, Project project)
      Whether the provided user can view the field screen for the project.
      Parameters:
      user - the user to check to access for. Must not be null.
      fieldScreen - the field screen to query view access on. Must not be null.
      project - the project the field screen should be on. Must not be null.
      Returns:
      if the provided user can view the field screen for the project
    • canUserEditScreen

      boolean canUserEditScreen(ApplicationUser user, FieldScreen screen)
      Determines whether given user can edit given screen without any context being given
      Parameters:
      user - the user to check access for
      screen - the screen being edited
      Returns:
    • getUserEditScreenPermission

      Determines whether given user can edit given screen
      Parameters:
      user - the user to check access for
      screen - the screen being edited
      Returns:
      FieldsScreenPermission
      Since:
      v7.4