com.atlassian.greenhopper.service.version
Class VersionServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.service.version.VersionServiceImpl
All Implemented Interfaces:
VersionService

@Service
public class VersionServiceImpl
extends java.lang.Object
implements VersionService


Constructor Summary
VersionServiceImpl()
           
 
Method Summary
 ServiceOutcome<java.lang.Void> addIssueToVersion(com.atlassian.crowd.embedded.api.User user, com.atlassian.jira.issue.Issue issue, com.atlassian.jira.project.version.Version version)
          We'll try to stay as close as possible to the service layer here, just calling the manager for the actual update
 ServiceOutcome<com.atlassian.jira.util.lang.Pair<com.atlassian.jira.project.Project,com.atlassian.jira.project.version.Version>> createVersion(com.atlassian.crowd.embedded.api.User user, com.atlassian.jira.project.Project project, java.lang.String name, java.lang.String description, java.util.Date releaseDate, java.util.Date startDate)
          Creates a single project version.
 ServiceOutcome<com.atlassian.jira.util.lang.Pair<com.atlassian.jira.project.Project,com.atlassian.jira.project.version.Version>> createVersion(com.atlassian.crowd.embedded.api.User user, com.atlassian.jira.project.Project project, java.lang.String name, java.lang.String description, org.joda.time.DateMidnight releaseDate)
          Creates a single project version.
 ServiceOutcome<java.util.Map<com.atlassian.jira.project.Project,com.atlassian.jira.project.version.Version>> createVersions(com.atlassian.crowd.embedded.api.User user, java.util.Collection<com.atlassian.jira.project.Project> projects, java.lang.String name, java.lang.String description, org.joda.time.DateMidnight releaseDate)
          We're calling through to the service layer, so JIRA does all the validation for us.
 ServiceOutcome<com.atlassian.jira.project.version.Version> get(com.atlassian.crowd.embedded.api.User user, java.lang.Long versionId)
          Get the specified version and return an error if it is not found.
 VersionMetaData getMetaData(com.atlassian.jira.project.version.Version version)
          Get the meta data associated to this version.
 ServiceOutcome<java.lang.Void> releaseVersions(com.atlassian.crowd.embedded.api.User user, java.util.Collection<com.atlassian.jira.project.version.Version> versions, org.joda.time.DateMidnight releaseDate)
          valid? yes, do it!
 ServiceOutcome<java.lang.Void> setFixVersions(com.atlassian.crowd.embedded.api.User user, com.atlassian.jira.issue.Issue issue, java.util.Collection<com.atlassian.jira.project.version.Version> versions)
          We'll try to stay as close as possible to the service layer here, just calling the manager for the actual update
 ServiceOutcome<java.lang.Void> updateVersion(com.atlassian.crowd.embedded.api.User user, java.lang.Long versionId, java.lang.String name, java.lang.String description, java.util.Date releaseDate, java.util.Date startDate)
          Update the version with the specified parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionServiceImpl

public VersionServiceImpl()
Method Detail

createVersions

public ServiceOutcome<java.util.Map<com.atlassian.jira.project.Project,com.atlassian.jira.project.version.Version>> createVersions(com.atlassian.crowd.embedded.api.User user,
                                                                                                                                   java.util.Collection<com.atlassian.jira.project.Project> projects,
                                                                                                                                   java.lang.String name,
                                                                                                                                   java.lang.String description,
                                                                                                                                   org.joda.time.DateMidnight releaseDate)
We're calling through to the service layer, so JIRA does all the validation for us.

Specified by:
createVersions in interface VersionService
releaseDate - : optional
Returns:
a map of the newly created versions, or an error if something went wrong.

createVersion

public ServiceOutcome<com.atlassian.jira.util.lang.Pair<com.atlassian.jira.project.Project,com.atlassian.jira.project.version.Version>> createVersion(com.atlassian.crowd.embedded.api.User user,
                                                                                                                                                      com.atlassian.jira.project.Project project,
                                                                                                                                                      java.lang.String name,
                                                                                                                                                      java.lang.String description,
                                                                                                                                                      org.joda.time.DateMidnight releaseDate)
Description copied from interface: VersionService
Creates a single project version. Uses VersionService.createVersions(com.atlassian.crowd.embedded.api.User, java.util.Collection, String, String, org.joda.time.DateMidnight)

Specified by:
createVersion in interface VersionService
releaseDate - : optional
Returns:
a map of the newly created version, or an error if something went wrong.

createVersion

public ServiceOutcome<com.atlassian.jira.util.lang.Pair<com.atlassian.jira.project.Project,com.atlassian.jira.project.version.Version>> createVersion(com.atlassian.crowd.embedded.api.User user,
                                                                                                                                                      com.atlassian.jira.project.Project project,
                                                                                                                                                      java.lang.String name,
                                                                                                                                                      java.lang.String description,
                                                                                                                                                      java.util.Date releaseDate,
                                                                                                                                                      java.util.Date startDate)
Description copied from interface: VersionService
Creates a single project version. Uses VersionService.createVersions(com.atlassian.crowd.embedded.api.User, java.util.Collection, String, String, org.joda.time.DateMidnight)

Specified by:
createVersion in interface VersionService
releaseDate - : optional
Returns:
a map of the newly created version, or an error if something went wrong.

addIssueToVersion

public ServiceOutcome<java.lang.Void> addIssueToVersion(com.atlassian.crowd.embedded.api.User user,
                                                        com.atlassian.jira.issue.Issue issue,
                                                        com.atlassian.jira.project.version.Version version)
We'll try to stay as close as possible to the service layer here, just calling the manager for the actual update

Specified by:
addIssueToVersion in interface VersionService
Returns:
errors that might have occurred

setFixVersions

public ServiceOutcome<java.lang.Void> setFixVersions(com.atlassian.crowd.embedded.api.User user,
                                                     com.atlassian.jira.issue.Issue issue,
                                                     java.util.Collection<com.atlassian.jira.project.version.Version> versions)
We'll try to stay as close as possible to the service layer here, just calling the manager for the actual update

Specified by:
setFixVersions in interface VersionService
Returns:
errors that might have occurred

releaseVersions

public ServiceOutcome<java.lang.Void> releaseVersions(com.atlassian.crowd.embedded.api.User user,
                                                      java.util.Collection<com.atlassian.jira.project.version.Version> versions,
                                                      org.joda.time.DateMidnight releaseDate)
valid? yes, do it!

Specified by:
releaseVersions in interface VersionService
releaseDate - : optional
Returns:
errors that might have occurred

get

public ServiceOutcome<com.atlassian.jira.project.version.Version> get(com.atlassian.crowd.embedded.api.User user,
                                                                      java.lang.Long versionId)
Description copied from interface: VersionService
Get the specified version and return an error if it is not found.

Specified by:
get in interface VersionService
Returns:

updateVersion

public ServiceOutcome<java.lang.Void> updateVersion(com.atlassian.crowd.embedded.api.User user,
                                                    java.lang.Long versionId,
                                                    java.lang.String name,
                                                    java.lang.String description,
                                                    java.util.Date releaseDate,
                                                    java.util.Date startDate)
Description copied from interface: VersionService
Update the version with the specified parameters.

Specified by:
updateVersion in interface VersionService
Returns:

getMetaData

@Nonnull
public VersionMetaData getMetaData(@Nonnull
                                           com.atlassian.jira.project.version.Version version)
Description copied from interface: VersionService
Get the meta data associated to this version.

Specified by:
getMetaData in interface VersionService
Parameters:
version - the version; must not be null
Returns:
the meta data


Copyright © 2007-2014 Atlassian. All Rights Reserved.