com.atlassian.jira.issue.history
Class AbstractDateRangeBuilder

java.lang.Object
  extended by 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

Constructor Summary
AbstractDateRangeBuilder(String field, String emptyValue)
           
 
Method Summary
 List<ChangeHistoryItem> buildDateRanges(Issue issue, List<ChangeHistoryItem> items)
           
protected  ChangeHistoryItem createChangeItem(ChangeHistoryItem changeItem, Timestamp nextChange)
           
protected abstract  ChangeHistoryItem createInitialChangeItem(Issue issue)
           
 String getEmptyValue()
           
protected  String getField()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDateRangeBuilder

public AbstractDateRangeBuilder(String field,
                                String emptyValue)
Method Detail

buildDateRanges

public List<ChangeHistoryItem> buildDateRanges(Issue issue,
                                               List<ChangeHistoryItem> items)
Specified by:
buildDateRanges in interface DateRangeBuilder
Parameters:
issue - The issue that is being currently indexed
items - 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)

createInitialChangeItem

protected abstract ChangeHistoryItem createInitialChangeItem(Issue issue)

getField

protected String getField()

getEmptyValue

public String getEmptyValue()
Specified by:
getEmptyValue in interface DateRangeBuilder


Copyright © 2002-2012 Atlassian. All Rights Reserved.