|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractMap<K,V> java.util.HashMap<java.lang.String,java.util.SortedMap<org.joda.time.DateMidnight,DayWorkHistory>> com.atlassian.greenhopper.model.timetracking.WorklogTimeline
public class WorklogTimeline
Stores the history of work done and remaining estimate, per issue.
Logged work and remaining estimate are different in concept, since logged work is an event at a particular point in time, whereas remaining
estimate is a value that spans time between events (before - after). Since the values stored are just points in time, remaining estimate totals
have to be calculated (see computeTotalRemainingEstimate()
)
The generic type is intentionally set to TreeMap
. First, this is necessary for the correct working of this class. Second, it allows us some
optimisations in navigating the Map.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Constructor Summary | |
---|---|
WorklogTimeline()
|
Method Summary | |
---|---|
long |
computeRemainingEstimate(java.lang.String issueKey,
org.joda.time.DateMidnight day)
Returns the remaining estimate valid for the given issue on the given day. |
long |
computeTimeSpentSince(org.joda.time.DateMidnight day)
Compute the cumulative time spent since the given day (inclusive) up to now. |
long |
computeTotalRemainingEstimate(org.joda.time.DateMidnight day)
Compute the remaining estimate at the end of the given day, for all issues.. |
DayWorkHistory |
getEntryAtDay(java.lang.String issueKey,
org.joda.time.DateMidnight day)
Return the DayWorkHistory entry at the given day for the given issue, or null if there is no such entry. |
boolean |
hasEntryAtDay(java.lang.String issueKey,
org.joda.time.DateMidnight day)
|
void |
putEntry(java.lang.String issueKey,
org.joda.time.DateMidnight day,
DayWorkHistory history)
Add an entry for the given Issue key on the given day. |
java.util.Map<org.joda.time.DateMidnight,java.util.List<DayWorkHistory>> |
transpose()
Transpose the map so that the days become the keys and the values are Lists of DayWorkHistory objects. |
Methods inherited from class java.util.HashMap |
---|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public WorklogTimeline()
Method Detail |
---|
public long computeTotalRemainingEstimate(org.joda.time.DateMidnight day)
day
- : the day to compute the estimate for, inclusive
public long computeRemainingEstimate(java.lang.String issueKey, org.joda.time.DateMidnight day)
issueKey
- : the key of the issue to look forday
- : the day to look at
public long computeTimeSpentSince(org.joda.time.DateMidnight day)
day
- : The day to start computing
public java.util.Map<org.joda.time.DateMidnight,java.util.List<DayWorkHistory>> transpose()
DayWorkHistory
objects. This is useful if log times need
to be calculated by day.
public boolean hasEntryAtDay(java.lang.String issueKey, org.joda.time.DateMidnight day)
public DayWorkHistory getEntryAtDay(java.lang.String issueKey, org.joda.time.DateMidnight day)
DayWorkHistory
entry at the given day for the given issue, or null if there is no such entry.
issueKey
- : The key of the issueday
- : The day to get the entry for
public void putEntry(java.lang.String issueKey, org.joda.time.DateMidnight day, DayWorkHistory history)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |