public class

EnvironmentSystemField

extends AbstractTextSystemField
implements HideableField RequirableField RestFieldOperations
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
           ↳ com.atlassian.jira.issue.fields.EnvironmentSystemField

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
EnvironmentSystemField(VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, RendererManager rendererManager, PermissionManager permissionManager, EnvironmentSearchHandlerFactory searchHandlerFactory, TextFieldCharacterLengthValidator textFieldCharacterLengthValidator)
Public Methods
String availableForBulkEdit(BulkEditBean bulkEditBean)
boolean canRemoveValueFromIssueObject(Issue issue)
String getColumnHeadingKey()
String getDefaultSortOrder()
String getDefaultValue(Issue issue)
JsonData getJsonDefaultValue(IssueContext issueCtx)
Return The default data for this system field.
RestFieldOperationsHandler getRestFieldOperation()
List<SortField> getSortFields(boolean sortOrder)
Return a list of Lucene SortFields to be used for sorting search results.
LuceneFieldSorter getSorter()
String getValueFromIssue(Issue issue)
Gets the value stored for this field on the provided issue.
boolean isShown(Issue issue)
void removeValueFromIssueObject(MutableIssue issue)
void updateIssue(FieldLayoutItem fieldLayoutItem, MutableIssue issue, Map fieldValueHolder)
void validateParams(OperationContext operationContext, ErrorCollection errorCollectionToAddTo, I18nHelper i18n, Issue issue, FieldScreenRenderLayoutItem fieldScreenRenderLayoutItem)
validate the field value
Protected Methods
String getColumnViewTemplateName()
String getEditTemplateName()
boolean isInvertCollapsedState()
Override and return true if you want the default state to be collapsed.
[Expand]
Inherited Methods
From class com.atlassian.jira.issue.fields.AbstractTextSystemField
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 com.atlassian.jira.issue.fields.rest.RestFieldOperations
From interface java.lang.Comparable

Public Constructors

public EnvironmentSystemField (VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, RendererManager rendererManager, PermissionManager permissionManager, EnvironmentSearchHandlerFactory searchHandlerFactory, TextFieldCharacterLengthValidator textFieldCharacterLengthValidator)

Public Methods

public String availableForBulkEdit (BulkEditBean bulkEditBean)

public boolean canRemoveValueFromIssueObject (Issue issue)

public String getColumnHeadingKey ()

public String getDefaultSortOrder ()

public String getDefaultValue (Issue issue)

public JsonData getJsonDefaultValue (IssueContext issueCtx)

Return The default data for this system field. May be null if there is no default.

Parameters
issueCtx Issue (This should really only need to be an issue context, but for historical reasons we need an issue object.

public RestFieldOperationsHandler getRestFieldOperation ()

public List<SortField> getSortFields (boolean sortOrder)

Return a list of Lucene SortFields to be used for sorting search results.

Using this method allows the field to specify the most performant way to perform a search. If a field can be sorted directly using the term in the index then this should just return a singleton list with the sort field.

return Collections.singletonList(new SortField(fieldName, sortOrder));

The default implementation builds this using the FieldComparatorSource returned by getSortComparatorSource()

If you implement this method there is no need to implement getSortComparatorSource().

Returns
  • The name of the indexed term to be used for native Lucene sorting.

public LuceneFieldSorter getSorter ()

public 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 boolean isShown (Issue issue)

public void removeValueFromIssueObject (MutableIssue issue)

public void updateIssue (FieldLayoutItem fieldLayoutItem, MutableIssue issue, Map fieldValueHolder)

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

validate the field value

Parameters
operationContext OperationContext
errorCollectionToAddTo ErrorCollection
i18n I18nHelper
issue Issue
fieldScreenRenderLayoutItem FieldScreenRenderLayoutItem

Protected Methods

protected String getColumnViewTemplateName ()

protected String getEditTemplateName ()

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.