public abstract class

AbstractOrderableField

extends AbstractField
implements OrderableField
java.lang.Object
   ↳ com.atlassian.jira.issue.fields.AbstractField
     ↳ com.atlassian.jira.issue.fields.AbstractOrderableField
Known Direct Subclasses
Known Indirect Subclasses

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.issue.fields.OrderableField
[Expand]
Inherited Fields
From class com.atlassian.jira.issue.fields.AbstractField
Public Constructors
AbstractOrderableField(String id, String name, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, PermissionManager permissionManager, SearchHandlerFactory searcherHandlerFactory)
Public Methods
SearchHandler createAssociatedSearchHandler()
Return SearchHandler for the field.
String getBulkEditHtml(OperationContext operationContext, Action action, BulkEditBean bulkEditBean, Map displayParameters)
Returns HTML that should be shown when the issue is being bulk edited.
String getCreateHtml(FieldLayoutItem fieldLayoutItem, OperationContext operationContext, Action action, Issue issue)
Returns the HTML that should be shown when the issue is being created.
String getEditHtml(FieldLayoutItem fieldLayoutItem, OperationContext operationContext, Action action, Issue issue)
Returns HTML that should be shown when the issue is being edited.
String getViewHtml(FieldLayoutItem fieldLayoutItem, Action action, Issue issue)
boolean hasParam(Map parameters)
Basic implementation where the relevant params object is null if no elements are present.
void populateFromParams(Map<StringObject> fieldValuesHolder, Map<StringString[]> parameters)
Populate the fieldValuesHolder with a value from (web) parameters.
Protected Methods
ApplicationProperties getApplicationProperties()
PermissionManager getPermissionManager()
abstract Object getRelevantParams(Map<StringString[]> params)
Map<StringObject> getVelocityParams(Issue issue)
Map<StringObject> getVelocityParams(FieldLayoutItem fieldLayoutItem, Action action, Issue issue, Map displayParams)
boolean hasBulkUpdatePermission(BulkEditBean bulkEditBean, Issue issue)
boolean hasPermission(Issue issue, int permissionId)
boolean isHidden(Collection<FieldLayout> fieldLayouts)
Determines if the field is hidden in at least one field layout.
String renderTemplate(String template, Map<StringObject> velocityParams)
boolean rendererTypesEqual(String oldRendererType, String newRendererType)
boolean valuesEqual(Object value, Object currentValue)
[Expand]
Inherited Methods
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.OrderableField
From interface com.atlassian.jira.issue.fields.SearchableField
From interface java.lang.Comparable

Public Constructors

public AbstractOrderableField (String id, String name, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, PermissionManager permissionManager, SearchHandlerFactory searcherHandlerFactory)

Public Methods

public SearchHandler createAssociatedSearchHandler ()

Return SearchHandler for the field. This object tells JIRA how to search for values within the field.

Returns
  • the SearchHandler associated with the field. Can return null when no searcher is associated with the field. This will mainly happen when a customfield is configured to have no searcher.

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

Returns HTML that should be shown when the issue is being bulk edited. By default calls the getEditHtml(com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem, com.atlassian.jira.issue.customfields.OperationContext, webwork.action.Action, com.atlassian.jira.issue.Issue, java.util.Map) method with null for FieldLayoutItem and the first issue in the collection}

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 getCreateHtml (FieldLayoutItem fieldLayoutItem, OperationContext operationContext, Action action, Issue issue)

Returns the HTML that should be shown when the issue is being created.

Parameters
fieldLayoutItem FieldLayoutItem
operationContext OperationContext
action Action
issue Issue
Returns
  • the HTML that should be shown when the issue is being created.

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

Returns HTML that should be shown when the issue is being edited.

Parameters
fieldLayoutItem FieldLayoutItem
operationContext OperationContext
action Action
issue Issue
Returns
  • HTML that should be shown when the issue is being edited.

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

public boolean hasParam (Map parameters)

Basic implementation where the relevant params object is null if no elements are present. Some fields need to override this because of their innate complex behaviour.

Parameters
parameters Map of parameters.
Returns
  • True if a relevant parameter is available in the input.

public void populateFromParams (Map<StringObject> fieldValuesHolder, Map<StringString[]> parameters)

Populate the fieldValuesHolder with a value from (web) parameters.

Parameters
fieldValuesHolder The fieldValuesHolder Map to be populated.
parameters Map of HTTP parameters.

Protected Methods

protected ApplicationProperties getApplicationProperties ()

protected PermissionManager getPermissionManager ()

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

protected Map<StringObject> getVelocityParams (Issue issue)

protected Map<StringObject> getVelocityParams (FieldLayoutItem fieldLayoutItem, Action action, Issue issue, Map displayParams)

protected boolean hasBulkUpdatePermission (BulkEditBean bulkEditBean, Issue issue)

protected boolean hasPermission (Issue issue, int permissionId)

protected boolean isHidden (Collection<FieldLayout> fieldLayouts)

Determines if the field is hidden in at least one field layout.

Parameters
fieldLayouts the field layouts to check
Returns
  • true if the field is hidden in at least one of the passed field layouts, false otherwise

protected String renderTemplate (String template, Map<StringObject> velocityParams)

protected boolean rendererTypesEqual (String oldRendererType, String newRendererType)

protected boolean valuesEqual (Object value, Object currentValue)