public abstract class

AbstractVersionsSystemField

extends AbstractOrderableNavigableFieldImpl
implements HideableField RequirableField RestAwareField
java.lang.Object
   ↳ com.atlassian.jira.issue.fields.AbstractField
     ↳ com.atlassian.jira.issue.fields.AbstractOrderableField
       ↳ com.atlassian.jira.issue.fields.AbstractOrderableNavigableFieldImpl
         ↳ com.atlassian.jira.issue.fields.AbstractVersionsSystemField
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
Fields
public static final Long RELEASED_VERSION_ID
public static final Long UNKNOWN_VERSION_ID
public static final Long UNRELEASED_VERSION_ID
protected final VersionHelperBean versionHelperBean
protected final VersionManager versionManager
[Expand]
Inherited Fields
From class com.atlassian.jira.issue.fields.AbstractField
Public Constructors
AbstractVersionsSystemField(String id, String name, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, VersionManager versionManager, PermissionManager permissionManager, JiraAuthenticationContext authenticationContext, VersionHelperBean versionHelperBean, SearchHandlerFactory searchHandlerFactory, JiraBaseUrls jiraBaseUrls)
Public Methods
String availableForBulkEdit(BulkEditBean bulkEditBean)
void createValue(Issue issue, Object value)
String getBulkEditHtml(OperationContext operationContext, Action action, BulkEditBean bulkEditBean, Map displayParameters)
Returns HTML that should be shown when a version field is being bulk edited.
String getColumnViewHtml(FieldLayoutItem fieldLayoutItem, Map displayParams, Issue issue)
String getCreateHtml(FieldLayoutItem fieldLayoutItem, OperationContext operationContext, Action action, Issue issue, Map displayParameters)
String getDefaultSortOrder()
Object getDefaultValue(Issue issue)
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.
Collection<Version> getValueFromParams(Map params)
String getViewHtml(FieldLayoutItem fieldLayoutItem, Action action, Issue issue, Map displayParameters)
String getViewHtml(FieldLayoutItem fieldLayoutItem, Action action, Issue issue, Object value, Map displayParameters)
boolean hasValue(Issue issue)
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> params, Issue issue)
void populateParamsFromString(Map<StringObject> fieldValuesHolder, String stringValue, Issue issue)
void updateValue(FieldLayoutItem fieldLayoutItem, Issue issue, ModifiedValue modifiedValue, IssueChangeHolder issueChangeHolder)
void validateParams(OperationContext operationContext, ErrorCollection errorCollection, I18nHelper i18n, Issue issue, FieldScreenRenderLayoutItem fieldScreenRenderLayoutItem)
Protected Methods
abstract void addFieldRequiredErrorMessage(Issue issue, ErrorCollection errorCollectionToAddTo, I18nHelper i18n)
Map<StringObject> addViewVelocityParams()
abstract String getArchivedVersionsFieldSearchParam()
abstract String getArchivedVersionsFieldTitle()
abstract String getChangeItemFieldName()
LongIdsValueHolder getCurrentVersionIds(Issue issue)
abstract Collection<Version> getCurrentVersions(Issue issue)
abstract String getIssueRelationName()
abstract String getModifiedWithoutPermissionErrorMessage(I18nHelper i18n)
List<VersionProxy> getPossibleVersions(Project project, boolean unreleasedFirst)
Object getRelevantParams(Map<StringString[]> params)
abstract boolean getUnreleasedVersionsFirst()
VersionManager getVersionManager()
[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.rest.RestAwareField
From interface java.lang.Comparable

Fields

public static final Long RELEASED_VERSION_ID

public static final Long UNKNOWN_VERSION_ID

public static final Long UNRELEASED_VERSION_ID

protected final VersionHelperBean versionHelperBean

protected final VersionManager versionManager

Public Constructors

public AbstractVersionsSystemField (String id, String name, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, VersionManager versionManager, PermissionManager permissionManager, JiraAuthenticationContext authenticationContext, VersionHelperBean versionHelperBean, SearchHandlerFactory searchHandlerFactory, JiraBaseUrls jiraBaseUrls)

Public Methods

public String availableForBulkEdit (BulkEditBean bulkEditBean)

public void createValue (Issue issue, Object value)

public String getBulkEditHtml (OperationContext operationContext, Action action, BulkEditBean bulkEditBean, Map displayParameters)

Returns HTML that should be shown when a version field is being bulk edited. The HTML displayed for Bulk Move of Versions needs to allow the user to specify mappings for each old version present in the currently selected issues.

Parameters
operationContext OperationContext
action Action
bulkEditBean BulkEditBean
displayParameters Map of display parameters.
Returns
  • HTML that should be shown when the issue is being edited.

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

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

public String getDefaultSortOrder ()

public Object getDefaultValue (Issue issue)

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 Collection<Version> getValueFromParams (Map params)

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

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

public boolean hasValue (Issue issue)

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> params, Issue issue)

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

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

public void validateParams (OperationContext operationContext, ErrorCollection errorCollection, I18nHelper i18n, Issue issue, FieldScreenRenderLayoutItem fieldScreenRenderLayoutItem)

Protected Methods

protected abstract void addFieldRequiredErrorMessage (Issue issue, ErrorCollection errorCollectionToAddTo, I18nHelper i18n)

protected Map<StringObject> addViewVelocityParams ()

protected abstract String getArchivedVersionsFieldSearchParam ()

protected abstract String getArchivedVersionsFieldTitle ()

protected abstract String getChangeItemFieldName ()

protected LongIdsValueHolder getCurrentVersionIds (Issue issue)

protected abstract Collection<Version> getCurrentVersions (Issue issue)

protected abstract String getIssueRelationName ()

protected abstract String getModifiedWithoutPermissionErrorMessage (I18nHelper i18n)

protected List<VersionProxy> getPossibleVersions (Project project, boolean unreleasedFirst)

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

protected abstract boolean getUnreleasedVersionsFirst ()

protected VersionManager getVersionManager ()