|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface VersionService
Service for VersionService
Nested Class Summary | |
---|---|
static class |
VersionService.AbstractVersionResult
|
static class |
VersionService.ArchiveVersionValidationResult
|
static class |
VersionService.CreateVersionValidationResult
|
static class |
VersionService.MoveVersionValidationResult
|
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.VersionResult
|
static class |
VersionService.VersionsResult
|
Field Summary | |
---|---|
static VersionService.VersionAction |
REMOVE
Indicates that the Version should be removed from affected issues. |
Method Summary | |
---|---|
Version |
archiveVersion(VersionService.ArchiveVersionValidationResult result)
Takes a validation result and performs the archive operation. |
Version |
createVersion(com.atlassian.crowd.embedded.api.User user,
VersionService.CreateVersionValidationResult request)
Using the validation result from validateCreateVersion(User, com.atlassian.jira.project.Project,
String, String, String, Long) a new version will be created. |
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(com.atlassian.crowd.embedded.api.User user,
Version version)
Return the count of Issues that are unresolved in this version. |
VersionService.VersionResult |
getVersionById(com.atlassian.crowd.embedded.api.User user,
Long versionId)
Used to retrieve a Version object by version id. |
VersionService.VersionResult |
getVersionById(com.atlassian.crowd.embedded.api.User user,
Project project,
Long versionId)
Used to retrieve a Version object by version id within project
specified by Project object. |
VersionService.VersionResult |
getVersionByProjectAndName(com.atlassian.crowd.embedded.api.User user,
Project project,
String versionName)
Used to retrieve a Version object by version name within project
specified by Project object. |
VersionService.VersionsResult |
getVersionsByProject(com.atlassian.crowd.embedded.api.User user,
Project project)
Used to retrieve a Version collection within project
specified by Project object. |
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(com.atlassian.crowd.embedded.api.User 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 |
moveVersionAfter(VersionService.MoveVersionValidationResult moveVersionValidationResult)
Move a version after another 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)
Modify the release date of a version without performing a release/unrelease. |
ServiceOutcome<Version> |
setReleaseDate(com.atlassian.crowd.embedded.api.User user,
Version version,
String releaseDate)
Modify the release date of a version without performing a release/unrelease. |
ServiceOutcome<Version> |
setVersionDetails(com.atlassian.crowd.embedded.api.User user,
Version version,
String name,
String description)
Set the name and description of a version, if you have edit permission. |
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. |
VersionService.ArchiveVersionValidationResult |
validateArchiveVersion(com.atlassian.crowd.embedded.api.User user,
Version version)
This method should be called before archiving a version. |
VersionService.CreateVersionValidationResult |
validateCreateVersion(com.atlassian.crowd.embedded.api.User user,
Project project,
String versionName,
Date releaseDate,
String description,
Long scheduleAfterVersion)
This method needs to be called before creating a version to ensure all parameters are correct. |
VersionService.CreateVersionValidationResult |
validateCreateVersion(com.atlassian.crowd.embedded.api.User user,
Project project,
String versionName,
String releaseDate,
String description,
Long scheduleAfterVersion)
This method needs to be called before creating a version to ensure all parameters are correct. |
VersionService.MoveVersionValidationResult |
validateDecreaseVersionSequence(com.atlassian.crowd.embedded.api.User user,
long versionId)
Validate Move a version to have a higher sequence number - ie make it later. |
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(com.atlassian.crowd.embedded.api.User user,
long versionId)
Validate Move a version to have a lower sequence number - ie make it earlier. |
VersionService.ValidationResult |
validateMerge(JiraServiceContext context,
Long versionId,
Long swapVersionId)
Validates an attempt to merge a version into another. |
VersionService.MoveVersionValidationResult |
validateMoveToEndVersionSequence(com.atlassian.crowd.embedded.api.User user,
long versionId)
Validate Move a version to the end of the version sequence. |
VersionService.MoveVersionValidationResult |
validateMoveToStartVersionSequence(com.atlassian.crowd.embedded.api.User user,
long versionId)
Validate Move a version to the start of the version list. |
VersionService.MoveVersionValidationResult |
validateMoveVersionAfter(com.atlassian.crowd.embedded.api.User user,
long versionId,
Long scheduleAfterVersion)
Validate Move a version after another version. |
ServiceOutcome<Version> |
validateReleaseDate(com.atlassian.crowd.embedded.api.User user,
Version version,
String releaseDate)
Validate the release date of a version without performing a release/unrelease. |
VersionService.ReleaseVersionValidationResult |
validateReleaseVersion(com.atlassian.crowd.embedded.api.User user,
Version version,
Date 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,
String releaseDate)
This method needs to be called before releasing a version to ensure all parameters are correct. |
VersionService.ArchiveVersionValidationResult |
validateUnarchiveVersion(com.atlassian.crowd.embedded.api.User user,
Version version)
This method should be called before unarchiving a version. |
VersionService.ReleaseVersionValidationResult |
validateUnreleaseVersion(com.atlassian.crowd.embedded.api.User user,
Version version,
Date 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,
String releaseDate)
This method needs to be called before unreleasing a version to ensure all parameters are correct. |
ErrorCollection |
validateVersionDetails(com.atlassian.crowd.embedded.api.User user,
Version version,
String name,
String description)
Validate the name and description of a version, if you have edit permission. |
Field Detail |
---|
static final VersionService.VersionAction REMOVE
Version
should be removed from affected issues.
Method Detail |
---|
ErrorCollection validateVersionDetails(com.atlassian.crowd.embedded.api.User user, Version version, String name, String description)
user
- 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 version
IllegalArgumentException
- if the name is null or duplicates an existing nameServiceOutcome<Version> setVersionDetails(com.atlassian.crowd.embedded.api.User user, Version version, String name, String description)
user
- 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 version
IllegalArgumentException
- if the name is null or duplicates an existing nameServiceOutcome<Version> setReleaseDate(com.atlassian.crowd.embedded.api.User user, Version version, Date releaseDate)
user
- the user who is changing the release dateversion
- the version they want to modifyreleaseDate
- the new release date to use
ServiceOutcome<Version> validateReleaseDate(com.atlassian.crowd.embedded.api.User user, Version version, String releaseDate)
user
- the user who is changing the release dateversion
- the version they want to modifyreleaseDate
- the new release date to use
ServiceOutcome<Version> setReleaseDate(com.atlassian.crowd.embedded.api.User user, Version version, String releaseDate)
user
- the user who is changing the release dateversion
- the version they want to modifyreleaseDate
- the new release date to use
VersionService.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 fieldsVersionService.VersionResult getVersionById(com.atlassian.crowd.embedded.api.User 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
VersionService.VersionResult getVersionById(com.atlassian.crowd.embedded.api.User 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
VersionService.VersionResult getVersionByProjectAndName(com.atlassian.crowd.embedded.api.User user, Project project, 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
VersionService.VersionsResult getVersionsByProject(com.atlassian.crowd.embedded.api.User user, 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
VersionService.CreateVersionValidationResult validateCreateVersion(com.atlassian.crowd.embedded.api.User user, Project project, String versionName, String releaseDate, String description, Long scheduleAfterVersion)
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)
VersionService.CreateVersionValidationResult validateCreateVersion(com.atlassian.crowd.embedded.api.User user, Project project, String versionName, Date releaseDate, String description, Long scheduleAfterVersion)
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)
Version createVersion(com.atlassian.crowd.embedded.api.User user, VersionService.CreateVersionValidationResult request)
validateCreateVersion(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
containg all required data
VersionService.ReleaseVersionValidationResult validateReleaseVersion(com.atlassian.crowd.embedded.api.User user, Version version, 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)
VersionService.ReleaseVersionValidationResult validateReleaseVersion(com.atlassian.crowd.embedded.api.User user, Version version, 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)
VersionService.ReleaseVersionValidationResult validateUnreleaseVersion(com.atlassian.crowd.embedded.api.User user, Version version, 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)
VersionService.ReleaseVersionValidationResult validateUnreleaseVersion(com.atlassian.crowd.embedded.api.User user, Version version, 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
void moveUnreleasedToNewVersion(com.atlassian.crowd.embedded.api.User user, Version currentVersion, Version newVersion)
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.
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
VersionService.ArchiveVersionValidationResult validateArchiveVersion(com.atlassian.crowd.embedded.api.User user, Version version)
user
- The user performing this operationversion
- The version to be archived
VersionService.ArchiveVersionValidationResult validateUnarchiveVersion(com.atlassian.crowd.embedded.api.User user, Version version)
user
- The user performing this operationversion
- The version to be archived
Version archiveVersion(VersionService.ArchiveVersionValidationResult result)
result
- The result from the validation
IllegalStateException
- if the result passed in is not valid.Version unarchiveVersion(VersionService.ArchiveVersionValidationResult result)
result
- The result from the validation
IllegalStateException
- if the result passed in is not valid.boolean isOverdue(Version version)
version
- the version to check.
VersionService.MoveVersionValidationResult validateMoveToStartVersionSequence(com.atlassian.crowd.embedded.api.User user, long versionId)
user
- The user trying to move a versionversionId
-
VersionService.MoveVersionValidationResult validateIncreaseVersionSequence(com.atlassian.crowd.embedded.api.User user, long versionId)
user
- The user trying to move a versionversionId
-
VersionService.MoveVersionValidationResult validateDecreaseVersionSequence(com.atlassian.crowd.embedded.api.User user, long versionId)
user
- The user trying to move a versionversionId
-
VersionService.MoveVersionValidationResult validateMoveToEndVersionSequence(com.atlassian.crowd.embedded.api.User user, long versionId)
user
- The user trying to move a versionversionId
-
VersionService.MoveVersionValidationResult validateMoveVersionAfter(com.atlassian.crowd.embedded.api.User user, long versionId, Long scheduleAfterVersion)
user
- The user trying to move a versionversionId
- version to reschedulescheduleAfterVersion
- id of the version to schedule after the given version object
void 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)
version
-
long getAffectsIssuesCount(Version version)
version
-
long getUnresolvedIssuesCount(com.atlassian.crowd.embedded.api.User user, Version version)
user
- the user trying to release the versionversion
- which version to check for unresolved issues
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |