com.atlassian.jira.issue.fields
Class FixVersionsSystemField

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.FixVersionsSystemField
All Implemented Interfaces:
Field, HideableField, NavigableField, OrderableField, RequirableField, SearchableField, java.lang.Comparable

public class FixVersionsSystemField
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
FixVersionsSystemField(com.atlassian.velocity.VelocityManager velocityManager, ApplicationProperties applicationProperties, VersionManager versionManager, PermissionManager permissionManager, JiraAuthenticationContext authenticationContext, FixForVersionStatisticsMapper fixForVersionStatisticsMapper, VersionHelperBean versionHelperBean, FixForVersionSearchHandlerFactory searchHandlerFactory)
           
 
Method Summary
protected  void addFieldRequiredErrorMessage(Issue issue, ErrorCollection errorCollection, I18nHelper i18n)
           
protected  java.util.Map addViewVelocityParams()
           
 boolean canRemoveValueFromIssueObject(Issue issue)
          Returns true if a call to OrderableField.removeValueFromIssueObject(com.atlassian.jira.issue.MutableIssue) will actually remove the value.
protected  java.lang.String getArchivedVersionsFieldSearchParam()
           
protected  java.lang.String getArchivedVersionsFieldTitle()
           
protected  java.lang.String getChangeItemFieldName()
           
 java.lang.String getColumnHeadingKey()
           
protected  java.util.Collection getCurrentVersions(Issue issue)
           
protected  java.lang.String getIssueRelationName()
           
protected  java.lang.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 removeValueFromIssueObject(MutableIssue issue)
          Removes the field value from the given MutableIssue object.
 void updateIssue(FieldLayoutItem fieldLayoutItem, MutableIssue issue, java.util.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, getBulkEditHtml, getColumnViewHtml, getCreateHtml, getCurrentVersionIds, getDefaultSortOrder, getDefaultValue, getEditHtml, getPossibleVersions, getRelevantParams, getValueFromParams, getVersionManager, getViewHtml, getViewHtml, hasValue, needsMove, populateDefaults, 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
createAssociatedSearchHandler, getApplicationProperties, 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

FixVersionsSystemField

public FixVersionsSystemField(com.atlassian.velocity.VelocityManager velocityManager,
                              ApplicationProperties applicationProperties,
                              VersionManager versionManager,
                              PermissionManager permissionManager,
                              JiraAuthenticationContext authenticationContext,
                              FixForVersionStatisticsMapper fixForVersionStatisticsMapper,
                              VersionHelperBean versionHelperBean,
                              FixForVersionSearchHandlerFactory searchHandlerFactory)
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.

Parameters:
issue - The Issue.
Returns:
true if it should be shown.

getCurrentVersions

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

getArchivedVersionsFieldTitle

protected java.lang.String getArchivedVersionsFieldTitle()
Specified by:
getArchivedVersionsFieldTitle in class AbstractVersionsSystemField

getArchivedVersionsFieldSearchParam

protected java.lang.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

getModifiedWithoutPermissionErrorMessage

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

updateIssue

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

Parameters:
fieldLayoutItem - FieldLayoutItem
issue - MutableIssue
fieldValueHolder - Field Value Holder Map
See Also:
OrderableField.updateValue(com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem, com.atlassian.jira.issue.Issue, com.atlassian.jira.issue.ModifiedValue, com.atlassian.jira.issue.util.IssueChangeHolder)

removeValueFromIssueObject

public void removeValueFromIssueObject(MutableIssue issue)
Description copied from interface: OrderableField
Removes the field value from the given MutableIssue object.

Note that this operation does not actually persist the change, it just clears the value from the given Issue object. The caller will still need to call #updateValue() in order to persist the change.

Some Fields may choose to quietly ignore this request. eg The SecurityLevel Field will not remove Security Level from subtasks because the subtask must always take the Security Level of its parent issue.

Parameters:
issue - The issue object to be effected.
See Also:
OrderableField.canRemoveValueFromIssueObject(com.atlassian.jira.issue.Issue), OrderableField.updateValue(com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem, com.atlassian.jira.issue.Issue, com.atlassian.jira.issue.ModifiedValue, com.atlassian.jira.issue.util.IssueChangeHolder)

canRemoveValueFromIssueObject

public boolean canRemoveValueFromIssueObject(Issue issue)
Description copied from interface: OrderableField
Returns true if a call to OrderableField.removeValueFromIssueObject(com.atlassian.jira.issue.MutableIssue) will actually remove the value.

There a few different reasons why this method may return false:

In general it is safe to call removeValueFromIssueObject() even if this method returns false, as the request will be silently ignored. However there are a couple of special fields where calling removeValueFromIssueObject() will throw an UnsupportedOperationException - eg if you try to remove the Project.

Parameters:
issue - The Issue object.
Returns:
true if a call to OrderableField.removeValueFromIssueObject(com.atlassian.jira.issue.MutableIssue) will actually remove the value.
See Also:
OrderableField.removeValueFromIssueObject(com.atlassian.jira.issue.MutableIssue)

getIssueRelationName

protected java.lang.String getIssueRelationName()
Specified by:
getIssueRelationName in class AbstractVersionsSystemField

getChangeItemFieldName

protected java.lang.String getChangeItemFieldName()
Specified by:
getChangeItemFieldName in class AbstractVersionsSystemField

getColumnHeadingKey

public java.lang.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

addViewVelocityParams

protected java.util.Map addViewVelocityParams()
Overrides:
addViewVelocityParams in class AbstractVersionsSystemField


Copyright © 2002-2010 Atlassian. All Rights Reserved.