com.atlassian.jira.issue.fields
Class AffectedVersionsSystemField

java.lang.Object
  extended by com.atlassian.jira.issue.fields.AbstractField
      extended by com.atlassian.jira.issue.fields.AbstractOrderableField
          extended by com.atlassian.jira.issue.fields.AbstractOrderableNavigableFieldImpl
              extended by com.atlassian.jira.issue.fields.AbstractVersionsSystemField
                  extended by com.atlassian.jira.issue.fields.AffectedVersionsSystemField
All Implemented Interfaces:
Field, HideableField, NavigableField, OrderableField, RequirableField, SearchableField, Comparable

public class AffectedVersionsSystemField
extends AbstractVersionsSystemField

Copyright (c) 2002-2004 All rights reserved.


Field Summary
 
Fields inherited from class com.atlassian.jira.issue.fields.AbstractVersionsSystemField
RELEASED_VERSION_ID, UNKNOWN_VERSION_ID, UNRELEASED_VERSION_ID
 
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
 
Fields inherited from interface com.atlassian.jira.issue.fields.OrderableField
MOVE_ISSUE_PARAM_KEY, NO_HEADER_PARAM_KEY, TEMPLATE_DIRECTORY_PATH
 
Constructor Summary
AffectedVersionsSystemField(com.atlassian.velocity.VelocityManager velocityManager, ApplicationProperties applicationProperties, VersionManager versionManager, PermissionManager permissionManager, JiraAuthenticationContext authenticationContext, RaisedInVersionStatisticsMapper raisedInVersionStatsMapper, VersionHelperBean versionHelperBean)
           
 
Method Summary
protected  void addFieldRequiredErrorMessage(Issue issue, ErrorCollection errorCollection, I18nHelper i18n)
           
protected  String getArchivedVersionsFieldSearchParam()
           
protected  String getArchivedVersionsFieldTitle()
           
 List getAssociatedSearchers()
          Returns a list of searchers associated with field
protected  String getChangeItemFieldName()
           
 String getColumnHeadingKey()
           
protected  Collection getCurrentVersions(Issue issue)
           
 Object getDefaultValue(Issue issue)
          The value that should be set on the issue if the field is not shown for some reason.
protected  String getIssueRelationName()
           
protected  String getModifiedWithoutPermissionErrorMessage(I18nHelper i18n)
           
 LuceneFieldSorter getSorter()
          A sorter to be used when sorting columns in a table.
protected  boolean getUnreleasedVersionsFirst()
           
 boolean isShown(Issue issue)
          Tests field specific way to determine if it should be shown or not
 void populateDefaults(Map fieldValuesHolder, Issue issue)
          Populate the fieldValueHolder with a value that should be shown by default when the issue has not been created yet
 void removeValue(MutableIssue issue)
          Removes the value for the given issue.
 void updateIssue(FieldLayoutItem fieldLayoutItem, MutableIssue issue, Map fieldValueHolder)
          Record the value on the issue (not saving it to the database, see updateValue)
 
Methods inherited from class com.atlassian.jira.issue.fields.AbstractVersionsSystemField
availableForBulkEdit, createValue, getColumnViewHtml, getCreateHtml, getCurrentVersionIds, getDefaultSortOrder, getEditHtml, getPossibleVersions, getRelevantParams, getValueFromParams, getVersionManager, getViewHtml, getViewHtml, hasValue, needsMove, populateForMove, populateFromIssue, populateParamsFromString, updateValue, validateParams
 
Methods inherited from class com.atlassian.jira.issue.fields.AbstractOrderableNavigableFieldImpl
getColumnCssClass, getHiddenFieldId, getSortComparatorSource, getVelocityParams, prettyPrintChangeHistory, prettyPrintChangeHistory
 
Methods inherited from class com.atlassian.jira.issue.fields.AbstractOrderableField
getApplicationProperties, getBulkEditHtml, getCreateHtml, getEditHtml, getPermissionManager, getVelocityParams, getVelocityParams, getViewHtml, hasBulkUpdatePermission, hasPermission, isHidden, populateFromParams, rendererTypesEqual, renderTemplate, valuesEqual
 
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.Field
getId, getName, getNameKey
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

