com.atlassian.jira.project
Class DefaultProjectManager

java.lang.Object
  extended by com.atlassian.jira.project.AbstractProjectManager
      extended by com.atlassian.jira.project.DefaultProjectManager
All Implemented Interfaces:
ProjectManager

public class DefaultProjectManager
extends AbstractProjectManager

A class to manage interactions with projects


Constructor Summary
DefaultProjectManager()
          Don't use this constructor.
DefaultProjectManager(OfBizDelegator delegator, com.atlassian.core.ofbiz.association.AssociationManager associationManager, ProjectFactory projectFactory)
           
 
Method Summary
 org.ofbiz.core.entity.GenericValue getComponent(org.ofbiz.core.entity.GenericValue project, String name)
          Deprecated. use ProjectComponentManager instead
 org.ofbiz.core.entity.GenericValue getComponent(Long id)
          Deprecated. use ProjectComponentManager instead
 Collection getComponents(org.ofbiz.core.entity.GenericValue project)
          Deprecated. use ProjectComponentManager instead
protected  OfBizDelegator getDelegator()
           
 long getNextId(org.ofbiz.core.entity.GenericValue project)
          Get the next issue ID from this project (transactional).
 org.ofbiz.core.entity.GenericValue getProject(Long id)
          Retrieve a single project by it's id.
 org.ofbiz.core.entity.GenericValue getProjectByKey(String key)
          Retrieve a single project by it's project key.
 org.ofbiz.core.entity.GenericValue getProjectByName(String name)
          Retrieve a single project by it's project name.
 Collection getProjectCategories()
          Get all ProjectCategories.
 org.ofbiz.core.entity.GenericValue getProjectCategory(Long id)
          Returns a single project category by id.
 org.ofbiz.core.entity.GenericValue getProjectCategoryFromProject(org.ofbiz.core.entity.GenericValue project)
          Get the Project Category given a Project.
 Project getProjectObj(Long id)
          Retrieves a single Project by its id.
 Project getProjectObjByKey(String projectKey)
          Returns a Project object based on the passed in project key.
 Project getProjectObjByName(String projectName)
          Returns a Project object based on the passed in project name.
 Collection getProjects()
          Return all project GenericValues.
 Collection getProjectsByLead(User leadUser)
          Returns all the projects that leadUser is the project lead for.
 Collection getProjectsFromProjectCategory(org.ofbiz.core.entity.GenericValue projectCategory)
          Gather a list of projects that are in a project category.
 Collection getProjectsWithNoCategory()
          Gets a list of projects that are not associated with any project category
 void refresh()
          Causes a full refresh of the project cache.
 void refreshProjectDependencies(org.ofbiz.core.entity.GenericValue project)
          This will refresh the dependencies of a project.
 void setProjectCategory(org.ofbiz.core.entity.GenericValue project, org.ofbiz.core.entity.GenericValue category)
          If category is non-null, set project's Project Category to category.
 void updateProject(org.ofbiz.core.entity.GenericValue updatedProject)
          Persists a project GenericValue to the database.
 void updateProjectCategory(org.ofbiz.core.entity.GenericValue projectCat)
          Persist an updated project category.
 
Methods inherited from class com.atlassian.jira.project.AbstractProjectManager
convertToProjects, getComponents, getDefaultAssignee, getProject, getProjectCategoryByName, isDefaultAssignee, isDefaultAssignee
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultProjectManager

public DefaultProjectManager()
Don't use this constructor.

Use ManagerFactory.getProjectManager() instead.


DefaultProjectManager

public DefaultProjectManager(OfBizDelegator delegator,
                             com.atlassian.core.ofbiz.association.AssociationManager associationManager,
                             ProjectFactory projectFactory)
Method Detail

getNextId

public long getNextId(org.ofbiz.core.entity.GenericValue project)
Description copied from interface: ProjectManager
Get the next issue ID from this project (transactional). Each project maintains an internal counter for the number of issues. This method may be used to construct a new issue key.

Returns:
A long value representing a new issue id for the project.

updateProject

public void updateProject(org.ofbiz.core.entity.GenericValue updatedProject)
Description copied from interface: ProjectManager
Persists a project GenericValue to the database.

Specified by:
updateProject in interface ProjectManager
Specified by:
updateProject in class AbstractProjectManager

getProject

public org.ofbiz.core.entity.GenericValue getProject(Long id)
Description copied from interface: ProjectManager
Retrieve a single project by it's id.

Specified by:
getProject in interface ProjectManager
Specified by:
getProject in class AbstractProjectManager

getProjectObj

public Project getProjectObj(Long id)
Description copied from interface: ProjectManager
Retrieves a single Project by its id.

Specified by:
getProjectObj in interface ProjectManager
Specified by:
getProjectObj in class AbstractProjectManager
Returns:
project object or null if project with that id doesn't exist

getProjectByName

public org.ofbiz.core.entity.GenericValue getProjectByName(String name)
Description copied from interface: ProjectManager
Retrieve a single project by it's project name.

Specified by:
getProjectByName in interface ProjectManager
Specified by:
getProjectByName in class AbstractProjectManager

getProjectByKey

public org.ofbiz.core.entity.GenericValue getProjectByKey(String key)
Description copied from interface: ProjectManager
Retrieve a single project by it's project key.

