@PublicApi
public interface VersionService
VersionService
Modifier and Type | Interface and Description |
---|---|
static class |
VersionService.AbstractVersionResult |
static class |
VersionService.ArchiveVersionValidationResult |
static class |
VersionService.CreateVersionValidationResult |
static class |
VersionService.MoveVersionValidationResult |
static class |
VersionService.ReasonsServiceResult<R,T>
A generified
ServiceResultImpl that allows Service-specified Reasons to be set as part of the result (in
addition to Reasons specified inside the ErrorCollection . |
static class |
VersionService.ReleaseVersionValidationResult |
static interface |
VersionService.ValidationResult
Represents the results of performing a validation call for a single merge or delete operation.
|
static interface |
VersionService.VersionAction |
static class |
VersionService.VersionBuilder
A builder class to specify a new Version to create or an existing Version to update.
|
static class |
VersionService.VersionBuilderValidationResult
Result object that relates to new VersionService methods that take a
VersionService.VersionBuilder as a parameter. |
static class |
VersionService.VersionResult |
static class |
VersionService.VersionsResult |
Modifier and Type | Field and Description |
---|---|
static VersionService.VersionAction |
REMOVE
Indicates that the
Version should be removed from affected issues. |
Modifier and Type | Method and Description |
---|---|
Version |
archiveVersion(VersionService.ArchiveVersionValidationResult result)
Takes a validation result and performs the archive operation.
|
ServiceOutcome<Version> |
create(ApplicationUser user,
VersionService.VersionBuilderValidationResult validationResult)
Creates a new
Version , based on the validation result from calling validateCreate(User,
VersionBuilder) . |
ServiceOutcome<Version> |
create(com.atlassian.crowd.embedded.api.User user,
VersionService.VersionBuilderValidationResult validationResult)
Deprecated.
Use {@link #create(ApplicationUser user, VersionBuilderValidationResult validationResult) instead.
Since v6.4
|
Version |
createVersion(com.atlassian.crowd.embedded.api.User user,
VersionService.CreateVersionValidationResult request)
|
void |
decreaseVersionSequence(VersionService.MoveVersionValidationResult moveVersionValidationResult)
Move a version to have a higher sequence number - ie make it later.
|
void |
delete(JiraServiceContext context,
VersionService.ValidationResult result)
Deletes a version from a project.
|
long |
getAffectsIssuesCount(Version version)
Return the count of Issues that affect this version.
|
long |
getFixIssuesCount(Version version)
Return the count of Issues Fixed in this version.
|
long |
getUnresolvedIssuesCount(ApplicationUser user,
Version version)
Return the count of Issues that are unresolved in this version.
|
long |
getUnresolvedIssuesCount(com.atlassian.crowd.embedded.api.User user,
Version version)
Deprecated.
Use {@link #getUnresolvedIssuesCount(ApplicationUser user, Version version) instead. Since v6.4
|
VersionService.VersionResult |
getVersionById(ApplicationUser user,
Long versionId)
Used to retrieve a
Version object by version id. |
VersionService.VersionResult |
getVersionById(ApplicationUser user,
Project project,
Long versionId)
|
VersionService.VersionResult |
getVersionById(com.atlassian.crowd.embedded.api.User user,
Long versionId)
Deprecated.
Use
getVersionById(ApplicationUser, Long) instead. Since v6.1.1. |
VersionService.VersionResult |
getVersionById(com.atlassian.crowd.embedded.api.User user,
Project project,
Long versionId)
Deprecated.
Use
getVersionById(ApplicationUser, Project, Long) instead. Since v6.1.1. |
VersionService.VersionResult |
getVersionByProjectAndName(ApplicationUser user,
Project project,
String versionName)
|
VersionService.VersionResult |
getVersionByProjectAndName(com.atlassian.crowd.embedded.api.User user,
Project project,
String versionName)
Deprecated.
Use
getVersionByProjectAndName(ApplicationUser user, Project project, String versionName)
instead. Since v6.4. |
VersionService.VersionsResult |
getVersionsByProject(ApplicationUser user,
Project project)
|
VersionService.VersionsResult |
getVersionsByProject(com.atlassian.crowd.embedded.api.User user,
Project project)
Deprecated.
Use
getVersionsByProject(ApplicationUser user, Project project) instead. Since v6.4. |
void |
increaseVersionSequence(VersionService.MoveVersionValidationResult moveVersionValidationResult)
Move a version to have a lower sequence number - ie make it earlier.
|
boolean |
isOverdue(Version version)
Is the passed version overdue? This method does no permission checks on the passed version.
|
void |
merge(JiraServiceContext context,
VersionService.ValidationResult result)
Merges a version into another, then removes the original version.
|
void |
moveToEndVersionSequence(VersionService.MoveVersionValidationResult moveVersionValidationResult)
Move a version to the end of the version sequence.
|
void |
moveToStartVersionSequence(VersionService.MoveVersionValidationResult moveVersionValidationResult)
Move a version to the start of the version list.
|
void |
moveUnreleasedToNewVersion(ApplicationUser user,
Version currentVersion,
Version newVersion)
Using the validation result from
validateReleaseVersion(User, com.atlassian.jira.project.version.Version,
Date) a version will be released. |
void |
moveUnreleasedToNewVersion(com.atlassian.crowd.embedded.api.User user,
Version currentVersion,
Version newVersion)
Deprecated.
Use {@link #moveUnreleasedToNewVersion(ApplicationUser user, Version currentVersion, Version
newVersion) instead. Since v6.4
|
void |
moveVersionAfter(VersionService.MoveVersionValidationResult moveVersionValidationResult)
Move a version after another version.
|
VersionService.VersionBuilder |
newBuilder()
Creates a builder to be used when creating a new
Version . |
VersionService.VersionBuilder |
newBuilder(Version version)
Creates a builder to be used when updating an existing
Version . |
Version |
releaseVersion(VersionService.ReleaseVersionValidationResult result)
Using the validation result from
validateReleaseVersion(User, com.atlassian.jira.project.version.Version,
Date) a version will be released. |
ServiceOutcome<Version> |
setReleaseDate(com.atlassian.crowd.embedded.api.User user,
Version version,
Date releaseDate)
|
ServiceOutcome<Version> |
setReleaseDate(com.atlassian.crowd.embedded.api.User user,
Version version,
String releaseDate)
|
ServiceOutcome<Version> |
setVersionDetails(com.atlassian.crowd.embedded.api.User user,
Version version,
String name,
String description)
|
Version |
unarchiveVersion(VersionService.ArchiveVersionValidationResult result)
Takes a validation result and performs the unarchive operation.
|
Version |
unreleaseVersion(VersionService.ReleaseVersionValidationResult result)
Using the validation result from
validateUnreleaseVersion(User, com.atlassian.jira.project.version.Version,
Date) a version will be unreleased. |
ServiceOutcome<Version> |
update(ApplicationUser user,
VersionService.VersionBuilderValidationResult validationResult)
Updates the existing
Version , based on the validation result from calling validateUpdate(User,
VersionBuilder) . |
ServiceOutcome<Version> |
update(com.atlassian.crowd.embedded.api.User user,
VersionService.VersionBuilderValidationResult validationResult)
Deprecated.
Use {@link #update(ApplicationUser user, VersionBuilderValidationResult validationResult) instead.
Since v6.4
|
VersionService.ArchiveVersionValidationResult |
validateArchiveVersion(ApplicationUser user,
Version version)
This method should be called before archiving a version.
|
VersionService.ArchiveVersionValidationResult |
validateArchiveVersion(com.atlassian.crowd.embedded.api.User user,
Version version)
Deprecated.
Use {@link #validateArchiveVersion(ApplicationUser user, Version version) instead. Since v6.4
|
VersionService.VersionBuilderValidationResult |
validateCreate(ApplicationUser user,
VersionService.VersionBuilder versionBuilder)
Validates the creation of a new
Version object, specified with a VersionService.VersionBuilder . |
VersionService.VersionBuilderValidationResult |
validateCreate(com.atlassian.crowd.embedded.api.User user,
VersionService.VersionBuilder versionBuilder)
Deprecated.
Use {@link #validateCreate(ApplicationUser user, VersionBuilder versionBuilder) instead. Since v6.4
|
VersionService.CreateVersionValidationResult |
validateCreateVersion(com.atlassian.crowd.embedded.api.User user,
Project project,
String versionName,
Date releaseDate,
String description,
Long scheduleAfterVersion)
|
VersionService.CreateVersionValidationResult |
validateCreateVersion(com.atlassian.crowd.embedded.api.User user,
Project project,
String versionName,
String releaseDate,
String description,
Long scheduleAfterVersion)
|
VersionService.MoveVersionValidationResult |
validateDecreaseVersionSequence(ApplicationUser user,
long versionId)
Validate Move a version to have a higher sequence number - ie make it later.
|
VersionService.MoveVersionValidationResult |
validateDecreaseVersionSequence(com.atlassian.crowd.embedded.api.User user,
long versionId)
Deprecated.
Use {@link #validateDecreaseVersionSequence(ApplicationUser user, long versionId) instead. Since v6.4
|
VersionService.ValidationResult |
validateDelete(JiraServiceContext context,
Long versionId,
VersionService.VersionAction affectsAction,
VersionService.VersionAction fixAction)
Validates an attempt to delete a version from a project.
|
VersionService.MoveVersionValidationResult |
validateIncreaseVersionSequence(ApplicationUser user,
long versionId)
Validate Move a version to have a lower sequence number - ie make it earlier.
|
VersionService.MoveVersionValidationResult |
validateIncreaseVersionSequence(com.atlassian.crowd.embedded.api.User user,
long versionId)
Deprecated.
Use {@link #validateIncreaseVersionSequence(ApplicationUser user, long versionId) instead. Since v6.4
|
VersionService.ValidationResult |
validateMerge(JiraServiceContext context,
Long versionId,
Long swapVersionId)
Validates an attempt to merge a version into another.
|
VersionService.MoveVersionValidationResult |
validateMoveToEndVersionSequence(ApplicationUser user,
long versionId)
Validate Move a version to the end of the version sequence.
|
VersionService.MoveVersionValidationResult |
validateMoveToEndVersionSequence(com.atlassian.crowd.embedded.api.User user,
long versionId)
Deprecated.
Use {@link #validateMoveToEndVersionSequence(ApplicationUser user, long versionId) instead. Since
v6.4
|
VersionService.MoveVersionValidationResult |
validateMoveToStartVersionSequence(ApplicationUser user,
long versionId)
Validate Move a version to the start of the version list.
|
VersionService.MoveVersionValidationResult |
validateMoveToStartVersionSequence(com.atlassian.crowd.embedded.api.User user,
long versionId)
Deprecated.
Use {@link #validateMoveToStartVersionSequence(ApplicationUser user, long versionId) instead. Since
v6.4
|
VersionService.MoveVersionValidationResult |
validateMoveVersionAfter(ApplicationUser user,
long versionId,
Long scheduleAfterVersion)
Validate Move a version after another version.
|
VersionService.MoveVersionValidationResult |
validateMoveVersionAfter(com.atlassian.crowd.embedded.api.User user,
long versionId,
Long scheduleAfterVersion)
Deprecated.
Use {@link #validateMoveVersionAfter(ApplicationUser user, long versionId, Long scheduleAfterVersion)
instead. Since v6.4
|
ServiceOutcome<Version> |
validateReleaseDate(com.atlassian.crowd.embedded.api.User user,
Version version,
String releaseDate)
|
VersionService.ReleaseVersionValidationResult |
validateReleaseVersion(ApplicationUser user,
Version version,
Date releaseDate)
This method needs to be called before releasing a version to ensure all parameters are correct.
|
VersionService.ReleaseVersionValidationResult |
validateReleaseVersion(ApplicationUser user,
Version version,
String releaseDate)
This method needs to be called before releasing a version to ensure all parameters are correct.
|
VersionService.ReleaseVersionValidationResult |
validateReleaseVersion(com.atlassian.crowd.embedded.api.User user,
Version version,
Date releaseDate)
Deprecated.
Use {@link #validateReleaseVersion(ApplicationUser user, Version version, Date releaseDate) instead.
Since v6.4
|
VersionService.ReleaseVersionValidationResult |
validateReleaseVersion(com.atlassian.crowd.embedded.api.User user,
Version version,
String releaseDate)
Deprecated.
Use {@link #validateReleaseVersion(ApplicationUser user, Version version, String releaseDate)
instead. Since v6.4
|
VersionService.ArchiveVersionValidationResult |
validateUnarchiveVersion(ApplicationUser user,
Version version)
This method should be called before unarchiving a version.
|
VersionService.ArchiveVersionValidationResult |
validateUnarchiveVersion(com.atlassian.crowd.embedded.api.User user,
Version version)
Deprecated.
Use {@link #validateUnarchiveVersion(ApplicationUser user, Version version) instead. Since v6.4
|
VersionService.ReleaseVersionValidationResult |
validateUnreleaseVersion(ApplicationUser user,
Version version,
Date releaseDate)
This method needs to be called before unreleasing a version to ensure all parameters are correct.
|
VersionService.ReleaseVersionValidationResult |
validateUnreleaseVersion(ApplicationUser user,
Version version,
String releaseDate)
This method needs to be called before unreleasing a version to ensure all parameters are correct.
|
VersionService.ReleaseVersionValidationResult |
validateUnreleaseVersion(com.atlassian.crowd.embedded.api.User user,
Version version,
Date releaseDate)
Deprecated.
Use {@link #validateUnreleaseVersion(ApplicationUser user, Version version, Date releaseDate)
instead. Since v6.4
|
VersionService.ReleaseVersionValidationResult |
validateUnreleaseVersion(com.atlassian.crowd.embedded.api.User user,
Version version,
String releaseDate)
Deprecated.
Use {@link #validateUnreleaseVersion(ApplicationUser user, Version version, String releaseDate)
instead. Since v6.4
|
VersionService.VersionBuilderValidationResult |
validateUpdate(ApplicationUser user,
VersionService.VersionBuilder versionBuilder)
Validates the update of an existing
Version object, specified with a VersionService.VersionBuilder . |
VersionService.VersionBuilderValidationResult |
validateUpdate(com.atlassian.crowd.embedded.api.User user,
VersionService.VersionBuilder versionBuilder)
Deprecated.
Use {@link #validateUpdate(ApplicationUser user, VersionBuilder versionBuilder) instead. Since v6.4
|
ErrorCollection |
validateVersionDetails(com.atlassian.crowd.embedded.api.User user,
Version version,
String name,
String description)
|
static final VersionService.VersionAction REMOVE
Version
should be removed from affected issues.@Deprecated ErrorCollection validateVersionDetails(com.atlassian.crowd.embedded.api.User user, Version version, String name, String description)
validateUpdate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
.
Since v6.4user
- the user who is performing the edit operationversion
- the version that they want to editname
- the new name for the version (must not be null or already in use)description
- the new description for the versionIllegalArgumentException
- if the name is null or duplicates an existing name@Deprecated ServiceOutcome<Version> setVersionDetails(com.atlassian.crowd.embedded.api.User user, Version version, String name, String description)
validateUpdate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
.
Since v6.4user
- the user who is performing the edit operationversion
- the version that they want to editname
- the new name for the version (must not be null or already in use)description
- the new description for the versionIllegalArgumentException
- if the name is null or duplicates an existing name@Deprecated ServiceOutcome<Version> setReleaseDate(com.atlassian.crowd.embedded.api.User user, Version version, Date releaseDate)
validateUpdate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
.
Since v6.4user
- the user who is changing the release dateversion
- the version they want to modifyreleaseDate
- the new release date to use@Deprecated ServiceOutcome<Version> validateReleaseDate(com.atlassian.crowd.embedded.api.User user, Version version, String releaseDate)
validateUpdate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
.
Since v6.4user
- the user who is changing the release dateversion
- the version they want to modifyreleaseDate
- the new release date to use@Deprecated ServiceOutcome<Version> setReleaseDate(com.atlassian.crowd.embedded.api.User user, Version version, String releaseDate)
validateUpdate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
.
Since v6.4user
- the user who is changing the release dateversion
- the version they want to modifyreleaseDate
- the new release date to useVersionService.ValidationResult validateDelete(JiraServiceContext context, Long versionId, VersionService.VersionAction affectsAction, VersionService.VersionAction fixAction)
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
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
void delete(JiraServiceContext context, VersionService.ValidationResult result)
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 fieldsVersionService.ValidationResult validateMerge(JiraServiceContext context, Long versionId, Long swapVersionId)
VersionKeys.SWAP_ACTION
.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.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
void merge(JiraServiceContext context, VersionService.ValidationResult result)
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@Deprecated VersionService.VersionResult getVersionById(com.atlassian.crowd.embedded.api.User user, Project project, Long versionId)
getVersionById(ApplicationUser, Project, Long)
instead. Since v6.1.1.VersionService.VersionResult getVersionById(ApplicationUser user, Project project, Long versionId)
Version
object by version id within project
specified by Project
object. This method returns a VersionService.VersionResult
. The version will be null if no version for
the id specified can be found, or if the user making the request does not have the ADMIN, PROJECT_ADMIN or BROWSE
project permission for the project. In both of these cases, the errorCollection in the result object will contain
an appropriate error message.user
- The user trying to get a versionproject
- The project object containing requested versionversionId
- The id of requested version@Deprecated VersionService.VersionResult getVersionById(com.atlassian.crowd.embedded.api.User user, Long versionId)
getVersionById(ApplicationUser, Long)
instead. Since v6.1.1.VersionService.VersionResult getVersionById(ApplicationUser user, Long versionId)
Version
object by version id. This method returns a
VersionService.VersionResult
. The version will be null if no
version for the id specified can be found, or if the user making the request does not have the ADMIN,
PROJECT_ADMIN or BROWSE project permission for the project. In both of these cases, the errorCollection in the
result object will contain an appropriate error message.user
- The user trying to get a versionversionId
- The id of requested version@Deprecated VersionService.VersionResult getVersionByProjectAndName(com.atlassian.crowd.embedded.api.User user, Project project, String versionName)
getVersionByProjectAndName(ApplicationUser user, Project project, String versionName)
instead. Since v6.4.@Nonnull VersionService.VersionResult getVersionByProjectAndName(@Nullable ApplicationUser user, @Nonnull Project project, @Nonnull String versionName)
Version
object by version name within project
specified by Project
object. This method returns a VersionService.VersionResult
. The version will be null if no version for
the versionName specified can be found, or if the user making the request does not have the ADMIN, PROJECT_ADMIN
or BROWSE project permission for the project. In both of these cases, the errorCollection in the result object
will contain an appropriate error message.user
- The user trying to get a versionproject
- The project object containing requested versionversionName
- The name of requested version@Deprecated VersionService.VersionsResult getVersionsByProject(com.atlassian.crowd.embedded.api.User user, Project project)
getVersionsByProject(ApplicationUser user, Project project)
instead. Since v6.4.@Nonnull VersionService.VersionsResult getVersionsByProject(@Nullable ApplicationUser user, @Nonnull Project project)
Version
collection within project specified by
Project
object. This method returns a VersionService.VersionsResult
. The versions collection will be empty if
the user making the request does not have the ADMIN, PROJECT_ADMIN or BROWSE project permission for the project.
In this case, the errorCollection in the result object will contain an appropriate error message.user
- The user trying to get a versionproject
- The project object containing requested version@Deprecated VersionService.CreateVersionValidationResult validateCreateVersion(com.atlassian.crowd.embedded.api.User user, Project project, String versionName, String releaseDate, String description, Long scheduleAfterVersion)
validateCreate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
and create(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilderValidationResult)
.
Since v6.4.VersionService.CreateVersionValidationResult
which contains an ErrorCollection with any potential errors and all the version's details.user
- The user trying to create a versionproject
- The project object containing requested versionversionName
- The name of created versionreleaseDate
- The release date for a version (optional)description
- The description for a version (optional)scheduleAfterVersion
- The version after which created version should be scheduled (optional)@Deprecated VersionService.CreateVersionValidationResult validateCreateVersion(com.atlassian.crowd.embedded.api.User user, Project project, String versionName, Date releaseDate, String description, Long scheduleAfterVersion)
validateCreate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
and create(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilderValidationResult)
.
Since v6.4VersionService.CreateVersionValidationResult
which contains an ErrorCollection with any potential errors and all the version's details.user
- The user trying to create a versionproject
- The project object containing requested versionversionName
- The name of created versionreleaseDate
- The release date for a version (optional)description
- The description for a version (optional)scheduleAfterVersion
- The version after which created version should be scheduled (optional)@Deprecated Version createVersion(com.atlassian.crowd.embedded.api.User user, VersionService.CreateVersionValidationResult request)
validateCreate(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
and create(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.bc.project.version.VersionService.VersionBuilderValidationResult)
.
Since v6.4validateCreateVersion(User, com.atlassian.jira.project.Project, String,
String, String, Long)
a new version will be created. This method will throw an RuntimeException if the version
could not be created.user
- The user trying to get a versionrequest
- The VersionService.CreateVersionValidationResult
object containing all required data@Deprecated VersionService.ReleaseVersionValidationResult validateReleaseVersion(com.atlassian.crowd.embedded.api.User user, Version version, Date releaseDate)
@Nonnull VersionService.ReleaseVersionValidationResult validateReleaseVersion(@Nullable ApplicationUser user, @Nonnull Version version, @Nullable Date releaseDate)
VersionService.ReleaseVersionValidationResult
which contains an ErrorCollection with any potential errors and all the version's details.user
- The user trying to release a versionversion
- The version to releasereleaseDate
- The version release date (optional)@Deprecated VersionService.ReleaseVersionValidationResult validateReleaseVersion(com.atlassian.crowd.embedded.api.User user, Version version, String releaseDate)
@Nonnull VersionService.ReleaseVersionValidationResult validateReleaseVersion(@Nullable ApplicationUser user, @Nonnull Version version, @Nonnull String releaseDate)
VersionService.ReleaseVersionValidationResult
which contains an ErrorCollection with any potential errors and all the version's details.user
- The user trying to release a versionversion
- The version to releasereleaseDate
- The version release date (optional)@Deprecated VersionService.ReleaseVersionValidationResult validateUnreleaseVersion(com.atlassian.crowd.embedded.api.User user, Version version, Date releaseDate)
@Nonnull VersionService.ReleaseVersionValidationResult validateUnreleaseVersion(@Nullable ApplicationUser user, @Nonnull Version version, @Nullable Date releaseDate)
VersionService.ReleaseVersionValidationResult
which contains an ErrorCollection with any potential errors and all the version's details.user
- The user trying to unrelease a versionversion
- The version to releasereleaseDate
- The version release date (optional)@Deprecated VersionService.ReleaseVersionValidationResult validateUnreleaseVersion(com.atlassian.crowd.embedded.api.User user, Version version, String releaseDate)
@Nonnull VersionService.ReleaseVersionValidationResult validateUnreleaseVersion(@Nullable ApplicationUser user, @Nonnull Version version, @Nonnull String releaseDate)
VersionService.ReleaseVersionValidationResult
which contains an ErrorCollection with any potential errors and all the version's details.user
- The user trying to unrelease a versionversion
- The version to releasereleaseDate
- The version release date (optional)Version releaseVersion(VersionService.ReleaseVersionValidationResult result)
validateReleaseVersion(User, com.atlassian.jira.project.version.Version,
Date)
a version will be released. This method will throw an IllegalArgumentException if the provied data are
invalid and version could not be released.result
- a ReleaseVersionValidationResult containg required data@Deprecated void moveUnreleasedToNewVersion(com.atlassian.crowd.embedded.api.User user, Version currentVersion, Version newVersion)
void moveUnreleasedToNewVersion(@Nullable ApplicationUser user, @Nonnull Version currentVersion, @Nonnull Version newVersion)
validateReleaseVersion(User, com.atlassian.jira.project.version.Version,
Date)
a version will be released. This method will throw an IllegalArgumentException if the provided data are
invalid and version could not be released.user
- The user trying to release a versioncurrentVersion
- The current version being released.newVersion
- The version to move issues to.Version unreleaseVersion(VersionService.ReleaseVersionValidationResult result)
validateUnreleaseVersion(User, com.atlassian.jira.project.version.Version,
Date)
a version will be unreleased. This method will throw an IllegalArgumentException if the provied data are
invalid and version could not be unreleased.result
- a ReleaseVersionValidationResult containg required data@Deprecated VersionService.ArchiveVersionValidationResult validateArchiveVersion(com.atlassian.crowd.embedded.api.User user, Version version)
@Nonnull VersionService.ArchiveVersionValidationResult validateArchiveVersion(@Nullable ApplicationUser user, @Nonnull Version version)
user
- The user performing this operationversion
- The version to be archived@Deprecated VersionService.ArchiveVersionValidationResult validateUnarchiveVersion(com.atlassian.crowd.embedded.api.User user, Version version)
@Nonnull VersionService.ArchiveVersionValidationResult validateUnarchiveVersion(@Nullable ApplicationUser user, @Nonnull Version version)
user
- The user performing this operationversion
- The version to be archivedVersion archiveVersion(VersionService.ArchiveVersionValidationResult result)
result
- The result from the validationIllegalStateException
- if the result passed in is not valid.Version unarchiveVersion(VersionService.ArchiveVersionValidationResult result)
result
- The result from the validationIllegalStateException
- if the result passed in is not valid.boolean isOverdue(Version version)
version
- the version to check.@Deprecated VersionService.MoveVersionValidationResult validateMoveToStartVersionSequence(com.atlassian.crowd.embedded.api.User user, long versionId)
@Nonnull VersionService.MoveVersionValidationResult validateMoveToStartVersionSequence(@Nullable ApplicationUser user, long versionId)
user
- The user trying to move a version@Deprecated VersionService.MoveVersionValidationResult validateIncreaseVersionSequence(com.atlassian.crowd.embedded.api.User user, long versionId)
@Nonnull VersionService.MoveVersionValidationResult validateIncreaseVersionSequence(@Nullable ApplicationUser user, long versionId)
user
- The user trying to move a version@Deprecated VersionService.MoveVersionValidationResult validateDecreaseVersionSequence(com.atlassian.crowd.embedded.api.User user, long versionId)
@Nonnull VersionService.MoveVersionValidationResult validateDecreaseVersionSequence(@Nullable ApplicationUser user, long versionId)
user
- The user trying to move a version@Deprecated VersionService.MoveVersionValidationResult validateMoveToEndVersionSequence(com.atlassian.crowd.embedded.api.User user, long versionId)
@Nonnull VersionService.MoveVersionValidationResult validateMoveToEndVersionSequence(@Nullable ApplicationUser user, long versionId)
user
- The user trying to move a version@Deprecated VersionService.MoveVersionValidationResult validateMoveVersionAfter(com.atlassian.crowd.embedded.api.User user, long versionId, Long scheduleAfterVersion)
VersionService.MoveVersionValidationResult validateMoveVersionAfter(@Nullable ApplicationUser user, long versionId, @Nonnull Long scheduleAfterVersion)
user
- The user trying to move a versionversionId
- version to reschedulescheduleAfterVersion
- id of the version to schedule after the given version objectvoid moveToStartVersionSequence(VersionService.MoveVersionValidationResult moveVersionValidationResult)
moveVersionValidationResult
- Move Version Validation Resultvoid increaseVersionSequence(VersionService.MoveVersionValidationResult moveVersionValidationResult)
moveVersionValidationResult
- Move Version Validation Resultvoid decreaseVersionSequence(VersionService.MoveVersionValidationResult moveVersionValidationResult)
moveVersionValidationResult
- Move Version Validation Resultvoid moveToEndVersionSequence(VersionService.MoveVersionValidationResult moveVersionValidationResult)
moveVersionValidationResult
- Move Version Validation Resultvoid moveVersionAfter(VersionService.MoveVersionValidationResult moveVersionValidationResult)
moveVersionValidationResult
- Move Version Validation Resultlong getFixIssuesCount(Version version)
long getAffectsIssuesCount(Version version)
@Deprecated long getUnresolvedIssuesCount(com.atlassian.crowd.embedded.api.User user, Version version)
long getUnresolvedIssuesCount(@Nullable ApplicationUser user, @Nonnull Version version)
user
- the user trying to get the countversion
- which version to check for unresolved issuesVersionService.VersionBuilder newBuilder()
Version
. The builder encapsulates all the fields which
need to be specified on create.for updating an existing version
VersionService.VersionBuilder newBuilder(Version version)
Version
. The builder encapsulates all the fields
which need to be specified on update.version
- the Version object to updatefor creating a new version
@Deprecated VersionService.VersionBuilderValidationResult validateCreate(com.atlassian.crowd.embedded.api.User user, VersionService.VersionBuilder versionBuilder)
Version
object, specified with a VersionService.VersionBuilder
.
This replaces the deprecated methods: validateCreateVersion(User, Project, String, Date, String, Long)
and validateCreateVersion(User, Project, String, String, String, Long)
.user
- the user who is performing the createversionBuilder
- the builder which specified the new Version to be creatednewBuilder()
@Nonnull VersionService.VersionBuilderValidationResult validateCreate(@Nullable ApplicationUser user, @Nonnull VersionService.VersionBuilder versionBuilder)
Version
object, specified with a VersionService.VersionBuilder
.
This replaces the deprecated methods: validateCreateVersion(User, Project, String, Date, String, Long)
and validateCreateVersion(User, Project, String, String, String, Long)
.user
- the user who is performing the createversionBuilder
- the builder which specified the new Version to be creatednewBuilder()
@Deprecated ServiceOutcome<Version> create(com.atlassian.crowd.embedded.api.User user, VersionService.VersionBuilderValidationResult validationResult)
Version
, based on the validation result from calling validateCreate(User,
VersionBuilder)
.user
- the uservalidationResult
- the result of validationvalidateCreate(com.atlassian.crowd.embedded.api.User, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
@Nonnull ServiceOutcome<Version> create(@Nullable ApplicationUser user, @Nonnull VersionService.VersionBuilderValidationResult validationResult)
Version
, based on the validation result from calling validateCreate(User,
VersionBuilder)
.user
- the user // Actually is not usedvalidationResult
- the result of validationvalidateCreate(com.atlassian.crowd.embedded.api.User, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
@Deprecated VersionService.VersionBuilderValidationResult validateUpdate(com.atlassian.crowd.embedded.api.User user, VersionService.VersionBuilder versionBuilder)
Version
object, specified with a VersionService.VersionBuilder
.
This replaces the deprecated methods: validateReleaseDate(User, Version, String)
and validateVersionDetails(User, Version, String, String)
.user
- the user who is performing the updateversionBuilder
- the builder which specified the update to the existing VersionnewBuilder(com.atlassian.jira.project.version.Version)
@Nonnull VersionService.VersionBuilderValidationResult validateUpdate(@Nullable ApplicationUser user, @Nonnull VersionService.VersionBuilder versionBuilder)
Version
object, specified with a VersionService.VersionBuilder
.
This replaces the deprecated methods: validateReleaseDate(User, Version, String)
and validateVersionDetails(User, Version, String, String)
.user
- the user who is performing the updateversionBuilder
- the builder which specified the update to the existing VersionnewBuilder(com.atlassian.jira.project.version.Version)
ServiceOutcome<Version> update(ApplicationUser user, VersionService.VersionBuilderValidationResult validationResult)
Version
, based on the validation result from calling validateUpdate(User,
VersionBuilder)
.user
- the uservalidationResult
- the result of validationvalidateUpdate(com.atlassian.crowd.embedded.api.User, com.atlassian.jira.bc.project.version.VersionService.VersionBuilder)
@Deprecated ServiceOutcome<Version> update(com.atlassian.crowd.embedded.api.User user, VersionService.VersionBuilderValidationResult validationResult)
Copyright © 2002-2015 Atlassian. All Rights Reserved.