com.atlassian.greenhopper.service.timetracking
Class TimeTrackingServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.service.timetracking.TimeTrackingServiceImpl
All Implemented Interfaces:
TimeTrackingService

@Service
public class TimeTrackingServiceImpl
extends java.lang.Object
implements TimeTrackingService


Constructor Summary
TimeTrackingServiceImpl()
           
 
Method Summary
 com.atlassian.jira.issue.util.AggregateTimeTrackingBean getAggregates(com.atlassian.jira.issue.Issue issue, java.util.Collection<com.atlassian.jira.issue.Issue> subTasks)
          Copied from IssueImplAggregateTimeTrackingCalculator.getAggregates(com.atlassian.jira.issue.Issue).
 ServiceOutcome<java.lang.Void> updateOriginalEstimate(com.atlassian.jira.issue.Issue issue, java.lang.String duration)
          Updates the original estimate of an issue.
 ServiceOutcome<java.lang.Void> updateOriginalEstimate(com.atlassian.jira.issue.Issue issue, java.lang.String duration, boolean updateRemainingEstimateIfNotSet)
          Updates the original estimate of an issue.
 ServiceOutcome<java.lang.Void> updateRemainingEstimate(com.atlassian.jira.issue.Issue issue, java.lang.String duration)
          Updates the remaining estimate of an issue.
 ServiceOutcome<java.lang.Void> updateRemainingEstimate(com.atlassian.jira.issue.Issue issue, java.lang.String duration, boolean updateOriginalEstimateIfNotSet)
          Updates the remaining estimate of an issue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeTrackingServiceImpl

public TimeTrackingServiceImpl()
Method Detail

updateRemainingEstimate

@NotNull
public ServiceOutcome<java.lang.Void> updateRemainingEstimate(com.atlassian.jira.issue.Issue issue,
                                                                      java.lang.String duration)
Description copied from interface: TimeTrackingService
Updates the remaining estimate of an issue. This will fire the Issue Updated event as well as send out an email due to the update.

Specified by:
updateRemainingEstimate in interface TimeTrackingService
Parameters:
issue - the issue to update
duration - the duration to set
Returns:
the outcome; potentially with errors

updateRemainingEstimate

public ServiceOutcome<java.lang.Void> updateRemainingEstimate(com.atlassian.jira.issue.Issue issue,
                                                              java.lang.String duration,
                                                              boolean updateOriginalEstimateIfNotSet)
Description copied from interface: TimeTrackingService
Updates the remaining estimate of an issue. This will fire the Issue Updated event as well as send out an email due to the update.

Optionally, this can also update the original estimate of the issue to be the same duration, if no value has yet been set on it.

Specified by:
updateRemainingEstimate in interface TimeTrackingService
Parameters:
issue - the issue to update
duration - the duration to set
updateOriginalEstimateIfNotSet - whether or not to update the original estimate as well if its not set (to emulate JIRA's behaviour)
Returns:
the outcome; potentially with errors

updateOriginalEstimate

@NotNull
public ServiceOutcome<java.lang.Void> updateOriginalEstimate(com.atlassian.jira.issue.Issue issue,
                                                                     java.lang.String duration)
Description copied from interface: TimeTrackingService
Updates the original estimate of an issue. This will fire the Issue Updated event as well as send out an email due to the update.

Specified by:
updateOriginalEstimate in interface TimeTrackingService
Parameters:
issue - the issue to update
duration - the duration to set
Returns:
the outcome; potentially with errors

updateOriginalEstimate

public ServiceOutcome<java.lang.Void> updateOriginalEstimate(com.atlassian.jira.issue.Issue issue,
                                                             java.lang.String duration,
                                                             boolean updateRemainingEstimateIfNotSet)
Description copied from interface: TimeTrackingService
Updates the original estimate of an issue. This will fire the Issue Updated event as well as send out an email due to the update.

Optionally, this can also update the remaining estimate of the issue to be the same duration, if no value has yet been set on it.

Specified by:
updateOriginalEstimate in interface TimeTrackingService
Parameters:
issue - the issue to update
duration - the duration to set
updateRemainingEstimateIfNotSet - whether or not to update the remaining estimate as well if it is not set (to emulate JIRA's behaviour)
Returns:
the outcome; potentially with errors

getAggregates

public com.atlassian.jira.issue.util.AggregateTimeTrackingBean getAggregates(com.atlassian.jira.issue.Issue issue,
                                                                             java.util.Collection<com.atlassian.jira.issue.Issue> subTasks)
Copied from IssueImplAggregateTimeTrackingCalculator.getAggregates(com.atlassian.jira.issue.Issue).

Creates and returns a bean that contains all aggregate time tracking information for given issue(not a sub-task). This information is gathered from all issue's sub-tasks that a user in this context has permission to see.

Specified by:
getAggregates in interface TimeTrackingService
Parameters:
issue - issue to calculate aggregates for.
Returns:
The bean containing all aggregate values.


Copyright © 2007-2014 Atlassian. All Rights Reserved.