com.atlassian.jira.project.version
Interface VersionManager

All Known Implementing Classes:
DefaultVersionManager

public interface VersionManager

Manager responsible for JIRA versions.


Method Summary
 void archiveVersion(Version version, boolean archive)
          Archive/Un-archive a single version depending on the archive flag.
 void archiveVersions(String[] idsToArchive, String[] idsToUnarchive)
          Method used to archive and un-archive a number of versions.
 Version createVersion(String name, Date releaseDate, String description, org.ofbiz.core.entity.GenericValue project, Long scheduleAfterVersion)
          Deprecated. now use #createVersion with projectId instead of generic value
 Version createVersion(String name, Date releaseDate, String description, Long projectId, Long scheduleAfterVersion)
          Creates a new Version object.
 void decreaseVersionSequence(Version version)
          Move a version to have a higher sequence number - ie make it later
 void deleteVersion(String actionType, Version version, String affectsAction, Long affectsSwapVersionId, String fixAction, Long fixSwapVersionId)
          Deprecated. since v3.13. Use deleteVersion(Version) instead.
 void deleteVersion(Version version)
          Removes a specific version from the system.
 void editVersionDetails(Version version, String name, String description, org.ofbiz.core.entity.GenericValue project)
          Updates details for an existing version.
 void editVersionReleaseDate(Version version, Date duedate)
          Update the release date of a version.
 Collection getAffectedVersionsByIssue(org.ofbiz.core.entity.GenericValue issue)
           
 Collection getAffectsIssues(Version version)
          Return 'Affects' Issues
 Collection getAllAffectedIssues(Collection versions)
          Return all Issues that are assoicated with the specified versions
 Collection getFixIssues(Version version)
          Return Fix Issues
 Collection getFixVersionsByIssue(org.ofbiz.core.entity.GenericValue issue)
           
 Collection getOtherUnarchivedVersions(Version version)
          Return all unarchived versions except this one
 Collection getOtherVersions(Version version)
          Return all other versions in the project except this one
 Version getVersion(org.ofbiz.core.entity.GenericValue project, String name)
          Deprecated. Use getVersion(Long,String) instead
 Version getVersion(Long id)
          Returns a single version.
 Version getVersion(Long projectId, String versionName)
          Search for a version by projectID and name.
 List getVersions(org.ofbiz.core.entity.GenericValue project)
          Deprecated. use #getVersions(Long)
 Collection getVersions(List ids)
          Return a collection of Versions matching the ids passed in.
 List getVersions(Long projectId)
          Return a list of Versions for a project.
 Collection getVersionsArchived(org.ofbiz.core.entity.GenericValue projectGV)
          Return all archived versions for a particular project.
 Collection getVersionsReleased(org.ofbiz.core.entity.GenericValue project, boolean includeArchived)
          Deprecated. use getVersionsReleased(Long,boolean) instead
 Collection getVersionsReleased(Long projectId, boolean includeArchived)
          Gets a list of released versions for a project.
 Collection getVersionsReleasedDesc(org.ofbiz.core.entity.GenericValue project, boolean includeArchived)
          Deprecated. use getVersionsReleasedDesc(Long, boolean) instead
 Collection getVersionsReleasedDesc(Long projectId, boolean includeArchived)
          Gets a list of released versions for a project in reverse order.
 Collection getVersionsUnarchived(org.ofbiz.core.entity.GenericValue projectGV)
          Deprecated. Use getVersionsUnarchived(Long) instead. Since v3.10
 Collection getVersionsUnarchived(Long projectId)
          Return all un-archived versions for a particular project
 Collection getVersionsUnreleased(org.ofbiz.core.entity.GenericValue project, boolean includeArchived)
          Deprecated. Use getVersionsUnreleased(Long,boolean) instead, since v3.10.
 Collection getVersionsUnreleased(Long projectId, boolean includeArchived)
          Gets a list of un-released versions for a particular project.
 void increaseVersionSequence(Version version)
          Move a version to have a lower sequence number - ie make it earlier
 boolean isVersionOverDue(Version version)
          Checks to see if a version is overdue.
 void moveIssuesToNewVersion(List issues, Version currentVersion, Version swapToVersion)
          Swaps the list of issues supplied from one version to another.
 void moveToEndVersionSequence(Version version)
          Move a version to the end of the version sequence
 void moveToStartVersionSequence(Version version)
          Move a version to the start of the version list
 void moveVersionAfter(Version version, Long scheduleAfterVersion)
          Move a version after another version
 void releaseVersions(Collection versions, boolean release)
          Used to release versions depending on the release flag.
 

