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, TimeTrackingSystemField
public abstract class AbstractOrderableField
- extends AbstractField
- implements OrderableField
Copyright (c) 2002-2004
All rights reserved.
Method Summary |
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 params)
|
protected Map |
getVelocityParams(FieldLayoutItem fieldLayoutItem,
webwork.action.Action action,
Issue issue,
Map displayParameters)
|
protected Map |
getVelocityParams(Issue issue)
|
String |
getViewHtml(FieldLayoutItem fieldLayoutItem,
webwork.action.Action action,
Issue issue)
|
protected boolean |
hasBulkUpdatePermission(BulkEditBean bulkEditBean,
Issue issue)
|
protected boolean |
hasPermission(Issue issue,
int permissionId)
|
protected boolean |
isHidden(Collection fieldLayouts)
Determines if the field is hidden in at least one field layout. |
void |
populateFromParams(Map fieldValuesHolder,
Map parameters)
Populate the fieldValuesHolder with a value from (web) parameters. |
protected boolean |
rendererTypesEqual(String oldRendererType,
String newRendererType)
|
protected String |
renderTemplate(String template,
Map 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,
com.atlassian.velocity.VelocityManager velocityManager,
ApplicationProperties applicationProperties,
JiraAuthenticationContext authenticationContext,
PermissionManager permissionManager)
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.
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
populateFromParams
public void populateFromParams(Map fieldValuesHolder,
Map 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 parameters.
renderTemplate
protected String renderTemplate(String template,
Map velocityParams)
getApplicationProperties
protected ApplicationProperties getApplicationProperties()
getRelevantParams
protected abstract Object getRelevantParams(Map params)
getVelocityParams
protected Map getVelocityParams(FieldLayoutItem fieldLayoutItem,
webwork.action.Action action,
Issue issue,
Map displayParameters)
getVelocityParams
protected Map getVelocityParams(Issue issue)
valuesEqual
protected boolean valuesEqual(Object value,
Object currentValue)
isHidden
protected boolean isHidden(Collection 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-2009 Atlassian. All Rights Reserved.