com.atlassian.greenhopper.service.sprint
Class SprintIssueServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.service.sprint.SprintIssueServiceImpl
All Implemented Interfaces:
SprintIssueService

@Service
public class SprintIssueServiceImpl
extends java.lang.Object
implements SprintIssueService

Manipulates sprint information stored against issues.

Since:
v5.8.5
Author:
mtokar

Constructor Summary
SprintIssueServiceImpl()
           
 
Method Summary
 ServiceOutcome<java.lang.Void> addIssuesToSprint(com.atlassian.crowd.embedded.api.User user, Sprint sprint, java.util.Collection<com.atlassian.jira.issue.Issue> issues)
          Updates the Default Sprint field on the specified issues to have the value of the specified Sprint.
 ServiceOutcome<com.atlassian.fugue.Option<Sprint>> getActiveOrFutureSprintForIssue(com.atlassian.crowd.embedded.api.User user, com.atlassian.jira.issue.Issue issue)
          Returns any future or active sprint for an issue
 ServiceOutcome<com.atlassian.fugue.Option<Sprint>> getActiveSprintForIssue(com.atlassian.crowd.embedded.api.User user, com.atlassian.jira.issue.Issue issue)
          Returns any future sprints for an issue
 ServiceOutcome<com.atlassian.fugue.Option<Sprint>> getFutureSprintForIssue(com.atlassian.crowd.embedded.api.User user, com.atlassian.jira.issue.Issue issue)
          Returns any future sprint for an issue
 ServiceOutcome<java.util.List<com.atlassian.jira.issue.Issue>> getIssuesForSprint(com.atlassian.crowd.embedded.api.User user, Sprint sprint)
          Gets the issues assigned to a given sprint Note: This returns the issues in the given sprint RIGHT NOW! if you want issues which _have_ been in the sprint at some point, look at SprintHistoryService
 ServiceOutcome<java.util.Collection<Sprint>> getSprintsForIssue(com.atlassian.crowd.embedded.api.User user, com.atlassian.jira.issue.Issue issue)
          Returns all sprints an issue is currently assigned to.
 ServiceOutcome<java.util.List<com.atlassian.jira.issue.Issue>> removeAllIssuesFromSprint(com.atlassian.crowd.embedded.api.User user, Sprint sprint)
          Removes all issues currently assigned to given sprint.
 ServiceOutcome<java.lang.Void> removeIssuesFromSprint(com.atlassian.crowd.embedded.api.User user, Sprint sprint, java.util.Collection<com.atlassian.jira.issue.Issue> issues)
          removes the specified issues from a given sprint
 ServiceOutcome<java.lang.Void> updateFutureActiveSprintOrBacklog(com.atlassian.crowd.embedded.api.User user, Sprint sprint, java.util.Collection<com.atlassian.jira.issue.Issue> issues)
          Updates the Default Sprint field on the specified issues to have the value of the specified Sprint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SprintIssueServiceImpl

public SprintIssueServiceImpl()
Method Detail

getIssuesForSprint

@NotNull
public ServiceOutcome<java.util.List<com.atlassian.jira.issue.Issue>> getIssuesForSprint(com.atlassian.crowd.embedded.api.User user,
                                                                                                 Sprint sprint)
Description copied from interface: SprintIssueService
Gets the issues assigned to a given sprint Note: This returns the issues in the given sprint RIGHT NOW! if you want issues which _have_ been in the sprint at some point, look at SprintHistoryService

Specified by:
getIssuesForSprint in interface SprintIssueService
Parameters:
user - the user performing the query
sprint - the sprint to query
Returns:
an outcome which contains the issues for this sprint

updateFutureActiveSprintOrBacklog

@NotNull
public ServiceOutcome<java.lang.Void> updateFutureActiveSprintOrBacklog(com.atlassian.crowd.embedded.api.User user,
                                                                                Sprint sprint,
                                                                                java.util.Collection<com.atlassian.jira.issue.Issue> issues)
Description copied from interface: SprintIssueService
Updates the Default Sprint field on the specified issues to have the value of the specified Sprint.

Validation of the issue update is performed against all issues before attempting an update.

Note: if validation passes but the update operation does not, it is possible that some issues will have already been updated even though errors have been returned.

Specified by:
updateFutureActiveSprintOrBacklog in interface SprintIssueService
Parameters:
user - the user performing the sprint assignment
sprint - the sprint to assign issues to, null will remove issues from currently assigned active sprints
issues - the issues to put into the sprint
Returns:
an outcome which contains the errors which occurred (if any)

addIssuesToSprint

@NotNull
public ServiceOutcome<java.lang.Void> addIssuesToSprint(com.atlassian.crowd.embedded.api.User user,
                                                                Sprint sprint,
                                                                java.util.Collection<com.atlassian.jira.issue.Issue> issues)
Description copied from interface: SprintIssueService
Updates the Default Sprint field on the specified issues to have the value of the specified Sprint.

Validation of the issue update is performed against all issues before attempting an update.

Note: if validation passes but the update operation does not, it is possible that some issues will have already been updated even though errors have been returned.

Specified by:
addIssuesToSprint in interface SprintIssueService
Parameters:
user - the user performing the sprint assignment
sprint - the sprint to assign issues to
issues - the issues to put into the sprint
Returns:
an outcome which contains the errors which occurred (if any)

removeIssuesFromSprint

@NotNull
public ServiceOutcome<java.lang.Void> removeIssuesFromSprint(com.atlassian.crowd.embedded.api.User user,
                                                                     Sprint sprint,
                                                                     java.util.Collection<com.atlassian.jira.issue.Issue> issues)
Description copied from interface: SprintIssueService
removes the specified issues from a given sprint

Specified by:
removeIssuesFromSprint in interface SprintIssueService
Parameters:
user - the user performing the sprint operation
sprint - the sprint to remove issues from
issues - the issues to remove from the sprint
Returns:
an outcome containing any errors which occured

removeAllIssuesFromSprint

public ServiceOutcome<java.util.List<com.atlassian.jira.issue.Issue>> removeAllIssuesFromSprint(com.atlassian.crowd.embedded.api.User user,
                                                                                                Sprint sprint)
Description copied from interface: SprintIssueService
Removes all issues currently assigned to given sprint. Used before deleting a sprint

Specified by:
removeAllIssuesFromSprint in interface SprintIssueService

getSprintsForIssue

@NotNull
public ServiceOutcome<java.util.Collection<Sprint>> getSprintsForIssue(com.atlassian.crowd.embedded.api.User user,
                                                                               com.atlassian.jira.issue.Issue issue)
Description copied from interface: SprintIssueService
Returns all sprints an issue is currently assigned to. Basically the Sprint objects stored in the Sprint custom field

Specified by:
getSprintsForIssue in interface SprintIssueService

getActiveSprintForIssue

public ServiceOutcome<com.atlassian.fugue.Option<Sprint>> getActiveSprintForIssue(com.atlassian.crowd.embedded.api.User user,
                                                                                  com.atlassian.jira.issue.Issue issue)
Description copied from interface: SprintIssueService
Returns any future sprints for an issue

Specified by:
getActiveSprintForIssue in interface SprintIssueService

getFutureSprintForIssue

public ServiceOutcome<com.atlassian.fugue.Option<Sprint>> getFutureSprintForIssue(com.atlassian.crowd.embedded.api.User user,
                                                                                  com.atlassian.jira.issue.Issue issue)
Description copied from interface: SprintIssueService
Returns any future sprint for an issue

Specified by:
getFutureSprintForIssue in interface SprintIssueService

getActiveOrFutureSprintForIssue

public ServiceOutcome<com.atlassian.fugue.Option<Sprint>> getActiveOrFutureSprintForIssue(com.atlassian.crowd.embedded.api.User user,
                                                                                          com.atlassian.jira.issue.Issue issue)
Description copied from interface: SprintIssueService
Returns any future or active sprint for an issue

Specified by:
getActiveOrFutureSprintForIssue in interface SprintIssueService


Copyright © 2007-2014 Atlassian. All Rights Reserved.