public abstract class

AbstractTextSystemField

extends AbstractOrderableNavigableFieldImpl<V>
implements RenderableField RestAwareField
java.lang.Object
   ↳ com.atlassian.jira.issue.fields.AbstractField
     ↳ com.atlassian.jira.issue.fields.AbstractOrderableField<V>
       ↳ com.atlassian.jira.issue.fields.AbstractOrderableNavigableFieldImpl<V>
         ↳ com.atlassian.jira.issue.fields.AbstractTextSystemField
Known Direct Subclasses

Class Overview

Copyright (c) 2002-2004 All rights reserved.

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.issue.fields.NavigableField
From interface com.atlassian.jira.issue.fields.OrderableField
[Expand]
Inherited Fields
From class com.atlassian.jira.issue.fields.AbstractField
Public Constructors
AbstractTextSystemField(String id, String name, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, RendererManager rendererManager, PermissionManager permissionManager, SearchHandlerFactory searchHandlerFactory)
Public Methods
void createValue(Issue issue, String value)
String getColumnViewHtml(FieldLayoutItem fieldLayoutItem, Map displayParams, Issue issue)
String getCreateHtml(FieldLayoutItem fieldLayoutItem, OperationContext operationContext, Action action, Issue issue, Map dispayParameters)
String getEditHtml(FieldLayoutItem fieldLayoutItem, OperationContext operationContext, Action action, Issue issue, Map displayParameters)
FieldTypeInfo getFieldTypeInfo(FieldTypeInfoContext fieldTypeInfoContext)
Returns lower level Information about the field.
FieldJsonRepresentation getJsonFromIssue(Issue issue, boolean renderedVersionRequired, 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.
abstract String getValueFromIssue(Issue issue)
Gets the value stored for this field on the provided issue.
String getValueFromParams(Map params)
String getViewHtml(FieldLayoutItem fieldLayoutItem, Action action, Issue issue, String value, Map displayParameters)
String getViewHtml(FieldLayoutItem fieldLayoutItem, Action action, Issue issue, Map displayParameters)
boolean hasValue(Issue issue)
boolean isRenderable()
Defines if a field determines itself as renderable.
MessagedResult needsMove(Collection originalIssues, Issue targetIssue, FieldLayoutItem targetFieldLayoutItem)
void populateDefaults(Map<StringObject> fieldValuesHolder, Issue issue)
void populateForMove(Map<StringObject> fieldValuesHolder, Issue originalIssue, Issue targetIssue)
void populateFromIssue(Map<StringObject> fieldValuesHolder, Issue issue)
void populateParamsFromString(Map<StringObject> fieldValuesHolder, String stringValue, Issue issue)
void updateValue(FieldLayoutItem fieldLayoutItem, Issue issue, ModifiedValue modifiedValue, IssueChangeHolder issueChangeHolder)
Protected Methods
String getChangeLogFieldName()
String getChangelogValue(Object value)
abstract String getColumnViewTemplateName()
abstract String getEditTemplateName()
Object getRelevantParams(Map<StringString[]> params)
boolean isInvertCollapsedState()
Override and return true if you want the default state to be collapsed.
void populateVelocityParams(Map fieldValuesHolder, Map params)
void populateVelocityParams(FieldLayoutItem fieldLayoutItem, Issue issue, Map<StringObject> params)
boolean valuesEqual(String currentValue, String value)
[Expand]
Inherited Methods
From class com.atlassian.jira.issue.fields.AbstractOrderableNavigableFieldImpl
From class com.atlassian.jira.issue.fields.AbstractOrderableField
From class com.atlassian.jira.issue.fields.AbstractField
From class java.lang.Object
From interface com.atlassian.jira.issue.fields.Field
From interface com.atlassian.jira.issue.fields.NavigableField
From interface com.atlassian.jira.issue.fields.OrderableField
From interface com.atlassian.jira.issue.fields.SearchableField
From interface com.atlassian.jira.issue.fields.renderer.RenderableField
From interface com.atlassian.jira.issue.fields.rest.RestAwareField
From interface java.lang.Comparable

Public Constructors

public AbstractTextSystemField (String id, String name, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, RendererManager rendererManager, PermissionManager permissionManager, SearchHandlerFactory searchHandlerFactory)

Public Methods

public void createValue (Issue issue, String value)

public String getColumnViewHtml (FieldLayoutItem fieldLayoutItem, Map displayParams, Issue issue)

public String getCreateHtml (FieldLayoutItem fieldLayoutItem, OperationContext operationContext, Action action, Issue issue, Map dispayParameters)

public String getEditHtml (FieldLayoutItem fieldLayoutItem, OperationContext operationContext, Action action, Issue issue, Map displayParameters)

public FieldTypeInfo getFieldTypeInfo (FieldTypeInfoContext fieldTypeInfoContext)

Returns lower level Information about the field. This information contains allowed values and/or the autocomplete url

Parameters
fieldTypeInfoContext the FieldTypeInfoContext contains context information that is relevant to generate the FieldTypeInfo

public FieldJsonRepresentation getJsonFromIssue (Issue issue, boolean renderedVersionRequired, 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.

Parameters
issue to get field data from
renderedVersionRequired 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.

public JsonType getJsonSchema ()

Return a description of the shape of this field when represented as JSON.

public abstract String getValueFromIssue (Issue issue)

Gets the value stored for this field on the provided issue.

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.

public String getValueFromParams (Map params)

public String getViewHtml (FieldLayoutItem fieldLayoutItem, Action action, Issue issue, String value, Map displayParameters)

public String getViewHtml (FieldLayoutItem fieldLayoutItem, Action action, Issue issue, Map displayParameters)

public boolean hasValue (Issue issue)

public boolean isRenderable ()

Defines if a field determines itself as renderable. This is needed because of the way that customfields are implemented. Since all the real work is done in CustomFieldTypes, if we want to treat system fields and custom fields the same way in the renderers then all custom fields must implement this interface. We therefore provide this method so that the CustomFieldImpl can delegate to the CustomFieldTypes to determine if a given custom field is renderable.

Returns
  • true if the field is renderable, false otherwise.

public MessagedResult needsMove (Collection originalIssues, Issue targetIssue, FieldLayoutItem targetFieldLayoutItem)

public void populateDefaults (Map<StringObject> fieldValuesHolder, Issue issue)

public void populateForMove (Map<StringObject> fieldValuesHolder, Issue originalIssue, Issue targetIssue)

public void populateFromIssue (Map<StringObject> fieldValuesHolder, Issue issue)

public void populateParamsFromString (Map<StringObject> fieldValuesHolder, String stringValue, Issue issue)

public void updateValue (FieldLayoutItem fieldLayoutItem, Issue issue, ModifiedValue modifiedValue, IssueChangeHolder issueChangeHolder)

Protected Methods

protected String getChangeLogFieldName ()

protected String getChangelogValue (Object value)

protected abstract String getColumnViewTemplateName ()

protected abstract String getEditTemplateName ()

protected Object getRelevantParams (Map<StringString[]> params)

protected boolean isInvertCollapsedState ()

Override and return true if you want the default state to be collapsed.

Returns
  • true if the field should be collapsed by default. False otherwise.

protected void populateVelocityParams (Map fieldValuesHolder, Map params)

protected void populateVelocityParams (FieldLayoutItem fieldLayoutItem, Issue issue, Map<StringObject> params)

protected boolean valuesEqual (String currentValue, String value)