com.atlassian.jira.bc.project.version
Class DefaultVersionService
java.lang.Object
com.atlassian.jira.bc.project.version.DefaultVersionService
- All Implemented Interfaces:
- VersionService
public class DefaultVersionService
- extends Object
- implements VersionService
- Since:
- v3.13
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultVersionService
public DefaultVersionService(VersionManager versionManager,
PermissionManager permissionManager,
IssueManager issueManager,
CacheManager cacheManager,
IssueIndexManager issueIndexManager,
IssueFactory issueFactory)
validateDelete
public VersionService.ValidationResult validateDelete(JiraServiceContext context,
Long versionId,
VersionService.VersionAction affectsAction,
VersionService.VersionAction fixAction)
- Description copied from interface:
VersionService
- Validates an attempt to delete a version from a project. When deleting a version, we need to decide what to do
with issues that reference the version in their Affects of Fix Version fields. The action taken is specified as a
flag for each field.
- Specified by:
validateDelete
in interface VersionService
- Parameters:
context
- The context for this service call.versionId
- The id of the version to be deleted.affectsAction
- Used to decide whether to move all the issues to a different 'affects' version or just remove them. See VersionKeys.REMOVE_ACTION
, VersionKeys.SWAP_ACTION
fixAction
- Used to decide wether to move all the issues to a different 'fix' version or just remove them. See VersionKeys.REMOVE_ACTION
, VersionKeys.SWAP_ACTION
- Returns:
- a
VersionService.ValidationResult
object which contains the version to delete, and the versions to swap to for Affects and Fix versions, or null if the action to be taken is VersionKeys.REMOVE_ACTION
delete
public void delete(JiraServiceContext context,
VersionService.ValidationResult result)
- Description copied from interface:
VersionService
- Deletes a version from a project. When deleting a version, we need to decide what to do with issues that reference
the version in their Affects of Fix Version fields. The action taken is specified as a flag for each field.
- Specified by:
delete
in interface VersionService
- Parameters:
context
- The context for this service call.result
- The result of validation, which contains the version to be deleted, and the swap versions for Affects and Fix fields
validateMerge
public VersionService.ValidationResult validateMerge(JiraServiceContext context,
Long versionId,
Long swapVersionId)
- Implementation is the same as deleting, with the actions set to SWAP and the swapVersionId being
passed as both Affects Version swap and Fix Version swap
- Specified by:
validateMerge
in interface VersionService
- Parameters:
context
- The context for this service call.versionId
- The original version to be merged and removed.swapVersionId
- The target version of the merge operation. Must be from the same project.
- Returns:
- a
VersionService.ValidationResult
object which contains the version to delete, and the versions to swap to for Affects and Fix versions, or null if the action to be taken is VersionKeys.REMOVE_ACTION
merge
public void merge(JiraServiceContext context,
VersionService.ValidationResult result)
- Description copied from interface:
VersionService
- Merges a version into another, then removes the original version.
- Specified by:
merge
in interface VersionService
- Parameters:
context
- The context for this service call.result
- The result of validation, which contains the version to be deleted, and the swap versions for Affects and Fix fields
Copyright © 2002-2008 Atlassian. All Rights Reserved.