public class SummarySystemField extends AbstractTextSystemField implements NavigableField, MandatoryField, SummaryField, RestFieldOperations, ExportableSystemField
authenticationContextMAX_LENORDER_ASCENDING, ORDER_DESCENDING, TEMPLATE_DIRECTORY_PATHMOVE_ISSUE_PARAM_KEY, NO_HEADER_PARAM_KEY, TEMPLATE_DIRECTORY_PATH| Constructor and Description |
|---|
SummarySystemField(VelocityTemplatingEngine templatingEngine,
ApplicationProperties applicationProperties,
JiraAuthenticationContext authenticationContext,
RendererManager rendererManager,
PermissionManager permissionManager,
SummarySearchHandlerFactory searchHandlerFactory) |
| Modifier and Type | Method and Description |
|---|---|
String |
availableForBulkEdit(BulkEditBean bulkEditBean)
Determines whether the field is available for bulk editing given the BulkEditBean.
|
boolean |
canRemoveValueFromIssueObject(Issue issue)
Returns
true if a call to OrderableField.removeValueFromIssueObject(com.atlassian.jira.issue.MutableIssue)
will actually remove the value. |
String |
getColumnHeadingKey() |
protected String |
getColumnViewTemplateName() |
String |
getDefaultSortOrder()
The order in which to sort the field when it is sorted for the first time.
|
String |
getDefaultValue(Issue issue)
The value that should be set on the issue if the field is not shown for some reason.
|
protected String |
getEditTemplateName() |
JsonData |
getJsonDefaultValue(IssueContext issueCtx)
Return The default data for this system field.
|
FieldExportParts |
getRepresentationFromIssue(Issue issue)
Returns the raw markup for this for example:
{pre}
"Some *description* here.
|
RestFieldOperationsHandler |
getRestFieldOperation() |
LuceneFieldSorter |
getSorter()
A sorter to be used when sorting columns in a table.
|
List<org.apache.lucene.search.SortField> |
getSortFields(boolean sortOrder)
Return a list of Lucene SortFields to be used for sorting search results.
|
String |
getValueFromIssue(Issue issue)
Gets the value stored for this field on the provided issue.
|
boolean |
isRenderable()
Defines if a field determines itself as renderable.
|
boolean |
isShown(Issue issue)
Tests field specific way to determine if it should be shown or not.
|
void |
populateFromIssue(Map<String,Object> fieldValuesHolder,
Issue issue)
Used to initialise the fieldValuesHolder from the current value of teh issue.
|
protected void |
populateVelocityParams(FieldLayoutItem fieldLayoutItem,
Issue issue,
Map<String,Object> params) |
protected void |
populateVelocityParams(Map fieldValuesHolder,
Map params) |
void |
removeValueFromIssueObject(MutableIssue issue)
Removes the field value from the given MutableIssue object.
|
void |
updateIssue(FieldLayoutItem fieldLayoutItem,
MutableIssue issue,
Map fieldValueHolder)
Record the value on the issue (not saving it to the database, see updateValue).
|
void |
validateParams(OperationContext operationContext,
ErrorCollection errorCollectionToAddTo,
I18nHelper i18n,
Issue issue,
FieldScreenRenderLayoutItem fieldScreenRenderLayoutItem)
validate the field value
|
createValue, getChangeLogFieldName, getChangelogValue, getColumnViewHtml, getCreateHtml, getEditHtml, getFieldTypeInfo, getJsonFromIssue, getJsonSchema, getRelevantParams, getValueFromParams, getViewHtml, getViewHtml, hasValue, isInvertCollapsedState, needsMove, populateDefaults, populateForMove, populateParamsFromString, updateValue, valuesEqualgetColumnCssClass, getHiddenFieldId, getSortComparatorSource, getVelocityParams, prettyPrintChangeHistory, prettyPrintChangeHistorycreateAssociatedSearchHandler, getApplicationProperties, getBulkEditHtml, getCreateHtml, getEditHtml, getFieldLayoutItemForBulkOperation, getIssueForBulkOperation, getPermissionManager, getVelocityParams, getVelocityParams, getViewHtml, hasBulkUpdatePermission, hasParam, hasPermission, isHidden, populateFromParams, rendererTypesEqual, renderTemplate, validateBulkEditHtmlProperties, valuesEqualcompareTo, equals, getAuthenticationContext, getId, getName, getNameKey, hashCodeclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetColumnCssClass, getColumnViewHtml, getHiddenFieldId, getSortComparatorSource, prettyPrintChangeHistory, prettyPrintChangeHistorygetIdcreateValue, getBulkEditHtml, getCreateHtml, getCreateHtml, getEditHtml, getEditHtml, getValueFromParams, getViewHtml, getViewHtml, getViewHtml, hasParam, hasValue, needsMove, populateDefaults, populateForMove, populateFromParams, populateParamsFromString, updateValuecreateAssociatedSearchHandlergetId, getName, getNameKeycompareTopublic SummarySystemField(VelocityTemplatingEngine templatingEngine, ApplicationProperties applicationProperties, JiraAuthenticationContext authenticationContext, RendererManager rendererManager, PermissionManager permissionManager, SummarySearchHandlerFactory searchHandlerFactory)
protected String getEditTemplateName()
getEditTemplateName in class AbstractTextSystemFieldprotected String getColumnViewTemplateName()
getColumnViewTemplateName in class AbstractTextSystemFieldprotected void populateVelocityParams(Map fieldValuesHolder, Map params)
populateVelocityParams in class AbstractTextSystemFieldprotected void populateVelocityParams(FieldLayoutItem fieldLayoutItem, Issue issue, Map<String,Object> params)
populateVelocityParams in class AbstractTextSystemFieldpublic String getValueFromIssue(Issue issue)
RenderableFieldgetValueFromIssue in interface RenderableFieldgetValueFromIssue in class AbstractTextSystemFieldissue - identifies the issue that will contain the value for this field.public void updateIssue(FieldLayoutItem fieldLayoutItem, MutableIssue issue, Map fieldValueHolder)
OrderableFieldupdateIssue in interface OrderableField<String>fieldLayoutItem - FieldLayoutItemissue - MutableIssuefieldValueHolder - Field Value Holder MapOrderableField.updateValue(com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem, com.atlassian.jira.issue.Issue, com.atlassian.jira.issue.ModifiedValue, com.atlassian.jira.issue.util.IssueChangeHolder)public void removeValueFromIssueObject(MutableIssue issue)
OrderableFieldNote that this operation does not actually persist the change, it just clears the value from the given Issue object. The caller will still need to call #updateValue() in order to persist the change.
Some Fields may choose to quietly ignore this request. eg The SecurityLevel Field will not remove Security Level from subtasks because the subtask must always take the Security Level of its parent issue.
removeValueFromIssueObject in interface OrderableField<String>issue - The issue object to be effected.OrderableField.canRemoveValueFromIssueObject(com.atlassian.jira.issue.Issue),
OrderableField.updateValue(com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem, com.atlassian.jira.issue.Issue, com.atlassian.jira.issue.ModifiedValue, com.atlassian.jira.issue.util.IssueChangeHolder)public boolean canRemoveValueFromIssueObject(Issue issue)
OrderableFieldtrue if a call to OrderableField.removeValueFromIssueObject(com.atlassian.jira.issue.MutableIssue)
will actually remove the value.
There a few different reasons why this method may return false:
canRemoveValueFromIssueObject in interface OrderableField<String>issue - The Issue object.true if a call to OrderableField.removeValueFromIssueObject(com.atlassian.jira.issue.MutableIssue)
will actually remove the value.OrderableField.removeValueFromIssueObject(com.atlassian.jira.issue.MutableIssue)public void populateFromIssue(Map<String,Object> fieldValuesHolder, Issue issue)
OrderableFieldpopulateFromIssue in interface OrderableField<String>populateFromIssue in class AbstractTextSystemFieldfieldValuesHolder - The fieldValuesHolder Map to be populated.issue - The Issue.public boolean isShown(Issue issue)
OrderableFieldisShown in interface OrderableField<String>issue - The Issue.public void validateParams(OperationContext operationContext, ErrorCollection errorCollectionToAddTo, I18nHelper i18n, Issue issue, FieldScreenRenderLayoutItem fieldScreenRenderLayoutItem)
validateParams in interface OrderableField<String>operationContext - OperationContexterrorCollectionToAddTo - ErrorCollectioni18n - I18nHelperissue - IssuefieldScreenRenderLayoutItem - FieldScreenRenderLayoutItempublic String getDefaultValue(Issue issue)
OrderableFieldFor example: The user does not have permission to see the field, or the field is not part of the create screen.
getDefaultValue in interface OrderableField<String>issue - the Issue.public String getColumnHeadingKey()
getColumnHeadingKey in interface NavigableFieldpublic String getDefaultSortOrder()
NavigableFieldgetDefaultSortOrder in interface NavigableFieldNavigableField.ORDER_ASCENDING or NavigableField.ORDER_DESCENDINGpublic LuceneFieldSorter getSorter()
NavigableFieldgetSorter in interface NavigableFieldNavigableField.getSortComparatorSource()DocumentIssueImpl,
MappedSortComparatorpublic List<org.apache.lucene.search.SortField> getSortFields(boolean sortOrder)
NavigableFieldUsing this method allows the field to specify the most performant way to perform a search. If a field can be sorted directly using the term in the index then this should just return a singleton list with the sort field.
return Collections.singletonList(new SortField(fieldName, sortOrder));
The default implementation builds this using the FieldComparatorSource returned by NavigableField.getSortComparatorSource()
If you implement this method there is no need to implement NavigableField.getSortComparatorSource().
getSortFields in interface NavigableFieldgetSortFields in class AbstractOrderableNavigableFieldImpl<String>public boolean isRenderable()
RenderableFieldisRenderable in interface RenderableFieldisRenderable in class AbstractTextSystemFieldpublic String availableForBulkEdit(BulkEditBean bulkEditBean)
OrderableFieldavailableForBulkEdit in interface OrderableField<String>bulkEditBean - holds the state of the bulk-edit wizard (e.g. the selected issues for bulk editing)null if the field is available for bulk-editing or an i18n key of the error message to show as
why the field is not available.public RestFieldOperationsHandler getRestFieldOperation()
getRestFieldOperation in interface RestFieldOperationspublic JsonData getJsonDefaultValue(IssueContext issueCtx)
RestFieldOperationsgetJsonDefaultValue in interface RestFieldOperationsissueCtx - Issue (This should really only need to be an issue context, but for historical reasons we need an issue object.public FieldExportParts getRepresentationFromIssue(Issue issue)
AbstractTextSystemFieldgetRepresentationFromIssue in interface ExportableSystemFieldgetRepresentationFromIssue in class AbstractTextSystemFieldissue - to get representation forCopyright © 2002-2018 Atlassian. All Rights Reserved.