|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.project.version.DefaultVersionManager
public class DefaultVersionManager
| Field Summary | |
|---|---|
protected AssociationManager |
associationManager
|
protected CollectionReorderer |
collectionReorderer
|
protected IssueIndexManager |
issueIndexManager
|
protected IssueManager |
issueManager
|
protected ProjectManager |
projectManager
|
protected VersionStore |
versionStore
|
| Fields inherited from interface com.atlassian.jira.project.version.VersionManager |
|---|
ALL_RELEASED_VERSIONS, ALL_UNRELEASED_VERSIONS, NO_VERSIONS |
| Constructor Summary | |
|---|---|
DefaultVersionManager(IssueManager issueManager,
CollectionReorderer collectionReorderer,
AssociationManager associationManager,
IssueIndexManager issueIndexManager,
ProjectManager projectManager,
VersionStore versionStore)
|
|
| 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)
|
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(Version version)
Removes a specific version from the system. |
void |
editVersionDetails(Version version,
String name,
String description)
Updates details of an existing version. |
void |
editVersionDetails(Version version,
String versionName,
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<Version> |
getAffectedVersionsByIssue(org.ofbiz.core.entity.GenericValue issue)
|
Collection<Version> |
getAffectedVersionsFor(Issue issue)
Get all affected versions of the specified issue. |
Collection<org.ofbiz.core.entity.GenericValue> |
getAffectsIssues(Version version)
Return 'Affects' Issues |
Collection<org.ofbiz.core.entity.GenericValue> |
getAllAffectedIssues(Collection<Version> versions)
Return all Issues that are associated with the specified versions |
Collection<Version> |
getAllVersions()
|
Collection<Version> |
getAllVersionsReleased(boolean includeArchived)
|
Collection<Version> |
getAllVersionsUnreleased(boolean includeArchived)
|
Collection<org.ofbiz.core.entity.GenericValue> |
getFixIssues(Version version)
Return Fix Issues |
Collection<Version> |
getFixVersionsByIssue(org.ofbiz.core.entity.GenericValue issue)
|
Collection<Version> |
getFixVersionsFor(Issue issue)
Get all fix for versions of the specified issue. |
protected IssueFactory |
getIssueFactory()
NB: This is done because we can't inject a IssueFactory, this would cause circular dependency. |
Collection<Issue> |
getIssuesWithAffectsVersion(Version version)
Return all the issues in which the affected version matches the specified version. |
Collection<Issue> |
getIssuesWithFixVersion(Version version)
Return all the issues in which the fix for version matches the specified version. |
Collection<Version> |
getOtherUnarchivedVersions(Version version)
Return all unarchived versions except this one |
Collection<Version> |
getOtherVersions(Version version)
Return all other versions in the project except this one |
Version |
getVersion(Long id)
Returns a single version. |
Version |
getVersion(Long projectId,
String versionName)
Retrieve a specific Version in a project given the project id, or null if no such version exists in that project. |
List<Version> |
getVersions(org.ofbiz.core.entity.GenericValue project)
Gets all the versions for a project. |
Collection<Version> |
getVersions(List<Long> ids)
Return a collection of Versions matching the ids passed in. |
List<Version> |
getVersions(Long projectId)
Return a list of Versions for the given project. |
List<Version> |
getVersions(Project project)
Return a list of Versions for the given project. |
Collection<Version> |
getVersionsArchived(org.ofbiz.core.entity.GenericValue projectGV)
Return all archived versions for a particular project. |
Collection<Version> |
getVersionsArchived(Project project)
Return all archived versions for a particular project. |
protected Collection<Version> |
getVersionsByIssue(org.ofbiz.core.entity.GenericValue issue,
String relationName)
|
Collection<Version> |
getVersionsByName(String versionName)
Return a collection of Versions that have the specified name. |
Collection<Version> |
getVersionsReleased(Long projectId,
boolean includeArchived)
Gets a list of released versions for a project. |
Collection<Version> |
getVersionsReleasedDesc(Long projectId,
boolean includeArchived)
Gets a list of released versions for a project in reverse order. |
Collection<Version> |
getVersionsUnarchived(Long projectId)
Return all un-archived versions for a particular project |
Collection<Version> |
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 |
isDuplicateName(Version currentVersion,
String name)
Check that the version name we are changing to is not a duplicate. |
boolean |
isDuplicateName(Version currentVersion,
String name,
org.ofbiz.core.entity.GenericValue project)
Checks if a version in the current project already exists with the same name |
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 Fix 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 scheduleAfterVersionId)
Move a version after another version |
void |
releaseVersion(Version version,
boolean release)
Used to release or unrelease a version, depending on the release flag. |
void |
releaseVersions(Collection<Version> versions,
boolean release)
Used to release versions depending on the release flag. |
void |
storeReorderedVersionList(List<Version> versions)
Given a re-ordered list of versions, commit the changes to the backend datastore. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final IssueManager issueManager
protected final CollectionReorderer collectionReorderer
protected final AssociationManager associationManager
protected final IssueIndexManager issueIndexManager
protected final ProjectManager projectManager
protected final VersionStore versionStore
| Constructor Detail |
|---|
public DefaultVersionManager(IssueManager issueManager,
CollectionReorderer collectionReorderer,
AssociationManager associationManager,
IssueIndexManager issueIndexManager,
ProjectManager projectManager,
VersionStore versionStore)
| Method Detail |
|---|
public Version createVersion(String name,
Date releaseDate,
String description,
org.ofbiz.core.entity.GenericValue project,
Long scheduleAfterVersion)
throws CreateException
CreateException
public Version createVersion(String name,
Date releaseDate,
String description,
Long projectId,
Long scheduleAfterVersion)
throws CreateException
VersionManagerVersion object.
createVersion in interface VersionManagername - the NamereleaseDate - date of release or null if not released.description - the DescriptionprojectId - the id of the Project of the version.scheduleAfterVersion - id of the version after which this should be sequenced or null.
CreateException - If there was a problem creating the version.public void moveToStartVersionSequence(Version version)
VersionManager
moveToStartVersionSequence in interface VersionManagerversion - the Version to movepublic void increaseVersionSequence(Version version)
VersionManager
increaseVersionSequence in interface VersionManagerversion - the Versionpublic void decreaseVersionSequence(Version version)
VersionManager
decreaseVersionSequence in interface VersionManagerversion - the Versionpublic void moveToEndVersionSequence(Version version)
VersionManager
moveToEndVersionSequence in interface VersionManagerversion - the Version
public void moveVersionAfter(Version version,
Long scheduleAfterVersionId)
VersionManager
moveVersionAfter in interface VersionManagerversion - version to reschedulescheduleAfterVersionId - id of the version to schedule after the given version objectpublic void deleteVersion(Version version)
VersionManager
deleteVersion in interface VersionManagerversion - The version to be removed.
public void editVersionDetails(Version version,
String name,
String description)
VersionManager
editVersionDetails in interface VersionManagerversion - The version to updatename - The new version name, cannot be empty.description - The description of this version.
public void editVersionDetails(Version version,
String versionName,
String description,
org.ofbiz.core.entity.GenericValue project)
VersionManager
editVersionDetails in interface VersionManagerversion - The version to updateversionName - new namedescription - new descriptionproject - Used to check for duplicate version names in a project.
public void releaseVersion(Version version,
boolean release)
VersionManager
releaseVersion in interface VersionManagerversion - Version to be released (or unreleased)release - True to release a version. False to 'unrelease' a version
public void releaseVersions(Collection<Version> versions,
boolean release)
VersionManager
releaseVersions in interface VersionManagerversions - Collection of Versionsrelease - True to release a version. False to 'unrelease' a version
public void moveIssuesToNewVersion(List issues,
Version currentVersion,
Version swapToVersion)
throws IndexException
VersionManager
moveIssuesToNewVersion in interface VersionManagerissues - the IssuescurrentVersion - Current fix version they will be swapped fromswapToVersion - New fix version they will be swapped to.
IndexException - if an error occurs will indexing these new issue values.
public void archiveVersions(String[] idsToArchive,
String[] idsToUnarchive)
VersionManager
archiveVersions in interface VersionManageridsToArchive - Archive all these VersionsidsToUnarchive - Unarchive these Versions
public void archiveVersion(Version version,
boolean archive)
VersionManager
archiveVersion in interface VersionManagerversion - the Version to archive or unarchivearchive - new archive value
public void editVersionReleaseDate(Version version,
Date duedate)
VersionManager
editVersionReleaseDate in interface VersionManagerversion - the Version to editduedate - new release datepublic boolean isVersionOverDue(Version version)
VersionManager
isVersionOverDue in interface VersionManagerversion - the Version
public Collection<Version> getVersionsUnarchived(Long projectId)
VersionManager
getVersionsUnarchived in interface VersionManagerprojectId - id of the project.
Versionspublic Collection<Version> getVersionsArchived(org.ofbiz.core.entity.GenericValue projectGV)
VersionManager
getVersionsArchived in interface VersionManagerprojectGV - the Project
Versionspublic Collection<Version> getVersionsArchived(Project project)
VersionManager
getVersionsArchived in interface VersionManagerproject - the Project
public List<Version> getVersions(org.ofbiz.core.entity.GenericValue project)
VersionManager
getVersions in interface VersionManagerproject - the Project
public List<Version> getVersions(Long projectId)
VersionManager
getVersions in interface VersionManagerprojectId - the Project
VersionManager.getVersions(Project)public List<Version> getVersions(Project project)
VersionManager
getVersions in interface VersionManagerproject - the Project
VersionManager.getVersions(Long)public Collection<Version> getVersionsByName(String versionName)
VersionManagerVersions that have the specified name.
getVersionsByName in interface VersionManagerversionName - the name of the version (case-insensitive)
public Collection<Version> getAffectedVersionsByIssue(org.ofbiz.core.entity.GenericValue issue)
getAffectedVersionsByIssue in interface VersionManagerissue - the Issue
Versions for an issue.public Collection<Version> getAffectedVersionsFor(Issue issue)
VersionManager
getAffectedVersionsFor in interface VersionManagerissue - the issue
public Collection<Version> getFixVersionsByIssue(org.ofbiz.core.entity.GenericValue issue)
getFixVersionsByIssue in interface VersionManagerissue - the Issue
Versions for an issue.public Collection<Version> getFixVersionsFor(Issue issue)
VersionManager
getFixVersionsFor in interface VersionManagerissue - the Issue
public Collection<Version> getAllVersions()
getAllVersions in interface VersionManagerpublic Collection<Version> getAllVersionsReleased(boolean includeArchived)
getAllVersionsReleased in interface VersionManagerincludeArchived - whether or not to include archived versions
public Collection<Version> getAllVersionsUnreleased(boolean includeArchived)
getAllVersionsUnreleased in interface VersionManagerincludeArchived - whether or not to include archived versions
protected Collection<Version> getVersionsByIssue(org.ofbiz.core.entity.GenericValue issue,
String relationName)
issue - the issuerelationName - IssueRelationConstants.VERSION or IssueRelationConstants.FIX_VERSION.
Versions for this issue.public Collection<Version> getVersions(List<Long> ids)
VersionManagerVersions matching the ids passed in.
getVersions in interface VersionManagerids - Version IDs
Versions matching the ids passed in.
public Collection<Version> getVersionsUnreleased(Long projectId,
boolean includeArchived)
VersionManager
getVersionsUnreleased in interface VersionManagerprojectId - The id of the project for which to return versionsincludeArchived - True if archived versions should be included
Versions, never null
public Collection<Version> getVersionsReleased(Long projectId,
boolean includeArchived)
VersionManager
getVersionsReleased in interface VersionManagerprojectId - project idincludeArchived - flag to indicate whether to include archived versions in the result.
Version objects
public Collection<Version> getVersionsReleasedDesc(Long projectId,
boolean includeArchived)
VersionManager
getVersionsReleasedDesc in interface VersionManagerprojectId - project idincludeArchived - flag to indicate whether to include archived versions in the result.
Version objectspublic Version getVersion(Long id)
VersionManager
getVersion in interface VersionManagerid - the Version ID
Version object.
public Version getVersion(Long projectId,
String versionName)
null if no such version exists in that project.
getVersion in interface VersionManagerprojectId - the ProjectversionName - the Version name
Version object.public Collection<org.ofbiz.core.entity.GenericValue> getAllAffectedIssues(Collection<Version> versions)
VersionManager
getAllAffectedIssues in interface VersionManagerversions - a collection of Version objects
GenericValuesprotected IssueFactory getIssueFactory()
IssueFactory, this would cause circular dependency.
public Collection<Version> getOtherVersions(Version version)
getOtherVersions in interface VersionManagerversion - the Version
public Collection<Version> getOtherUnarchivedVersions(Version version)
getOtherUnarchivedVersions in interface VersionManagerversion - the Version
public Collection<org.ofbiz.core.entity.GenericValue> getFixIssues(Version version)
VersionManager
getFixIssues in interface VersionManagerversion - the Version
GenericValuespublic Collection<Issue> getIssuesWithFixVersion(Version version)
VersionManager
getIssuesWithFixVersion in interface VersionManagerversion - the fixed for version.
public Collection<org.ofbiz.core.entity.GenericValue> getAffectsIssues(Version version)
VersionManager
getAffectsIssues in interface VersionManagerversion - the Version
GenericValuespublic Collection<Issue> getIssuesWithAffectsVersion(Version version)
VersionManager
getIssuesWithAffectsVersion in interface VersionManagerversion - the affected version.
public boolean isDuplicateName(Version currentVersion,
String name)
VersionManager
isDuplicateName in interface VersionManagercurrentVersion - The version to updatename - The new name for the version
public boolean isDuplicateName(Version currentVersion,
String name,
org.ofbiz.core.entity.GenericValue project)
isDuplicateName in interface VersionManagercurrentVersion - The version to updatename - The new name for the versionproject - Used to check for duplicate version names in a project.
public void storeReorderedVersionList(List<Version> versions)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||