Interface ProjectFieldScreenHelper
- All Known Implementing Classes:
DefaultProjectFieldScreenHelper
public interface ProjectFieldScreenHelper
An internal helper class for Project Configuration.
- Since:
- v4.4
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Enum specifying whether fields screen is editable or not. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canUserEditScreen
(ApplicationUser user, FieldScreen screen) Determines whether given user can edit given screen without any context being givenboolean
canUserViewFieldScreenForProject
(ApplicationUser user, FieldScreen fieldScreen, Project project) Whether the provided user can view the field screen for the project.getAllProjectsForFieldScreen
(FieldScreen fieldScreen) Gets the projects using a givenFieldScreen
.getProjectsForFieldScreen
(FieldScreen fieldScreen) Gets the projects using a givenFieldScreen
.getUserEditScreenPermission
(ApplicationUser user, FieldScreen screen) Determines whether given user can edit given screen
-
Method Details
-
getProjectsForFieldScreen
Gets the projects using a givenFieldScreen
. A project uses a givenFieldScreen
if it:- uses a workflow that has the
FieldScreen
as a transition screen, or - 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
- uses a workflow that has the
-
getAllProjectsForFieldScreen
Gets the projects using a givenFieldScreen
. A project uses a givenFieldScreen
if it:- uses a workflow that has the
FieldScreen
as a transition screen, or - 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
- uses a workflow that has the
-
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
Determines whether given user can edit given screen without any context being given- Parameters:
user
- the user to check access forscreen
- the screen being edited- Returns:
-
getUserEditScreenPermission
ProjectFieldScreenHelper.FieldsScreenPermission getUserEditScreenPermission(ApplicationUser user, FieldScreen screen) Determines whether given user can edit given screen- Parameters:
user
- the user to check access forscreen
- the screen being edited- Returns:
- FieldsScreenPermission
- Since:
- v7.4
-