Specified by:
getProjectByKey in interface ProjectManager
Specified by:
getProjectByKey in class AbstractProjectManager

getProjectObjByKey

public Project getProjectObjByKey(String projectKey)
Description copied from interface: ProjectManager
Returns a Project object based on the passed in project key.

Specified by:
getProjectObjByKey in interface ProjectManager
Specified by:
getProjectObjByKey in class AbstractProjectManager
Returns:
the Project object specified by the key or null

getProjectObjByName

public Project getProjectObjByName(String projectName)
Description copied from interface: ProjectManager
Returns a Project object based on the passed in project name.

Parameters:
projectName - the name of the project
Returns:
the Project object specified by the supplied name or null

getComponent

public org.ofbiz.core.entity.GenericValue getComponent(Long id)
Deprecated. use ProjectComponentManager instead

Description copied from interface: ProjectManager
Get a component from within this project, by it's id.

Specified by:
getComponent in interface ProjectManager
Specified by:
getComponent in class AbstractProjectManager
Returns:
A component GenericValue.

getComponent

public org.ofbiz.core.entity.GenericValue getComponent(org.ofbiz.core.entity.GenericValue project,
                                                       String name)
Deprecated. use ProjectComponentManager instead

Description copied from interface: ProjectManager
Get a component from within this project, based on the project and the component name. NOTE: This is not cached currently.

Specified by:
getComponent in interface ProjectManager
Specified by:
getComponent in class AbstractProjectManager
Returns:
A component GenericValue.

getComponents

public Collection getComponents(org.ofbiz.core.entity.GenericValue project)
Deprecated. use ProjectComponentManager instead

Description copied from interface: ProjectManager
Returns a collection of components in a project.

Specified by:
getComponents in interface ProjectManager
Specified by:
getComponents in class AbstractProjectManager
Returns:
A collection of GenericValues.

getProjects

public Collection getProjects()
Return all project GenericValues.

Specified by:
getProjects in interface ProjectManager
Specified by:
getProjects in class AbstractProjectManager

getDelegator

protected OfBizDelegator getDelegator()

getProjectCategories

public Collection getProjectCategories()
Description copied from interface: ProjectManager
Get all ProjectCategories.

Specified by:
getProjectCategories in interface ProjectManager
Specified by:
getProjectCategories in class AbstractProjectManager
Returns:
A collection of category GenericValues

getProjectCategory

public org.ofbiz.core.entity.GenericValue getProjectCategory(Long id)
Description copied from interface: ProjectManager
Returns a single project category by id.

Specified by:
getProjectCategory in interface ProjectManager
Specified by:
getProjectCategory in class AbstractProjectManager
Returns:
A category GenericValue

updateProjectCategory

public void updateProjectCategory(org.ofbiz.core.entity.GenericValue projectCat)
Description copied from interface: ProjectManager
Persist an updated project category.

Specified by:
updateProjectCategory in interface ProjectManager
Specified by:
updateProjectCategory in class AbstractProjectManager

getProjectsFromProjectCategory

public Collection getProjectsFromProjectCategory(org.ofbiz.core.entity.GenericValue projectCategory)
Gather a list of projects that are in a project category.

Specified by:
getProjectsFromProjectCategory in interface ProjectManager
Specified by:
getProjectsFromProjectCategory in class AbstractProjectManager
Parameters:
projectCategory - Project to look up against
Returns:
Collection of Projects

getProjectsWithNoCategory

public Collection getProjectsWithNoCategory()
Gets a list of projects that are not associated with any project category

Specified by:
getProjectsWithNoCategory in interface ProjectManager
Specified by:
getProjectsWithNoCategory in class AbstractProjectManager
Returns:
A collection of project GenericValues sorted by name

getProjectCategoryFromProject

public org.ofbiz.core.entity.GenericValue getProjectCategoryFromProject(org.ofbiz.core.entity.GenericValue project)
Get the Project Category given a Project.

Specified by:
getProjectCategoryFromProject in interface ProjectManager
Specified by:
getProjectCategoryFromProject in class AbstractProjectManager
Parameters:
project - Project
Returns:
Project Category

setProjectCategory

public void setProjectCategory(org.ofbiz.core.entity.GenericValue project,
                               org.ofbiz.core.entity.GenericValue category)
If category is non-null, set project's Project Category to category. If category is null, remove project's Project Category association, if one exists.

Specified by:
setProjectCategory in interface ProjectManager
Specified by:
setProjectCategory in class AbstractProjectManager
Parameters:
project -
category -

getProjectsByLead

public Collection getProjectsByLead(User leadUser)
Description copied from interface: ProjectManager
Returns all the projects that leadUser is the project lead for.

Returns:
A collection of project GenericValues

refreshProjectDependencies

public void refreshProjectDependencies(org.ofbiz.core.entity.GenericValue project)
Description copied from interface: ProjectManager
This will refresh the dependencies of a project. Please do not use this to refresh the passed in project in the project cache. use ProjectManager.refresh()


refresh

public void refresh()
Description copied from interface: ProjectManager
Causes a full refresh of the project cache.



Copyright © 2002-2009 Atlassian. All Rights Reserved.