public abstract class AbstractOrderableField<V> extends AbstractField implements OrderableField<V>
authenticationContext
MOVE_ISSUE_PARAM_KEY, NO_HEADER_PARAM_KEY, TEMPLATE_DIRECTORY_PATH
Constructor and Description |
---|
AbstractOrderableField(String id,
String name,
VelocityTemplatingEngine templatingEngine,
ApplicationProperties applicationProperties,
JiraAuthenticationContext authenticationContext,
PermissionManager permissionManager) |
AbstractOrderableField(String id,
String name,
VelocityTemplatingEngine templatingEngine,
ApplicationProperties applicationProperties,
JiraAuthenticationContext authenticationContext,
PermissionManager permissionManager,
SearchHandlerFactory searcherHandlerFactory) |
Modifier and Type | Method and Description |
---|---|
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) |
compareTo, equals, getAuthenticationContext, getId, getName, getNameKey, hashCode
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
availableForBulkEdit, canRemoveValueFromIssueObject, createValue, getCreateHtml, getDefaultValue, getEditHtml, getValueFromParams, getViewHtml, getViewHtml, hasValue, isShown, needsMove, populateDefaults, populateForMove, populateFromIssue, populateParamsFromString, removeValueFromIssueObject, updateIssue, updateValue, validateParams
getId, getName, getNameKey
compareTo
public AbstractOrderableField(String id, String name, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, PermissionManager permissionManager)
public AbstractOrderableField(String id, String name, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, PermissionManager permissionManager, SearchHandlerFactory searcherHandlerFactory)
public String getCreateHtml(FieldLayoutItem fieldLayoutItem, OperationContext operationContext, webwork.action.Action action, Issue issue)
OrderableField
getCreateHtml
in interface OrderableField<V>
fieldLayoutItem
- FieldLayoutItemoperationContext
- OperationContextaction
- Actionissue
- Issuepublic String getEditHtml(FieldLayoutItem fieldLayoutItem, OperationContext operationContext, webwork.action.Action action, Issue issue)
OrderableField
getEditHtml
in interface OrderableField<V>
fieldLayoutItem
- FieldLayoutItemoperationContext
- OperationContextaction
- Actionissue
- Issuepublic SearchHandler createAssociatedSearchHandler()
SearchableField
SearchHandler
for the field. This object tells JIRA how to search for values within the field.createAssociatedSearchHandler
in interface SearchableField
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, webwork.action.Action action, BulkEditBean bulkEditBean, Map displayParameters)
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}getBulkEditHtml
in interface OrderableField<V>
operationContext
- OperationContextaction
- ActionbulkEditBean
- BulkEditBeandisplayParameters
- Map of display parameters.public String getViewHtml(FieldLayoutItem fieldLayoutItem, webwork.action.Action action, Issue issue)
getViewHtml
in interface OrderableField<V>
public boolean hasParam(Map parameters)
hasParam
in interface OrderableField<V>
parameters
- Map of parameters.public void populateFromParams(Map<String,Object> fieldValuesHolder, Map<String,String[]> parameters)
OrderableField
populateFromParams
in interface OrderableField<V>
fieldValuesHolder
- The fieldValuesHolder Map to be populated.parameters
- Map of HTTP parameters.protected ApplicationProperties getApplicationProperties()
protected Map<String,Object> getVelocityParams(FieldLayoutItem fieldLayoutItem, webwork.action.Action action, Issue issue, Map displayParams)
protected boolean isHidden(Collection<FieldLayout> fieldLayouts)
fieldLayouts
- the field layouts to checkprotected boolean rendererTypesEqual(String oldRendererType, String newRendererType)
protected boolean hasPermission(Issue issue, int permissionId)
protected boolean hasBulkUpdatePermission(BulkEditBean bulkEditBean, Issue issue)
protected PermissionManager getPermissionManager()
Copyright © 2002-2015 Atlassian. All Rights Reserved.