com.atlassian.greenhopper.service.timetracking
Class WorklogHistoryServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.service.timetracking.WorklogHistoryServiceImpl
All Implemented Interfaces:
GreenHopperCache, WorklogHistoryService

@Service(value="gh-worklogHistoryService")
public class WorklogHistoryServiceImpl
extends java.lang.Object
implements WorklogHistoryService, GreenHopperCache


Field Summary
static java.lang.Integer DEFAULT_CACHE_SIZE
           
 
Fields inherited from interface com.atlassian.greenhopper.service.timetracking.WorklogHistoryService
SERVICE
 
Constructor Summary
WorklogHistoryServiceImpl()
           
 
Method Summary
 java.lang.Long computeRemainingEstimateBeforeWorkStarted(com.atlassian.jira.issue.Issue issue, com.atlassian.crowd.embedded.api.User user, org.joda.time.Interval day)
           
 TimelineAnalysis computeTimetrackingAnalysis(java.util.List<com.atlassian.jira.issue.Issue> issues, com.atlassian.crowd.embedded.api.User user, org.joda.time.DateMidnight start, org.joda.time.DateMidnight end)
           
 WorklogTimeline computeTimetrackingHistory(java.util.List<com.atlassian.jira.issue.Issue> issues, com.atlassian.crowd.embedded.api.User user)
          Build the timeline for the given issues, using cached timeline segments if possible and refreshing them from the database if necessary.
 void flushCache()
          Invoked when all caches in the plugin need to be cleared.
 void flushCacheForIssue(com.atlassian.jira.issue.Issue issue)
          Removes the issue from the timeline cache.
 void init()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CACHE_SIZE

public static final java.lang.Integer DEFAULT_CACHE_SIZE
Constructor Detail

WorklogHistoryServiceImpl

public WorklogHistoryServiceImpl()
Method Detail

init

@PostConstruct
public void init()

computeTimetrackingHistory

public WorklogTimeline computeTimetrackingHistory(java.util.List<com.atlassian.jira.issue.Issue> issues,
                                                  com.atlassian.crowd.embedded.api.User user)
Build the timeline for the given issues, using cached timeline segments if possible and refreshing them from the database if necessary. Cache entries are kicked out when issues are updated.

Specified by:
computeTimetrackingHistory in interface WorklogHistoryService
Parameters:
issues - : The issues to be included
user - : The current user
Returns:
: Data structure with day-cumulative timetracking history

computeTimetrackingAnalysis

public TimelineAnalysis computeTimetrackingAnalysis(java.util.List<com.atlassian.jira.issue.Issue> issues,
                                                    com.atlassian.crowd.embedded.api.User user,
                                                    org.joda.time.DateMidnight start,
                                                    org.joda.time.DateMidnight end)
Specified by:
computeTimetrackingAnalysis in interface WorklogHistoryService

flushCacheForIssue

public void flushCacheForIssue(com.atlassian.jira.issue.Issue issue)
Description copied from interface: WorklogHistoryService
Removes the issue from the timeline cache.

Specified by:
flushCacheForIssue in interface WorklogHistoryService
Parameters:
issue - the issue

flushCache

public void flushCache()
Description copied from interface: GreenHopperCache
Invoked when all caches in the plugin need to be cleared.

Specified by:
flushCache in interface GreenHopperCache

computeRemainingEstimateBeforeWorkStarted

public java.lang.Long computeRemainingEstimateBeforeWorkStarted(com.atlassian.jira.issue.Issue issue,
                                                                com.atlassian.crowd.embedded.api.User user,
                                                                org.joda.time.Interval day)
Specified by:
computeRemainingEstimateBeforeWorkStarted in interface WorklogHistoryService


Copyright © 2007-2014 Atlassian. All Rights Reserved.