com.atlassian.jira.issue.fields
Class AffectedVersionsSystemField
java.lang.Object
com.atlassian.jira.issue.fields.AbstractField
com.atlassian.jira.issue.fields.AbstractOrderableField
com.atlassian.jira.issue.fields.AbstractOrderableNavigableFieldImpl
com.atlassian.jira.issue.fields.AbstractVersionsSystemField
com.atlassian.jira.issue.fields.AffectedVersionsSystemField
- All Implemented Interfaces:
- AffectedVersionsField, Field, HideableField, NavigableField, OrderableField, RequirableField, RestAwareField, RestFieldOperations, SearchableField, Comparable
public class AffectedVersionsSystemField
- extends AbstractVersionsSystemField
- implements AffectedVersionsField, RestFieldOperations
Copyright (c) 2002-2004
All rights reserved.
Methods inherited from class com.atlassian.jira.issue.fields.AbstractVersionsSystemField |
addViewVelocityParams, availableForBulkEdit, createValue, getBulkEditHtml, getColumnViewHtml, getCreateHtml, getCurrentVersionIds, getDefaultSortOrder, getEditHtml, getFieldTypeInfo, getJsonFromIssue, getJsonSchema, getPossibleVersions, getRelevantParams, getValueFromParams, getVersionManager, getViewHtml, getViewHtml, hasValue, needsMove, populateDefaults, populateForMove, populateFromIssue, populateParamsFromString, updateValue, validateParams |
Methods inherited from class com.atlassian.jira.issue.fields.AbstractOrderableField |
createAssociatedSearchHandler, getApplicationProperties, getCreateHtml, getEditHtml, getPermissionManager, getVelocityParams, getVelocityParams, getViewHtml, hasBulkUpdatePermission, hasParam, hasPermission, isHidden, populateFromParams, rendererTypesEqual, renderTemplate, valuesEqual |
Methods inherited from interface com.atlassian.jira.issue.fields.OrderableField |
availableForBulkEdit, createValue, getBulkEditHtml, getCreateHtml, getCreateHtml, getEditHtml, getEditHtml, getValueFromParams, getViewHtml, getViewHtml, getViewHtml, hasParam, hasValue, needsMove, populateDefaults, populateForMove, populateFromIssue, populateFromParams, populateParamsFromString, updateValue, validateParams |
AffectedVersionsSystemField
public AffectedVersionsSystemField(VelocityTemplatingEngine templatingEngine,
ApplicationProperties applicationProperties,
VersionManager versionManager,
PermissionManager permissionManager,
JiraAuthenticationContext authenticationContext,
RaisedInVersionStatisticsMapper raisedInVersionStatsMapper,
VersionHelperBean versionHelperBean,
AffectedVersionSearchHandlerFactory searchHandlerFactory,
JiraBaseUrls jiraBaseUrls)
isShown
public boolean isShown(Issue issue)
- Description copied from interface:
OrderableField
- Tests field specific way to determine if it should be shown or not.
- Specified by:
isShown
in interface OrderableField
- Parameters:
issue
- The Issue.
- Returns:
- true if it should be shown.
getCurrentVersions
protected Collection<Version> getCurrentVersions(Issue issue)
- Specified by:
getCurrentVersions
in class AbstractVersionsSystemField
getArchivedVersionsFieldTitle
protected String getArchivedVersionsFieldTitle()
- Specified by:
getArchivedVersionsFieldTitle
in class AbstractVersionsSystemField
getArchivedVersionsFieldSearchParam
protected String getArchivedVersionsFieldSearchParam()
- Specified by:
getArchivedVersionsFieldSearchParam
in class AbstractVersionsSystemField
getUnreleasedVersionsFirst
protected boolean getUnreleasedVersionsFirst()
- Specified by:
getUnreleasedVersionsFirst
in class AbstractVersionsSystemField
addFieldRequiredErrorMessage
protected void addFieldRequiredErrorMessage(Issue issue,
ErrorCollection errorCollection,
I18nHelper i18n)
- Specified by:
addFieldRequiredErrorMessage
in class AbstractVersionsSystemField
getColumnHeadingKey
public String getColumnHeadingKey()
- Specified by:
getColumnHeadingKey
in interface NavigableField
getSorter
public LuceneFieldSorter getSorter()
- Description copied from interface:
NavigableField
- A sorter to be used when sorting columns in a table. This sort uses the Lucene Document Collection
and is therefore a lot faster than sorting the issues in memory.
- Specified by:
getSorter
in interface NavigableField
- Returns:
- A sorter that can be used to sort this field, or null depending on the value of
NavigableField.getSortComparatorSource()
- See Also:
DocumentIssueImpl
,
MappedSortComparator
getIssueRelationName
protected String getIssueRelationName()
- Specified by:
getIssueRelationName
in class AbstractVersionsSystemField
getChangeItemFieldName
protected String getChangeItemFieldName()
- Specified by:
getChangeItemFieldName
in class AbstractVersionsSystemField
getModifiedWithoutPermissionErrorMessage
protected String getModifiedWithoutPermissionErrorMessage(I18nHelper i18n)
- Specified by:
getModifiedWithoutPermissionErrorMessage
in class AbstractVersionsSystemField
getDefaultValue
public Object getDefaultValue(Issue issue)
- Description copied from interface:
OrderableField
- The value that should be set on the issue if the field is not shown for some reason.
For example: The user does not have permission to see the field, or the field is not part of the create screen.
- Specified by:
getDefaultValue
in interface OrderableField
- Overrides:
getDefaultValue
in class AbstractVersionsSystemField
- Parameters:
issue
- the Issue.
- Returns:
- The default Value.
updateIssue
public void updateIssue(FieldLayoutItem fieldLayoutItem,
MutableIssue issue,
Map fieldValueHolder)
- Description copied from interface:
OrderableField
- Record the value on the issue (not saving it to the database, see updateValue).
- Specified by:
updateIssue
in interface OrderableField
- Parameters:
fieldLayoutItem
- FieldLayoutItemissue
- MutableIssuefieldValueHolder
- Field Value Holder Map- See Also:
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)
removeValueFromIssueObject
public void removeValueFromIssueObject(MutableIssue issue)
- Description copied from interface:
OrderableField
- Removes the field value from the given MutableIssue object.
Note 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.
- Specified by:
removeValueFromIssueObject
in interface OrderableField
- Parameters:
issue
- The issue object to be effected.- See Also:
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)
canRemoveValueFromIssueObject
public boolean canRemoveValueFromIssueObject(Issue issue)
- Description copied from interface:
OrderableField
- Returns
true
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:
- The OrderableField can sometimes remove the value, but it decides that it is not relevant for this Issue.
eg: Security Level will ignore remove requests on a subtask, as the subtask Security is not set explicitly
(it is always inherited from its parent issue).
- It may possible to remove this value, but the OrderableField does not actually do the job, it is done through
some special mechanism. eg Attachments.
- This field is some special system field which it is invalid to remove. eg Project. In these cases calling
removeValueFromIssueObject() would normally raise an UnsupportedOperationException.
In general it is safe to call removeValueFromIssueObject() even if this method returns false, as the request will
be silently ignored.
However there are a couple of special fields where calling removeValueFromIssueObject() will throw an
UnsupportedOperationException - eg if you try to remove the Project.
- Specified by:
canRemoveValueFromIssueObject
in interface OrderableField
- Parameters:
issue
- The Issue object.
- Returns:
true
if a call to OrderableField.removeValueFromIssueObject(com.atlassian.jira.issue.MutableIssue)
will actually remove the value.- See Also:
OrderableField.removeValueFromIssueObject(com.atlassian.jira.issue.MutableIssue)
getRestFieldOperation
public RestFieldOperationsHandler getRestFieldOperation()
- Specified by:
getRestFieldOperation
in interface RestFieldOperations
- Returns:
- the RestFieldOperationsHandler for this field.
getJsonDefaultValue
public JsonData getJsonDefaultValue(IssueContext issueCtx)
- Description copied from interface:
RestFieldOperations
- Return The default data for this system field.
May be null if there is no default.
- Specified by:
getJsonDefaultValue
in interface RestFieldOperations
- Parameters:
issueCtx
- Issue (This should really only need to be an issue context, but for historical reasons we need an issue object.
Copyright © 2002-2013 Atlassian. All Rights Reserved.