Package com.atlassian.jira.project
Class DefaultProjectOrderByManager
java.lang.Object
com.atlassian.jira.project.DefaultProjectOrderByManager
- All Implemented Interfaces:
ProjectOrderByManager
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultProjectOrderByManager(ProjectManager projectManager, PermissionManager permissionManager, ProjectPropertiesManager projectPropertiesManager, FieldManager fieldManager, InternalProjectPermissionHelper internalProjectPermissionHelper) -
Method Summary
Modifier and TypeMethodDescriptiongetProjectPreferredOrderByOption(long projectId, ApplicationUser user) Retrieves the preferred order-by option for issues within a specified project.voidupdateProjectPreferredOrderByOption(long projectId, ApplicationUser user, String newOrderByOption) Updates the order-by preferences for issues within a specified project.
-
Field Details
-
PREFERRED_ORDER_BY_OPTION_KEY
- See Also:
-
-
Constructor Details
-
DefaultProjectOrderByManager
public DefaultProjectOrderByManager(ProjectManager projectManager, PermissionManager permissionManager, ProjectPropertiesManager projectPropertiesManager, FieldManager fieldManager, InternalProjectPermissionHelper internalProjectPermissionHelper)
-
-
Method Details
-
getProjectPreferredOrderByOption
public Optional<String> getProjectPreferredOrderByOption(long projectId, ApplicationUser user) throws PermissionException Description copied from interface:ProjectOrderByManagerRetrieves the preferred order-by option for issues within a specified project.If the project is not valid, this method will throw an exception.
If the user lacks permission to browse the project, this method will throw a
PermissionException.- Specified by:
getProjectPreferredOrderByOptionin interfaceProjectOrderByManager- Parameters:
projectId- the ID of the projectuser- the user performing the operation- Returns:
- an
Optionalcontaining the preferred order-by option if available and valid, otherwiseOptional.empty() - Throws:
PermissionException- if the user does not have permission to browse the project
-
updateProjectPreferredOrderByOption
public void updateProjectPreferredOrderByOption(long projectId, ApplicationUser user, String newOrderByOption) throws PermissionException Description copied from interface:ProjectOrderByManagerUpdates the order-by preferences for issues within a specified project.The
newOrderByOptionspecifies the ID of the preferred orderable field. If thenewOrderByOptionis empty, the preferred order-by option is cleared.This method will throw exceptions under the following conditions:
- If the project is not valid.
- If the user does not have project administration or admin permissions.
- If the
newOrderByOptionis invalid.
- Specified by:
updateProjectPreferredOrderByOptionin interfaceProjectOrderByManager- Parameters:
projectId- the ID of the project for which the order-by preferences will be changeduser- the user performing the operationnewOrderByOption- the new preferred order-by option- Throws:
PermissionException- if the user lacks the necessary permissions
-