com.atlassian.jira.issue.fields
Class DescriptionSystemField

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.AbstractTextSystemField
                  extended by com.atlassian.jira.issue.fields.DescriptionSystemField
All Implemented Interfaces:
Field, HideableField, NavigableField, OrderableField, RenderableField, RequirableField, SearchableField, Comparable

public class DescriptionSystemField
extends AbstractTextSystemField
implements HideableField, RequirableField

Copyright (c) 2002-2004 All rights reserved.


Field Summary
 
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
DescriptionSystemField(com.atlassian.velocity.VelocityManager velocityManager, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, RendererManager rendererManager, PermissionManager permissionManager)
           
 
Method Summary
 String availableForBulkEdit(BulkEditBean bulkEditBean)
          Determines whether the field is available for bulk editing given the BulkEditBean.
 List getAssociatedSearchers()
          Returns a list of searchers associated with field
 String getColumnHeadingKey()
           
protected  String getColumnViewTemplateName()
           
 String getDefaultSortOrder()
          The order in which to sort the field when it is sorted for the first time.
 Object getDefaultValue(Issue issue)
          The value that should be set on the issue if the field is not shown for some reason.
protected  String getEditTemplateName()
           
 LuceneFieldSorter getSorter()
          A sorter to be used when sorting columns in a table.
 String getValueFromIssue(Issue issue)
          Gets the value stored for this field on the provided issue.
 boolean isShown(Issue issue)
          Tests field specific way to determine if it should be shown or not
 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)
 void validateParams(OperationContext operationContext, ErrorCollection errorCollectionToAddTo, I18nHelper i18n, Issue issue, FieldScreenRenderLayoutItem fieldScreenRenderLayoutItem)
          Ensure that the parameters are valid
 
Methods inherited from class com.atlassian.jira.issue.fields.AbstractTextSystemField
createValue, getChangeLogFieldName, getChangelogValue, getColumnViewHtml, getCreateHtml, getEditHtml, getRelevantParams, getValueFromParams, getViewHtml, getViewHtml, hasValue, isRenderable, needsMove, populateDefaults, populateForMove, populateFromIssue, populateParamsFromString, populateVelocityParams, populateVelocityParams, updateValue, valuesEqual
 
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
 
Methods inherited from interface com.atlassian.jira.issue.fields.renderer.RenderableField
getId
 

Constructor Detail

DescriptionSystemField

public DescriptionSystemField(com.atlassian.velocity.VelocityManager velocityManager,
                              ApplicationProperties applicationProperties,
                              JiraAuthenticationContext authenticationContext,
                              RendererManager rendererManager,
                              PermissionManager permissionManager)
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

Specified by:
isShown in interface OrderableField

validateParams

public void validateParams(OperationContext operationContext,
                           ErrorCollection errorCollectionToAddTo,
                           I18nHelper i18n,
                           Issue issue,
                           FieldScreenRenderLayoutItem fieldScreenRenderLayoutItem)
Description copied from interface: OrderableField
Ensure that the parameters are valid

Specified by:
validateParams in interface OrderableField
issue - this is passed to get the value of other fields that may or may not have been modified

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

getValueFromIssue

public String getValueFromIssue(Issue issue)
Description copied from interface: RenderableField
Gets the value stored for this field on the provided issue.

Specified by:
getValueFromIssue in interface RenderableField
Specified by:
getValueFromIssue in class AbstractTextSystemField
Parameters:
issue - identifies the issue that will contain the value for this field.
Returns:
the value stored on this issue for this field, null if not applicable.

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)

Specified by:
updateIssue in interface OrderableField

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.

Specified by:
removeValue in interface OrderableField

getAssociatedSearchers

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

Specified by:
getAssociatedSearchers in interface SearchableField
Returns:
List of @Class objects of type @IssueSearcher. Empty list if no searchers are required. Must not be null

getColumnHeadingKey

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

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

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.

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

getEditTemplateName

protected String getEditTemplateName()
Specified by:
getEditTemplateName in class AbstractTextSystemField

getColumnViewTemplateName

protected String getColumnViewTemplateName()
Specified by:
getColumnViewTemplateName in class AbstractTextSystemField

availableForBulkEdit

public String availableForBulkEdit(BulkEditBean bulkEditBean)
Description copied from interface: OrderableField
Determines whether the field is available for bulk editing given the BulkEditBean.

Specified by:
availableForBulkEdit in interface OrderableField
Parameters:
bulkEditBean - holds the state of the bulk-edit wizard (e.g. the selected issues for bulk editing)
Returns:
null if the field is available for bulk-editing or an i18n key of the error message to show as why the field is not available.


Copyright © 2002-2007 Atlassian. All Rights Reserved.