Method Detail

createVersion

Version createVersion(String name,
                      Date releaseDate,
                      String description,
                      org.ofbiz.core.entity.GenericValue project,
                      Long scheduleAfterVersion)
                      throws CreateException,
                             org.ofbiz.core.entity.GenericEntityException
Deprecated. now use #createVersion with projectId instead of generic value

Creates a new Version object.

Parameters:
name -
releaseDate - date of release or null if not released.
description -
project - the GenericValue of the Project of the version.
scheduleAfterVersion - id of the version after which this should be sequenced or null.
Returns:
the new Version.
Throws:
CreateException - If there was a problem creating the version.
org.ofbiz.core.entity.GenericEntityException - If there was a problem creating the version.

createVersion

Version createVersion(String name,
                      Date releaseDate,
                      String description,
                      Long projectId,
                      Long scheduleAfterVersion)
                      throws CreateException,
                             org.ofbiz.core.entity.GenericEntityException
Creates a new Version object. Takes a project ID instead of a project GenericValue.

Parameters:
name -
releaseDate - date of release or null if not released.
description -
projectId - the id of the Project of the version.
scheduleAfterVersion - id of the version after which this should be sequenced or null.
Returns:
the new Version.
Throws:
CreateException - If there was a problem creating the version.
org.ofbiz.core.entity.GenericEntityException - If there was a problem creating the version.

moveToStartVersionSequence

void moveToStartVersionSequence(Version version)
                                throws org.ofbiz.core.entity.GenericEntityException
Move a version to the start of the version list

Parameters:
version -
Throws:
org.ofbiz.core.entity.GenericEntityException

increaseVersionSequence

void increaseVersionSequence(Version version)
                             throws org.ofbiz.core.entity.GenericEntityException
Move a version to have a lower sequence number - ie make it earlier

Parameters:
version -
Throws:
org.ofbiz.core.entity.GenericEntityException

decreaseVersionSequence

void decreaseVersionSequence(Version version)
                             throws org.ofbiz.core.entity.GenericEntityException
Move a version to have a higher sequence number - ie make it later

Parameters:
version -
Throws:
org.ofbiz.core.entity.GenericEntityException

moveToEndVersionSequence

void moveToEndVersionSequence(Version version)
                              throws org.ofbiz.core.entity.GenericEntityException
Move a version to the end of the version sequence

Parameters:
version -
Throws:
org.ofbiz.core.entity.GenericEntityException

moveVersionAfter

void moveVersionAfter(Version version,
                      Long scheduleAfterVersion)
Move a version after another version

Parameters:
version - version to reschedule
scheduleAfterVersion - id of the version to schedule after the given version object

deleteVersion

void deleteVersion(String actionType,
                   Version version,
                   String affectsAction,
                   Long affectsSwapVersionId,
                   String fixAction,
                   Long fixSwapVersionId)
                   throws org.ofbiz.core.entity.GenericEntityException
Deprecated. since v3.13. Use deleteVersion(Version) instead.

This method is used by the merge and delete actions. The action type needs to be specified as the action params are validated differently.

Parameters:
actionType - See VersionKeys.DELETE_ACTION,VersionKeys.MERGE_ACTION
version - The version to delete.
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
affectsSwapVersionId - The new affects version to move issues to.
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
fixSwapVersionId - The new fix version to move issues to.
Throws:
org.ofbiz.core.entity.GenericEntityException

deleteVersion

void deleteVersion(Version version)
Removes a specific version from the system.

Parameters:
version - The version to be removed.

editVersionDetails

void editVersionDetails(Version version,
                        String name,
                        String description,
                        org.ofbiz.core.entity.GenericValue project)
                        throws org.ofbiz.core.entity.GenericEntityException
Updates details for an existing version.

Parameters:
version - The version to update
name -
description -
project - Used to check for duplicate version names in a project.
Throws:
org.ofbiz.core.entity.GenericEntityException
IllegalArgumentException - If the name is not set, or already exists.

releaseVersions

void releaseVersions(Collection versions,
                     boolean release)
                     throws org.ofbiz.core.entity.GenericEntityException
Used to release versions depending on the release flag.

Parameters:
versions - Collection of Versions
release - True to release a version. False to 'unrelease' a version
Throws:
org.ofbiz.core.entity.GenericEntityException

moveIssuesToNewVersion

void moveIssuesToNewVersion(List issues,
                            Version currentVersion,
                            Version swapToVersion)
                            throws org.ofbiz.core.entity.GenericEntityException,
                                   IndexException
Swaps the list of issues supplied from one version to another.

Parameters:
issues -
currentVersion -
swapToVersion -
Throws:
org.ofbiz.core.entity.GenericEntityException
IndexException

archiveVersions

void archiveVersions(String[] idsToArchive,
                     String[] idsToUnarchive)
                     throws org.ofbiz.core.entity.GenericEntityException
Method used to archive and un-archive a number of versions.

Parameters:
idsToArchive -
idsToUnarchive -
Throws:
org.ofbiz.core.entity.GenericEntityException

archiveVersion

void archiveVersion(Version version,
                    boolean archive)
Archive/Un-archive a single version depending on the archive flag.

Parameters:
version -
archive -

getVersionsUnarchived

Collection getVersionsUnarchived(org.ofbiz.core.entity.GenericValue projectGV)
                                 throws org.ofbiz.core.entity.GenericEntityException
Deprecated. Use getVersionsUnarchived(Long) instead. Since v3.10

Return all un-archived versions for a particular project

Parameters:
projectGV -
Returns:
A collection of Versions
Throws:
org.ofbiz.core.entity.GenericEntityException

getVersionsUnarchived

Collection getVersionsUnarchived(Long projectId)
Return all un-archived versions for a particular project

Parameters:
projectId - id of the project.
Returns:
A collection of Versions
Throws:
org.ofbiz.core.entity.GenericEntityException - If there's a problem retrieving versions
Since:
v3.10

getVersionsArchived

Collection getVersionsArchived(org.ofbiz.core.entity.GenericValue projectGV)
                               throws org.ofbiz.core.entity.GenericEntityException
Return all archived versions for a particular project.

Parameters:
projectGV -
Returns:
A collections of Versions
Throws:
org.ofbiz.core.entity.GenericEntityException

editVersionReleaseDate

void editVersionReleaseDate(Version version,
                            Date duedate)
                            throws org.ofbiz.core.entity.GenericEntityException
Update the release date of a version.

Parameters:
version -
duedate -
Throws:
org.ofbiz.core.entity.GenericEntityException

isVersionOverDue

boolean isVersionOverDue(Version version)
Checks to see if a version is overdue. Note: This method checks if the due date set for a version is previous to last midnight. (not now()).

Parameters:
version -
Returns:
True if the version is overdue. (i.e. releaseDate is before last midnight)

getVersions

List getVersions(org.ofbiz.core.entity.GenericValue project)
Deprecated. use #getVersions(Long)

Gets all the versions for a project.

Parameters:
project -
Returns:
a List of Version objects.

getVersions

List getVersions(Long projectId)
Return a list of Versions for a project.

Parameters:
projectId -
Returns:
a List of Version objects.

getVersions

Collection getVersions(List ids)
Return a collection of Versions matching the ids passed in.

Parameters:
ids -
Returns:

getVersion

Version getVersion(Long id)
Returns a single version.

Parameters:
id -
Returns:
A Version object.

getVersion

Version getVersion(Long projectId,
                   String versionName)
Search for a version by projectID and name.

Parameters:
projectId -
versionName -
Returns:
A Version object.

getVersion

Version getVersion(org.ofbiz.core.entity.GenericValue project,
                   String name)
Deprecated. Use getVersion(Long,String) instead

Search for a version by projectID and name.

Parameters:
project -
name -
Returns:
A Version object.

getVersionsUnreleased

Collection getVersionsUnreleased(org.ofbiz.core.entity.GenericValue project,
                                 boolean includeArchived)
Deprecated. Use getVersionsUnreleased(Long,boolean) instead, since v3.10.

Gets a list of un-released versions for a particular project.

Parameters:
project -
includeArchived -
Returns:
A collection of Versions

getVersionsUnreleased

Collection getVersionsUnreleased(Long projectId,
                                 boolean includeArchived)
Gets a list of un-released versions for a particular project.

Parameters:
projectId - The id of the project for which to return versions
includeArchived - True if archived versions should be included
Returns:
A Collection of Versions, never null
Since:
v3.10

getVersionsReleased

Collection getVersionsReleased(org.ofbiz.core.entity.GenericValue project,
                               boolean includeArchived)
Deprecated. use getVersionsReleased(Long,boolean) instead

Gets a list of released versions for a project. This list will include archived versions if the 'includeArchived' flag is set to true.

Parameters:
project - project generic value
includeArchived - flag to indicate whether to include archived versions in the result.
Returns:
A collection of Version objects

getVersionsReleased

Collection getVersionsReleased(Long projectId,
                               boolean includeArchived)
Gets a list of released versions for a project. This list will include archived versions if the 'includeArchived' flag is set to true.

Parameters:
projectId - project id
includeArchived - flag to indicate whether to include archived versions in the result.
Returns:
A collection of Version objects

getVersionsReleasedDesc

Collection getVersionsReleasedDesc(org.ofbiz.core.entity.GenericValue project,
                                   boolean includeArchived)
Deprecated. use getVersionsReleasedDesc(Long, boolean) instead

Gets a list of released versions for a project in reverse order. This list will include archived versions if the 'includeArchived' flag is set to true.

Parameters:
project - project generic value
includeArchived - flag to indicate whether to include archived versions in the result.
Returns:
A collection of Version objects

getVersionsReleasedDesc

Collection getVersionsReleasedDesc(Long projectId,
                                   boolean includeArchived)
Gets a list of released versions for a project in reverse order. This list will include archived versions if the 'includeArchived' flag is set to true.

Parameters:
projectId - project id
includeArchived - flag to indicate whether to include archived versions in the result.
Returns:
A collection of Version objects

getOtherVersions

Collection getOtherVersions(Version version)
                            throws org.ofbiz.core.entity.GenericEntityException
Return all other versions in the project except this one

Parameters:
version -
Returns:
Throws:
org.ofbiz.core.entity.GenericEntityException

getOtherUnarchivedVersions

Collection getOtherUnarchivedVersions(Version version)
                                      throws org.ofbiz.core.entity.GenericEntityException
Return all unarchived versions except this one

Parameters:
version -
Returns:
Throws:
org.ofbiz.core.entity.GenericEntityException

getAllAffectedIssues

Collection getAllAffectedIssues(Collection versions)
                                throws org.ofbiz.core.entity.GenericEntityException
Return all Issues that are assoicated with the specified versions

Parameters:
versions - a collection of Version objects
Returns:
A collection of issue GenericValues
Throws:
org.ofbiz.core.entity.GenericEntityException

getFixIssues

Collection getFixIssues(Version version)
                        throws org.ofbiz.core.entity.GenericEntityException
Return Fix Issues

Parameters:
version -
Returns:
A collection of issue GenericValues
Throws:
org.ofbiz.core.entity.GenericEntityException

getAffectsIssues

Collection getAffectsIssues(Version version)
                            throws org.ofbiz.core.entity.GenericEntityException
Return 'Affects' Issues

Parameters:
version -
Returns:
A collection of issue GenericValues
Throws:
org.ofbiz.core.entity.GenericEntityException

getAffectedVersionsByIssue

Collection getAffectedVersionsByIssue(org.ofbiz.core.entity.GenericValue issue)
Parameters:
issue -
Returns:
A collection of 'affects' Versions for an issue.

getFixVersionsByIssue

Collection getFixVersionsByIssue(org.ofbiz.core.entity.GenericValue issue)
Parameters:
issue -
Returns:
A collection of 'fix for' Versions for an issue.


Copyright © 2002-2009 Atlassian. All Rights Reserved.