com.atlassian.greenhopper.service.project
Class JIRAProjectServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.service.project.JIRAProjectServiceImpl
All Implemented Interfaces:
JIRAProjectService

@Service(value="gh-jiraProjectService")
public class JIRAProjectServiceImpl
extends java.lang.Object
implements JIRAProjectService

Default implementation of JIRAProjectService interface This implementation relies on ProjectManager and ProjectService for its work


Field Summary
 
Fields inherited from interface com.atlassian.greenhopper.service.project.JIRAProjectService
SERVICE
 
Constructor Summary
JIRAProjectServiceImpl()
           
 
Method Summary
 java.util.Set<com.atlassian.jira.project.Project> filterByPermission(com.opensymphony.user.User user, java.util.Set<com.atlassian.jira.project.Project> projects, int permission)
          Filters a set of projects regarding a given permission.
 java.util.List<com.atlassian.jira.project.Project> getAll(com.opensymphony.user.User user, int permission)
          Get all projects a user has access to
 com.atlassian.jira.project.Project getProject(com.opensymphony.user.User user, java.lang.Long id)
          Get a project for a given project id.
 java.util.Set<com.atlassian.jira.project.Project> getProjects(com.opensymphony.user.User user, java.util.Collection<java.lang.Long> projectIds)
          Get all projects for the given collection of project ids.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JIRAProjectServiceImpl

public JIRAProjectServiceImpl()
Method Detail

getProjects

public java.util.Set<com.atlassian.jira.project.Project> getProjects(com.opensymphony.user.User user,
                                                                     java.util.Collection<java.lang.Long> projectIds)
Get all projects for the given collection of project ids.

Specified by:
getProjects in interface JIRAProjectService
Returns:
a set of projects which are visible to a user.

getAll

public java.util.List<com.atlassian.jira.project.Project> getAll(com.opensymphony.user.User user,
                                                                 int permission)
Get all projects a user has access to

Specified by:
getAll in interface JIRAProjectService
Returns:
a set of projects which are visible to a user.

getProject

public com.atlassian.jira.project.Project getProject(com.opensymphony.user.User user,
                                                     java.lang.Long id)
Get a project for a given project id.

Specified by:
getProject in interface JIRAProjectService
Returns:
the project if it exists and the user has access to it

filterByPermission

public java.util.Set<com.atlassian.jira.project.Project> filterByPermission(com.opensymphony.user.User user,
                                                                            java.util.Set<com.atlassian.jira.project.Project> projects,
                                                                            int permission)
Filters a set of projects regarding a given permission.

Specified by:
filterByPermission in interface JIRAProjectService
Returns:
a new set containing projects for which the user has the passed permission


Copyright © 2007-2011 Atlassian. All Rights Reserved.