Class EpicServiceImpl
java.lang.Object
com.atlassian.greenhopper.service.issuelink.EpicServiceImpl
- All Implemented Interfaces:
EpicService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddIssuesToEpic
(IssueLinkRequest request) Associate issues with the specific epic.addIssuesToEpic
(com.atlassian.jira.user.ApplicationUser user, Epic epic, Set<com.atlassian.jira.issue.Issue> issues) Associate issues with the specific epic.addIssuesToEpic
(com.atlassian.jira.user.ApplicationUser user, com.atlassian.jira.issue.Issue epic, Set<com.atlassian.jira.issue.Issue> issues) Associate issues with the specific epic.Get an epic given its id.Get an epic given its key.getEpics
(com.atlassian.jira.user.ApplicationUser user, RapidView rapidView, PageRequest pageRequest, EpicQuery epicQuery) Returns epics which are on rapidView.boolean
isEpic
(com.atlassian.jira.issue.Issue issue) Checks if the given issue is an epic.removeEpicFromIssues
(IssueUnlinkRequest request) Disassociates the issues from the epic(s) they are associated with.removeEpicFromIssues
(com.atlassian.jira.user.ApplicationUser user, Set<com.atlassian.jira.issue.Issue> issues) Disassociates the issues from the epic(s) they are associated with.updateEpic
(com.atlassian.jira.user.ApplicationUser user, Epic epic) Save aEpic
entity's state to the database.
-
Constructor Details
-
EpicServiceImpl
public EpicServiceImpl()
-
-
Method Details
-
addIssuesToEpic
@Nonnull public ServiceResult addIssuesToEpic(@Nullable com.atlassian.jira.user.ApplicationUser user, com.atlassian.jira.issue.Issue epic, Set<com.atlassian.jira.issue.Issue> issues) Description copied from interface:EpicService
Associate issues with the specific epic.- Specified by:
addIssuesToEpic
in interfaceEpicService
- Parameters:
user
- the user who is performing operation and whose permissions are checked. Null means anonymous access.epic
- the epicissues
- the issues- Returns:
- a service result which is either valid or contains error messages.
-
addIssuesToEpic
@Nonnull public ServiceResult addIssuesToEpic(@Nullable com.atlassian.jira.user.ApplicationUser user, Epic epic, Set<com.atlassian.jira.issue.Issue> issues) Description copied from interface:EpicService
Associate issues with the specific epic.- Specified by:
addIssuesToEpic
in interfaceEpicService
- Parameters:
user
- the user who is performing operation and whose permissions are checked. Null means anonymous access.epic
- the epicissues
- the issues- Returns:
- a service result which is either valid or contains error messages.
-
addIssuesToEpic
Description copied from interface:EpicService
Associate issues with the specific epic.- Specified by:
addIssuesToEpic
in interfaceEpicService
- Parameters:
request
- request details- Returns:
- a service result which is either valid or contains error messages.
-
removeEpicFromIssues
@Nonnull public ServiceResult removeEpicFromIssues(@Nullable com.atlassian.jira.user.ApplicationUser user, Set<com.atlassian.jira.issue.Issue> issues) Description copied from interface:EpicService
Disassociates the issues from the epic(s) they are associated with.- Specified by:
removeEpicFromIssues
in interfaceEpicService
- Parameters:
user
- the user who is performing operation and whose permissions are checked. Null means anonymous access.issues
- the issues- Returns:
- a service result which is either valid or contains error messages.
-
removeEpicFromIssues
Description copied from interface:EpicService
Disassociates the issues from the epic(s) they are associated with.- Specified by:
removeEpicFromIssues
in interfaceEpicService
- Parameters:
request
- request details- Returns:
- a service result which is either valid or contains error messages.
-
getEpics
@Nonnull public ServiceOutcome<Page<Epic>> getEpics(@Nullable com.atlassian.jira.user.ApplicationUser user, RapidView rapidView, PageRequest pageRequest, EpicQuery epicQuery) Description copied from interface:EpicService
Returns epics which are on rapidView.- Specified by:
getEpics
in interfaceEpicService
- Parameters:
user
- the user who is performing operation and whose permissions are checked. Null means anonymous access.rapidView
- the rapidView which contains epics.pageRequest
- information about the desired number of results and theirs offset.epicQuery
- query which limits the result only to these epics which fulfil its constraints.- Returns:
- a page with founded epics or errors if operation failed.
-
getEpic
@Nonnull public ServiceOutcome<Epic> getEpic(@Nullable com.atlassian.jira.user.ApplicationUser user, @Nonnull Long epicId) Description copied from interface:EpicService
Get an epic given its id.- Specified by:
getEpic
in interfaceEpicService
- Parameters:
user
- the user who is performing operation and whose permissions are checked. Null means anonymous access.epicId
- the id of the requested epic.- Returns:
- a requested epic or an error if operation failed.
-
getEpic
@Nonnull public ServiceOutcome<Epic> getEpic(@Nullable com.atlassian.jira.user.ApplicationUser user, @Nonnull String epicKey) Description copied from interface:EpicService
Get an epic given its key.- Specified by:
getEpic
in interfaceEpicService
- Parameters:
user
- the user who is performing operation and whose permissions are checked. Null means anonymous access.epicKey
- the key of the requested epic.- Returns:
- a requested epic or an error if operation failed.
-
isEpic
public boolean isEpic(@Nonnull com.atlassian.jira.issue.Issue issue) Description copied from interface:EpicService
Checks if the given issue is an epic.- Specified by:
isEpic
in interfaceEpicService
- Parameters:
issue
- the issue to check.- Returns:
- a boolean indicating if the given issue is an epic.
-
updateEpic
Description copied from interface:EpicService
Save aEpic
entity's state to the database.- Specified by:
updateEpic
in interfaceEpicService
- Parameters:
user
- the user who is performing the operation and whose permissions are checked. Null means anonymous access.epic
- the epic which will be updated. Which epic will be updated is determined by its id and key (both must be set). Invalid outcome is returned if epic was not found or key doesn't matched to the found epic.- Returns:
- the updated epic or an error if operation failed.
-