com.atlassian.jira.issue.fields
Class NavigableFieldImpl

java.lang.Object
  extended bycom.atlassian.jira.issue.fields.AbstractField
      extended bycom.atlassian.jira.issue.fields.NavigableFieldImpl
All Implemented Interfaces:
Comparable, Field, NavigableField
Direct Known Subclasses:
AbstractDurationSystemField, CreatedSystemField, IssueLinksSystemField, KeySystemField, StatusSystemField, SubTaskSystemField, ThumbnailSystemField, UpdatedSystemField, VotesSystemField, WorkRatioSystemField

public abstract class NavigableFieldImpl
extends AbstractField
implements NavigableField


Field Summary
protected  ApplicationProperties applicationProperties
           
protected  com.atlassian.velocity.VelocityManager velocityManager
           
 
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
NavigableFieldImpl(String id, String nameKey, String columnHeadingKey, String defaultSortOrder, Comparator comparator, com.atlassian.velocity.VelocityManager velocityManager, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext)
           
NavigableFieldImpl(String id, String nameKey, String columnHeadingKey, com.atlassian.velocity.VelocityManager velocityManager, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext)
           
 
Method Summary
protected  ApplicationProperties getApplicationProperties()
           
 String getColumnCssClass()
           
 String getColumnHeadingKey()
           
 String getDefaultSortOrder()
          The order in which to sort the field when it is sorted for the first time.
 String getHiddenFieldId()
          Returns the id of the field to check for visibility.
 org.apache.lucene.search.SortComparatorSource getSortComparatorSource()
          A default implementation that returns a MappedSortComparator from NavigableField.getSorter().
protected  Map getVelocityParams(FieldLayoutItem fieldLayoutItem, I18nHelper i18nHelper, Map displayParams, Issue issue)
           
 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.
protected  String renderTemplate(String template, Map velocityParams)
           
(package private)  void setComparator(Comparator c)
           
(package private)  void setDefaultSortOrder(String s)
           
(package private)  void setSortable(boolean b)
           
 
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
getColumnViewHtml, getSorter
 
Methods inherited from interface com.atlassian.jira.issue.fields.Field
getId, getName, getNameKey
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

velocityManager

protected final com.atlassian.velocity.VelocityManager velocityManager

applicationProperties

protected final ApplicationProperties applicationProperties
Constructor Detail

NavigableFieldImpl

public NavigableFieldImpl(String id,
                          String nameKey,
                          String columnHeadingKey,
                          com.atlassian.velocity.VelocityManager velocityManager,
                          ApplicationProperties applicationProperties,
                          JiraAuthenticationContext authenticationContext)

NavigableFieldImpl

public NavigableFieldImpl(String id,
                          String nameKey,
                          String columnHeadingKey,
                          String defaultSortOrder,
                          Comparator comparator,
                          com.atlassian.velocity.VelocityManager velocityManager,
                          ApplicationProperties applicationProperties,
                          JiraAuthenticationContext authenticationContext)
Method Detail

getColumnHeadingKey

public String getColumnHeadingKey()
Specified by:
getColumnHeadingKey in interface NavigableField

getColumnCssClass

public String getColumnCssClass()
Specified by:
getColumnCssClass in interface NavigableField

setSortable

void setSortable(boolean b)

getDefaultSortOrder

public String getDefaultSortOrder()
Description copied from interface: NavigableField
The order in which to sort the field when it is sorted for the first time.

Specified by:
getDefaultSortOrder in interface NavigableField
Returns:
Either NavigableField.ORDER_ASCENDING or NavigableField.ORDER_DESCENDING

setDefaultSortOrder

void setDefaultSortOrder(String s)

setComparator

void setComparator(Comparator c)

getSortComparatorSource

public org.apache.lucene.search.SortComparatorSource getSortComparatorSource()
A default implementation that returns a MappedSortComparator from NavigableField.getSorter().

Specified by:
getSortComparatorSource in interface NavigableField
Returns:
A SortComparatorSource that can be used to sort, or null if this field does not support sorting

renderTemplate

protected String renderTemplate(String template,
                                Map velocityParams)

getVelocityParams

protected Map getVelocityParams(FieldLayoutItem fieldLayoutItem,
                                I18nHelper i18nHelper,
                                Map displayParams,
                                Issue issue)

getHiddenFieldId

public String getHiddenFieldId()
Description copied from interface: NavigableField
Returns the id of the field to check for visibility. For example, with original estimate field need to ensure that the timetracking field is not hidden. With most fields, this is the same as their id.

Specified by:
getHiddenFieldId in interface NavigableField

getApplicationProperties

protected ApplicationProperties getApplicationProperties()

prettyPrintChangeHistory

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

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
Parameters:
changeHistory -
Returns:
String change history formatted according to locale in i18nHelper


Copyright © 2002-2007 Atlassian. All Rights Reserved.