Package com.atlassian.jira.issue.fields
Class AbstractOrderableField<V>
java.lang.Object
com.atlassian.jira.issue.fields.AbstractField
com.atlassian.jira.issue.fields.AbstractOrderableField<V>
- All Implemented Interfaces:
Field,OrderableField<V>,SearchableField,Comparable
- Direct Known Subclasses:
AbstractOrderableNavigableFieldImpl,ArchivedDateSystemField,ArchivedUserSystemField,AttachmentSystemField,CommentSystemField,IssueLinksSystemField,TimeTrackingSystemField,WorklogSystemField
-
Field Summary
Fields inherited from class com.atlassian.jira.issue.fields.AbstractField
authenticationContextFields inherited from interface com.atlassian.jira.issue.fields.OrderableField
MOVE_ISSUE_PARAM_KEY, NO_HEADER_PARAM_KEY, TEMPLATE_DIRECTORY_PATH -
Constructor Summary
ConstructorsConstructorDescriptionAbstractOrderableField(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) -
Method Summary
Modifier and TypeMethodDescriptionReturnSearchHandlerfor the field.protected ApplicationPropertiesgetBulkEditHtml(OperationContext operationContext, webwork.action.Action action, BulkEditBean bulkEditBean, Map displayParameters) Returns HTML that should be shown when the issue is being bulk edited.getCreateHtml(FieldLayoutItem fieldLayoutItem, OperationContext operationContext, webwork.action.Action action, Issue issue) Returns the HTML that should be shown when the issue is being created.getEditHtml(FieldLayoutItem fieldLayoutItem, OperationContext operationContext, webwork.action.Action action, Issue issue) Returns HTML that should be shown when the issue is being edited.protected FieldLayoutItemgetFieldLayoutItemForBulkOperation(BulkEditBean bulkEditBean) protected IssuegetIssueForBulkOperation(BulkEditBean bulkEditBean) protected PermissionManagerprotected abstract ObjectgetRelevantParams(Map<String, String[]> params) getVelocityParams(FieldLayoutItem fieldLayoutItem, webwork.action.Action action, Issue issue, Map displayParams) getVelocityParams(Issue issue) getVelocityParams(Map<String, Object> displayParams) getViewHtml(FieldLayoutItem fieldLayoutItem, webwork.action.Action action, Issue issue) protected booleanhasBulkUpdatePermission(BulkEditBean bulkEditBean, Issue issue) booleanBasic implementation where the relevant params object is null if no elements are present.protected booleanhasPermission(Issue issue, ProjectPermissionKey permissionKey) protected booleanisHidden(Collection<FieldLayout> fieldLayouts) Determines if the field is hidden in at least one field layout.voidPopulate the fieldValuesHolder with a value from (web) parameters.protected booleanrendererTypesEqual(String oldRendererType, String newRendererType) protected StringrenderTemplate(String template, Map<String, Object> velocityParams) protected voidvalidateBulkEditHtmlProperties(BulkEditBean bulkEditBean) protected booleanvaluesEqual(Object value, Object currentValue) Methods inherited from class com.atlassian.jira.issue.fields.AbstractField
compareTo, equals, getAuthenticationContext, getId, getName, getNameKey, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.atlassian.jira.issue.fields.Field
getId, getName, getNameKeyMethods 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
-
Constructor Details
-
AbstractOrderableField
public AbstractOrderableField(String id, String name, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, PermissionManager permissionManager) -
AbstractOrderableField
public AbstractOrderableField(String id, String name, VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, PermissionManager permissionManager, SearchHandlerFactory searcherHandlerFactory)
-
-
Method Details
-
getCreateHtml
public String getCreateHtml(FieldLayoutItem fieldLayoutItem, OperationContext operationContext, webwork.action.Action action, Issue issue) Description copied from interface:OrderableFieldReturns the HTML that should be shown when the issue is being created.- Specified by:
getCreateHtmlin interfaceOrderableField<V>- 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:OrderableFieldReturns HTML that should be shown when the issue is being edited.- Specified by:
getEditHtmlin interfaceOrderableField<V>- Parameters:
fieldLayoutItem- FieldLayoutItemoperationContext- OperationContextaction- Actionissue- Issue- Returns:
- HTML that should be shown when the issue is being edited.
-
createAssociatedSearchHandler
Description copied from interface:SearchableFieldReturnSearchHandlerfor the field. This object tells JIRA how to search for values within the field.- Specified by:
createAssociatedSearchHandlerin interfaceSearchableField- Returns:
- the SearchHandler associated with the field. Can return
nullwhen 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 theOrderableField.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 forFieldLayoutItemand the first issue in the collection}- Specified by:
getBulkEditHtmlin interfaceOrderableField<V>- Parameters:
operationContext- OperationContextaction- ActionbulkEditBean- BulkEditBeandisplayParameters- Map of display parameters.- Returns:
- HTML that should be shown when the issue is being edited.
-
validateBulkEditHtmlProperties
-
getFieldLayoutItemForBulkOperation
-
getIssueForBulkOperation
-
getViewHtml
public String getViewHtml(FieldLayoutItem fieldLayoutItem, webwork.action.Action action, Issue issue) - Specified by:
getViewHtmlin interfaceOrderableField<V>
-
hasParam
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:
hasParamin interfaceOrderableField<V>- 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:OrderableFieldPopulate the fieldValuesHolder with a value from (web) parameters.- Specified by:
populateFromParamsin interfaceOrderableField<V>- Parameters:
fieldValuesHolder- The fieldValuesHolder Map to be populated.parameters- Map of HTTP parameters.
-
renderTemplate
-
getApplicationProperties
-
getRelevantParams
-
getVelocityParams
-
getVelocityParams
-
getVelocityParams
-
valuesEqual
-
isHidden
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
-
hasPermission
-
hasBulkUpdatePermission
-
getPermissionManager
-