com.atlassian.jira.issue.fields
Class AbstractOrderableField
java.lang.Object
com.atlassian.jira.issue.fields.AbstractField
com.atlassian.jira.issue.fields.AbstractOrderableField
- All Implemented Interfaces:
- Field, OrderableField, SearchableField, Comparable
- Direct Known Subclasses:
- AbstractOrderableNavigableFieldImpl, AttachmentSystemField, CommentSystemField, IssueLinksSystemField, TimeTrackingSystemField, WorklogSystemField
public abstract class AbstractOrderableField
- extends AbstractField
- implements OrderableField
Method Summary |
SearchHandler |
createAssociatedSearchHandler()
Return SearchHandler for the field. |
protected ApplicationProperties |
getApplicationProperties()
|
String |
getBulkEditHtml(OperationContext operationContext,
webwork.action.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,
webwork.action.Action action,
Issue issue)
Returns the HTML that should be shown when the issue is being created. |
String |
getEditHtml(FieldLayoutItem fieldLayoutItem,
OperationContext operationContext,
webwork.action.Action action,
Issue issue)
Returns HTML that should be shown when the issue is being edited. |
protected PermissionManager |
getPermissionManager()
|
protected abstract Object |
getRelevantParams(Map<String,String[]> params)
|
protected Map<String,Object> |
getVelocityParams(FieldLayoutItem fieldLayoutItem,
webwork.action.Action action,
Issue issue,
Map displayParams)
|
protected Map<String,Object> |
getVelocityParams(Issue issue)
|
String |
getViewHtml(FieldLayoutItem fieldLayoutItem,
webwork.action.Action action,
Issue issue)
|
protected boolean |
hasBulkUpdatePermission(BulkEditBean bulkEditBean,
Issue issue)
|
boolean |
hasParam(Map parameters)
Basic implementation where the relevant params object is null if no elements are present. |
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. |
void |
populateFromParams(Map<String,Object> fieldValuesHolder,
Map<String,String[]> parameters)
Populate the fieldValuesHolder with a value from (web) parameters. |
protected boolean |
rendererTypesEqual(String oldRendererType,
String newRendererType)
|
protected String |
renderTemplate(String template,
Map<String,Object> velocityParams)
|
protected boolean |
valuesEqual(Object value,
Object currentValue)
|
Methods inherited from interface com.atlassian.jira.issue.fields.OrderableField |
availableForBulkEdit, canRemoveValueFromIssueObject, createValue, getCreateHtml, getDefaultValue, getEditHtml, getValueFromParams, getViewHtml, getViewHtml, hasValue, isShown, needsMove, populateDefaults, populateForMove, populateFromIssue, populateParamsFromString, removeValueFromIssueObject, updateIssue, updateValue, validateParams |
AbstractOrderableField
public AbstractOrderableField(String id,
String name,
VelocityTemplatingEngine templatingEngine,
ApplicationProperties applicationProperties,
JiraAuthenticationContext authenticationContext,
PermissionManager permissionManager,
SearchHandlerFactory searcherHandlerFactory)
getCreateHtml
public String getCreateHtml(FieldLayoutItem fieldLayoutItem,
OperationContext operationContext,
webwork.action.Action action,
Issue issue)
- Description copied from interface:
OrderableField
- Returns the HTML that should be shown when the issue is being created.
- Specified by:
getCreateHtml
in interface OrderableField
- Parameters:
fieldLayoutItem
- FieldLayoutItemoperationContext
- OperationContextaction
- Actionissue
- Issue
- Returns:
- the HTML that should be shown when the issue is being created.
getEditHtml
public String getEditHtml(FieldLayoutItem fieldLayoutItem,
OperationContext operationContext,
webwork.action.Action action,
Issue issue)
- Description copied from interface:
OrderableField
- Returns HTML that should be shown when the issue is being edited.
- Specified by:
getEditHtml
in interface OrderableField
- Parameters:
fieldLayoutItem
- FieldLayoutItemoperationContext
- OperationContextaction
- Actionissue
- Issue
- Returns:
- HTML that should be shown when the issue is being edited.
createAssociatedSearchHandler
public SearchHandler createAssociatedSearchHandler()
- Description copied from interface:
SearchableField
- Return
SearchHandler
for the field. This object tells JIRA how to search for values within the field.
- Specified by:
createAssociatedSearchHandler
in interface SearchableField
- 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.
getBulkEditHtml
public String getBulkEditHtml(OperationContext operationContext,
webwork.action.Action action,
BulkEditBean bulkEditBean,
Map displayParameters)
- Returns HTML that should be shown when the issue is being bulk edited.
By default calls the
OrderableField.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}
- Specified by:
getBulkEditHtml
in interface OrderableField
- Parameters:
operationContext
- OperationContextaction
- ActionbulkEditBean
- BulkEditBeandisplayParameters
- Map of display parameters.
- Returns:
- HTML that should be shown when the issue is being edited.
getViewHtml
public String getViewHtml(FieldLayoutItem fieldLayoutItem,
webwork.action.Action action,
Issue issue)
- Specified by:
getViewHtml
in interface OrderableField
hasParam
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.
- Specified by:
hasParam
in interface OrderableField
- Parameters:
parameters
- Map of parameters.
- Returns:
- True if a relevant parameter is available in the input.
populateFromParams
public void populateFromParams(Map<String,Object> fieldValuesHolder,
Map<String,String[]> parameters)
- Description copied from interface:
OrderableField
- Populate the fieldValuesHolder with a value from (web) parameters.
- Specified by:
populateFromParams
in interface OrderableField
- Parameters:
fieldValuesHolder
- The fieldValuesHolder Map to be populated.parameters
- Map of HTTP parameters.
renderTemplate
protected String renderTemplate(String template,
Map<String,Object> velocityParams)
getApplicationProperties
protected ApplicationProperties getApplicationProperties()
getRelevantParams
protected abstract Object getRelevantParams(Map<String,String[]> params)
getVelocityParams
protected Map<String,Object> getVelocityParams(FieldLayoutItem fieldLayoutItem,
webwork.action.Action action,
Issue issue,
Map displayParams)
getVelocityParams
protected Map<String,Object> getVelocityParams(Issue issue)
valuesEqual
protected boolean valuesEqual(Object value,
Object currentValue)
isHidden
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
rendererTypesEqual
protected boolean rendererTypesEqual(String oldRendererType,
String newRendererType)
hasPermission
protected boolean hasPermission(Issue issue,
int permissionId)
hasBulkUpdatePermission
protected boolean hasBulkUpdatePermission(BulkEditBean bulkEditBean,
Issue issue)
getPermissionManager
protected PermissionManager getPermissionManager()
Copyright © 2002-2013 Atlassian. All Rights Reserved.