com.atlassian.jira.issue.history
Class AbstractDateRangeBuilder
java.lang.Object
com.atlassian.jira.issue.history.AbstractDateRangeBuilder
- All Implemented Interfaces:
- DateRangeBuilder
- Direct Known Subclasses:
- AssigneeDateRangeBuilder, PriorityDateRangeBuilder, ReporterDateRangeBuilder, ResolutionDateRangeBuilder, StatusDateRangeBuilder, VersionDateRangeBuilder
public abstract class AbstractDateRangeBuilder
- extends Object
- implements DateRangeBuilder
Abstract implementation of DateRangeBuilder - gprovides a buildDateRanges that will work for all single value system fields.
- Since:
- v4.4
Field Summary |
protected static Long |
MINUS_1
Convenient constant for date range builders to use as the initial value
provided to ChangeHistoryItem.Builder#withId(Long) and
ChangeHistoryItem.Builder#inChangeGroup(Long) , since the
long (non-object) argument forms have been deprecated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MINUS_1
protected static final Long MINUS_1
- Convenient constant for date range builders to use as the initial value
provided to
ChangeHistoryItem.Builder#withId(Long)
and
ChangeHistoryItem.Builder#inChangeGroup(Long)
, since the
long
(non-object) argument forms have been deprecated.
- Since:
- 6.0
AbstractDateRangeBuilder
public AbstractDateRangeBuilder(String field,
String emptyValue)
buildDateRanges
public List<ChangeHistoryItem> buildDateRanges(Issue issue,
List<ChangeHistoryItem> items)
- Specified by:
buildDateRanges
in interface DateRangeBuilder
- Parameters:
issue
- The issue that is being currently indexeditems
- A Collection of all the @link ChangeHistoryItem)s for that issue.
- Returns:
- A list of items with date ranges
This method then iterates the list and creates the date ranges - it also ensures there is always an
'initial' change state.
createChangeItem
protected ChangeHistoryItem createChangeItem(ChangeHistoryItem changeItem,
Timestamp nextChange)
changeItemBuilder
protected ChangeHistoryItem.Builder changeItemBuilder(Issue issue)
createInitialChangeItem
protected abstract ChangeHistoryItem createInitialChangeItem(Issue issue)
getField
protected String getField()
getEmptyValue
public String getEmptyValue()
- Specified by:
getEmptyValue
in interface DateRangeBuilder
Copyright © 2002-2014 Atlassian. All Rights Reserved.