com.atlassian.greenhopper.service.version
Interface VersionService

All Known Implementing Classes:
VersionServiceImpl

public interface VersionService

Wrapper for JIRA's services / managers dealing with versions. Mainly here to shield the rest of the service world from horrible implementation details.

Author:
ahennecke

Method Summary
 ErrorCollection addIssueToVersion(com.atlassian.crowd.embedded.api.User user, com.atlassian.jira.issue.Issue issue, com.atlassian.jira.project.version.Version version)
          Adds the issue to the version.
 java.util.Map<com.atlassian.jira.project.Project,com.atlassian.jira.project.version.Version> createVersions(com.atlassian.crowd.embedded.api.User user, ErrorCollection errors, java.util.Collection<com.atlassian.jira.project.Project> projects, java.lang.String name, java.lang.String description, org.joda.time.DateMidnight releaseDate)
          Build a version out of the given parameters and create it.
 ErrorCollection releaseVersions(com.atlassian.crowd.embedded.api.User user, java.util.Collection<com.atlassian.jira.project.version.Version> versions, org.joda.time.DateMidnight releaseDate)
          Release the given versions.
 

Method Detail

createVersions

java.util.Map<com.atlassian.jira.project.Project,com.atlassian.jira.project.version.Version> createVersions(com.atlassian.crowd.embedded.api.User user,
                                                                                                            ErrorCollection errors,
                                                                                                            java.util.Collection<com.atlassian.jira.project.Project> projects,
                                                                                                            java.lang.String name,
                                                                                                            java.lang.String description,
                                                                                                            org.joda.time.DateMidnight releaseDate)
Build a version out of the given parameters and create it. Will do lots of validation, permission checking etc. internally. If the validation fails for one of the projects, no versions will be created.

Parameters:
releaseDate - : optional
Returns:
a map of the newly created versions, or an empty map if something went wrong.

addIssueToVersion

ErrorCollection addIssueToVersion(com.atlassian.crowd.embedded.api.User user,
                                  com.atlassian.jira.issue.Issue issue,
                                  com.atlassian.jira.project.version.Version version)
Adds the issue to the version. Technically, add the version to the already existing fixVersions of the issue field. Does not overwrite existing fixVersions. Does not do anything if the issue is already in that version. Checks for permissions and all.

Returns:
errors that might have occurred

releaseVersions

ErrorCollection releaseVersions(com.atlassian.crowd.embedded.api.User user,
                                java.util.Collection<com.atlassian.jira.project.version.Version> versions,
                                org.joda.time.DateMidnight releaseDate)
Release the given versions. Validation and permission checking will be done. If one fails validation, none is released.

Parameters:
releaseDate - : optional
Returns:
errors that might have occurred


Copyright © 2007-2011 Atlassian. All Rights Reserved.