com.atlassian.jira.issue.fields
Class AbstractDurationSystemField

java.lang.Object
  extended by com.atlassian.jira.issue.fields.AbstractField
      extended by com.atlassian.jira.issue.fields.NavigableFieldImpl
          extended by com.atlassian.jira.issue.fields.AbstractDurationSystemField
All Implemented Interfaces:
Field, NavigableField, RestAwareField, Comparable
Direct Known Subclasses:
AbstractAggregateDurationSystemField, OriginalEstimateSystemField, TimeEstimateSystemField, TimeSpentSystemField

public abstract class AbstractDurationSystemField
extends NavigableFieldImpl
implements RestAwareField


Field Summary
 
Fields inherited from class com.atlassian.jira.issue.fields.NavigableFieldImpl
applicationProperties, templatingEngine
 
Fields inherited from class com.atlassian.jira.issue.fields.AbstractField
authenticationContext
 
Fields inherited from interface com.atlassian.jira.issue.fields.NavigableField
ORDER_ASCENDING, ORDER_DESCENDING, TEMPLATE_DIRECTORY_PATH
 
Constructor Summary
AbstractDurationSystemField(String id, String nameKey, String columnHeadingKey, String defaultSortOrder, Comparator comparator, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext)
           
 
Method Summary
 String getColumnViewHtml(FieldLayoutItem fieldLayoutItem, Map displayParams, Issue issue)
           
protected abstract  Long getDuration(Issue issue)
           
 FieldTypeInfo getFieldTypeInfo(FieldTypeInfoContext fieldTypeInfoContext)
          Returns lower level Information about the field.
 FieldJsonRepresentation getJsonFromIssue(Issue issue, boolean renderedVersionRequested, FieldLayoutItem fieldLayoutItem)
          Return a FieldJsonDataPair containing a json representation of the raw data for this field, and if required, a json representation of the rendered data for easy display.
 JsonType getJsonSchema()
          Return a description of the shape of this field when represented as JSON.
 String prettyPrintChangeHistory(String changeHistory)
           
 String prettyPrintChangeHistory(String changeHistory, I18nHelper i18nHelper)
          Used for email notification templates - allows changelog to be displayed in language of the recipient.
 
Methods inherited from class com.atlassian.jira.issue.fields.NavigableFieldImpl
getApplicationProperties, getColumnCssClass, getColumnHeadingKey, getDefaultSortOrder, getHiddenFieldId, getSortComparatorSource, getSortFields, getVelocityParams, renderTemplate
 
Methods inherited from class com.atlassian.jira.issue.fields.AbstractField
compareTo, equals, getAuthenticationContext, getId, getName, getNameKey, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.issue.fields.NavigableField
getSorter
 
Methods inherited from interface com.atlassian.jira.issue.fields.Field
getId, getName, getNameKey
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

AbstractDurationSystemField

public AbstractDurationSystemField(String id,
                                   String nameKey,
                                   String columnHeadingKey,
                                   String defaultSortOrder,
                                   Comparator comparator,
                                   VelocityTemplatingEngine templatingEngine,
                                   ApplicationProperties applicationProperties,
                                   JiraAuthenticationContext authenticationContext)
Method Detail

getColumnViewHtml

public String getColumnViewHtml(FieldLayoutItem fieldLayoutItem,
                                Map displayParams,
                                Issue issue)
Specified by:
getColumnViewHtml in interface NavigableField

getDuration

protected abstract Long getDuration(Issue issue)

prettyPrintChangeHistory

public String prettyPrintChangeHistory(String changeHistory)
Specified by:
prettyPrintChangeHistory in interface NavigableField
Overrides:
prettyPrintChangeHistory in class NavigableFieldImpl

prettyPrintChangeHistory

public String prettyPrintChangeHistory(String changeHistory,
                                       I18nHelper i18nHelper)
Description copied from interface: NavigableField
Used for email notification templates - allows changelog to be displayed in language of the recipient.

Specified by:
prettyPrintChangeHistory in interface NavigableField
Overrides:
prettyPrintChangeHistory in class NavigableFieldImpl
Returns:
String change history formatted according to locale in i18nHelper

getFieldTypeInfo

public FieldTypeInfo getFieldTypeInfo(FieldTypeInfoContext fieldTypeInfoContext)
Description copied from interface: RestAwareField
Returns lower level Information about the field. This information contains allowed values and/or the autocomplete url

Specified by:
getFieldTypeInfo in interface RestAwareField
Parameters:
fieldTypeInfoContext - the FieldTypeInfoContext contains context information that is relevant to generate the FieldTypeInfo

getJsonSchema

public JsonType getJsonSchema()
Description copied from interface: RestAwareField
Return a description of the shape of this field when represented as JSON.

Specified by:
getJsonSchema in interface RestAwareField

getJsonFromIssue

public FieldJsonRepresentation getJsonFromIssue(Issue issue,
                                                boolean renderedVersionRequested,
                                                @Nullable
                                                FieldLayoutItem fieldLayoutItem)
Description copied from interface: RestAwareField
Return a FieldJsonDataPair containing a json representation of the raw data for this field, and if required, a json representation of the rendered data for easy display.

Specified by:
getJsonFromIssue in interface RestAwareField
Parameters:
issue - to get field data from
renderedVersionRequested - whether the use requested the return of rendered/pretty data as well as raw data
fieldLayoutItem - field layout for this field. Will only be supplied if the field is also an ordereable field.
Returns:
FieldJsonDataPair containing a json representation of the raw data for this field, and if required, a json representation of the rendered data for easy display.


Copyright © 2002-2012 Atlassian. All Rights Reserved.