AffectedVersionsSystemField

public AffectedVersionsSystemField(com.atlassian.velocity.VelocityManager velocityManager,
                                   ApplicationProperties applicationProperties,
                                   VersionManager versionManager,
                                   PermissionManager permissionManager,
                                   JiraAuthenticationContext authenticationContext,
                                   RaisedInVersionStatisticsMapper raisedInVersionStatsMapper,
                                   VersionHelperBean versionHelperBean)
Method Detail

isShown

public boolean isShown(Issue issue)
Description copied from interface: OrderableField
Tests field specific way to determine if it should be shown or not


getCurrentVersions

protected Collection getCurrentVersions(Issue issue)
Specified by:
getCurrentVersions in class AbstractVersionsSystemField

getArchivedVersionsFieldTitle

protected String getArchivedVersionsFieldTitle()
Specified by:
getArchivedVersionsFieldTitle in class AbstractVersionsSystemField

getArchivedVersionsFieldSearchParam

protected String getArchivedVersionsFieldSearchParam()
Specified by:
getArchivedVersionsFieldSearchParam in class AbstractVersionsSystemField

getUnreleasedVersionsFirst

protected boolean getUnreleasedVersionsFirst()
Specified by:
getUnreleasedVersionsFirst in class AbstractVersionsSystemField

addFieldRequiredErrorMessage

protected void addFieldRequiredErrorMessage(Issue issue,
                                            ErrorCollection errorCollection,
                                            I18nHelper i18n)
Specified by:
addFieldRequiredErrorMessage in class AbstractVersionsSystemField

getColumnHeadingKey

public String getColumnHeadingKey()

getSorter

public LuceneFieldSorter getSorter()
Description copied from interface: NavigableField
A sorter to be used when sorting columns in a table. This sort uses the Lucene Document Collection and is therefore a lot faster than sorting the issues in memory.

Returns:
A sorter that can be used to sort this field, or null depending on the value of NavigableField.getSortComparatorSource()
See Also:
DocumentIssueImpl, MappedSortComparator

getIssueRelationName

protected String getIssueRelationName()
Specified by:
getIssueRelationName in class AbstractVersionsSystemField

getChangeItemFieldName

protected String getChangeItemFieldName()
Specified by:
getChangeItemFieldName in class AbstractVersionsSystemField

getModifiedWithoutPermissionErrorMessage

protected String getModifiedWithoutPermissionErrorMessage(I18nHelper i18n)
Specified by:
getModifiedWithoutPermissionErrorMessage in class AbstractVersionsSystemField

populateDefaults

public void populateDefaults(Map fieldValuesHolder,
                             Issue issue)
Description copied from interface: OrderableField
Populate the fieldValueHolder with a value that should be shown by default when the issue has not been created yet

Specified by:
populateDefaults in interface OrderableField
Overrides:
populateDefaults in class AbstractVersionsSystemField

getDefaultValue

public Object getDefaultValue(Issue issue)
Description copied from interface: OrderableField
The value that should be set on the issue if the field is not shown for some reason. For example: The user does not have permission to see the field, or the field is not part of the create screen.

Specified by:
getDefaultValue in interface OrderableField
Overrides:
getDefaultValue in class AbstractVersionsSystemField

updateIssue

public void updateIssue(FieldLayoutItem fieldLayoutItem,
                        MutableIssue issue,
                        Map fieldValueHolder)
Description copied from interface: OrderableField
Record the value on the issue (not saving it to the database, see updateValue)


removeValue

public void removeValue(MutableIssue issue)
Description copied from interface: OrderableField
Removes the value for the given issue. Returns a list of change items for the removed value.


getAssociatedSearchers

public List getAssociatedSearchers()
Description copied from interface: SearchableField
Returns a list of searchers associated with field

Returns:
List of @Class objects of type @IssueSearcher. Empty list if no searchers are required. Must not be null


Copyright © 2002-2007 Atlassian. All Rights Reserved.