public interface PrioritySchemeService
Modifier and Type | Interface and Description |
---|---|
static class |
PrioritySchemeService.PrioritySchemeData |
Modifier and Type | Method and Description |
---|---|
ServiceOutcome<FieldConfigScheme> |
assignProject(ApplicationUser user,
FieldConfigScheme priorityFieldConfig,
Project project)
Associates a project with a priority scheme.
|
ServiceOutcome<FieldConfigScheme> |
assignProject(ApplicationUser user,
Long schemeId,
io.atlassian.fugue.Either<Long,String> projectKeyOrId,
boolean failIfMigrationNeeded)
Associates a project with a priority scheme.
|
ServiceOutcome<FieldConfigScheme> |
assignProjects(ApplicationUser user,
FieldConfigScheme priorityFieldConfig,
Collection<Project> projects)
Associates projects with a priority scheme.
|
ServiceOutcome<FieldConfigScheme> |
createScheme(ApplicationUser user,
PrioritySchemeService.PrioritySchemeData prioritySchemeData)
Creates the scheme wih given data.
|
ServiceResult |
deleteScheme(ApplicationUser user,
FieldConfigScheme priorityFieldConfig)
Deletes the scheme and associates it's project with the default priority scheme.
|
ServiceResult |
deleteScheme(ApplicationUser user,
Long id)
Deletes the scheme and associates it's project with the default priority scheme.
|
ServiceOutcome<FieldConfigScheme> |
editScheme(ApplicationUser user,
FieldConfigScheme priorityFieldConfig,
List<String> optionIds,
String defaultOption)
Updates the scheme wih given data.
|
ServiceOutcome<FieldConfigScheme> |
editScheme(ApplicationUser user,
PrioritySchemeService.PrioritySchemeData data,
boolean failIfMigrationNeeded)
Updates the scheme wih given data.
|
List<Project> |
filterProjectsNotPossibleToAssociate(List<Project> projects)
Filters out projects which shouldn't be associated to priority scheme (e.g.
|
ServiceOutcome<FieldConfigScheme> |
getScheme(ApplicationUser user,
Long id)
Gets the scheme wih given id.
|
ServiceOutcome<FieldConfigScheme> |
getSchemeForProject(ApplicationUser user,
io.atlassian.fugue.Either<Long,String> projectKeyOrId)
Gets the scheme for given project key.
|
ServiceOutcome<Collection<FieldConfigScheme>> |
getSchemes(ApplicationUser user)
Gets all priority schemes.
|
boolean |
hasAnyNotPossibleToAssociateProject(Collection<Project> projects)
Checks if in given list there is at least one not able to associate project (e.g.
|
ServiceResult |
schemeDataValidate(ApplicationUser user,
PrioritySchemeService.PrioritySchemeData prioritySchemeData)
Validates if passed
PrioritySchemeService.PrioritySchemeData can be used to create/edit priority scheme. |
ServiceOutcome<FieldConfigScheme> |
unassignProject(ApplicationUser user,
Long schemeId,
io.atlassian.fugue.Either<Long,String> projectKeyOrId)
Deassociates a project from a priority scheme.
|
ServiceOutcome<FieldConfigScheme> assignProjects(@Nonnull ApplicationUser user, @Nullable FieldConfigScheme priorityFieldConfig, @Nonnull Collection<Project> projects)
user
- Application userpriorityFieldConfig
- the priority scheme. Should the scheme be null - association with default scheme is assumed.projects
- the Collection of projects to assignServiceOutcome
with affected FieldConfigScheme
ServiceOutcome<FieldConfigScheme> assignProject(@Nonnull ApplicationUser user, @Nullable FieldConfigScheme priorityFieldConfig, @Nonnull Project project)
user
- Application userpriorityFieldConfig
- the priority scheme. Should the scheme be null - association with default scheme is assumed.project
- the projectServiceOutcome
with affected FieldConfigScheme
ServiceOutcome<FieldConfigScheme> assignProject(@Nonnull ApplicationUser user, @Nullable Long schemeId, @Nonnull io.atlassian.fugue.Either<Long,String> projectKeyOrId, boolean failIfMigrationNeeded)
user
- Application userschemeId
- id of the priority scheme.projectKeyOrId
- key of id of the projectfailIfMigrationNeeded
- whether validation should fail if migration is neededServiceOutcome
with affected FieldConfigScheme
ServiceOutcome<FieldConfigScheme> unassignProject(@Nonnull ApplicationUser user, @Nullable Long schemeId, @Nonnull io.atlassian.fugue.Either<Long,String> projectKeyOrId)
user
- Application userschemeId
- id of the priority scheme.projectKeyOrId
- key or id of the projectServiceOutcome
with affected FieldConfigScheme
ServiceOutcome<FieldConfigScheme> editScheme(@Nonnull ApplicationUser user, @Nonnull FieldConfigScheme priorityFieldConfig, @Nonnull List<String> optionIds, String defaultOption)
user
- Application userpriorityFieldConfig
- the priority scheme to edit. The default priority scheme can not be edited.optionIds
- new list of priorities in the schemedefaultOption
- default priority of the schemeServiceOutcome
with affected FieldConfigScheme
ServiceOutcome<FieldConfigScheme> editScheme(@Nonnull ApplicationUser user, @Nonnull PrioritySchemeService.PrioritySchemeData data, boolean failIfMigrationNeeded)
user
- Application userdata
- priority scheme datafailIfMigrationNeeded
- whether validation should fail if migration is neededServiceOutcome
with affected FieldConfigScheme
ServiceResult deleteScheme(@Nonnull ApplicationUser user, @Nonnull FieldConfigScheme priorityFieldConfig)
user
- Application userpriorityFieldConfig
- the priority scheme to delete. The default priority scheme can not be deleted.ServiceResult deleteScheme(@Nonnull ApplicationUser user, @Nonnull Long id)
user
- Application userid
- id of the priority scheme to delete. The default priority scheme can not be deleted.ServiceOutcome<FieldConfigScheme> createScheme(@Nonnull ApplicationUser user, @Nonnull PrioritySchemeService.PrioritySchemeData prioritySchemeData)
user
- Application userprioritySchemeData
- data of the priority scheme to create.ServiceOutcome
with newly created FieldConfigScheme
ServiceOutcome<FieldConfigScheme> getScheme(@Nonnull ApplicationUser user, @Nonnull Long id)
user
- Application userid
- id of the priority scheme to get.ServiceOutcome
with FieldConfigScheme
ServiceOutcome<Collection<FieldConfigScheme>> getSchemes(@Nonnull ApplicationUser user)
user
- Application userServiceOutcome
with collection of FieldConfigScheme
ServiceResult schemeDataValidate(ApplicationUser user, PrioritySchemeService.PrioritySchemeData prioritySchemeData)
PrioritySchemeService.PrioritySchemeData
can be used to create/edit priority scheme.user
- Application userprioritySchemeData
- ServiceOutcome<FieldConfigScheme> getSchemeForProject(@Nonnull ApplicationUser user, @Nonnull io.atlassian.fugue.Either<Long,String> projectKeyOrId)
user
- Application userprojectKeyOrId
- key or id of the project to get scheme for.ServiceOutcome
with FieldConfigScheme
associated with provided projectList<Project> filterProjectsNotPossibleToAssociate(List<Project> projects)
projects
- projects to be filteredboolean hasAnyNotPossibleToAssociateProject(Collection<Project> projects)
projects
- list of projectsCopyright © 2002-2023 Atlassian. All Rights Reserved.