|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.project.AbstractProjectManager com.atlassian.jira.project.CachingProjectManager
public class CachingProjectManager
Constructor Summary | |
---|---|
protected |
CachingProjectManager(ProjectManager delegateProjectManager,
ProjectComponentManager projectComponentManager,
boolean updateCache)
This constructor is to allow test cases to fire up a caching project manager without instantiating the internal project cache. |
|
CachingProjectManager(ProjectManager delegateProjectManager,
ProjectComponentManager projectComponentManager,
ProjectFactory projectFactory)
Normal constructor. |
Method Summary | |
---|---|
ProjectCache |
getCache()
|
org.ofbiz.core.entity.GenericValue |
getComponent(org.ofbiz.core.entity.GenericValue project,
String name)
Deprecated. use ProjectComponentManager and ProjectComponent |
org.ofbiz.core.entity.GenericValue |
getComponent(Long id)
Deprecated. use ProjectComponentManager and ProjectComponent |
Collection |
getComponents(org.ofbiz.core.entity.GenericValue project)
Deprecated. use ProjectComponentManager and ProjectComponent |
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)
Returns a project's category. |
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 GenericValue s. |
Collection |
getProjectsByLead(User leadUser)
Returns all the projects that leadUser is the project lead for. |
Collection |
getProjectsFromProjectCategory(org.ofbiz.core.entity.GenericValue projectCategory)
Returns a list of projects in a particular category. |
Collection |
getProjectsWithNoCategory()
Returns a list of projects without project category, sorted by project name |
protected Collection |
noNull(Collection col)
|
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)
Sets a projects category. |
void |
updateCache()
|
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 |
---|
public CachingProjectManager(ProjectManager delegateProjectManager, ProjectComponentManager projectComponentManager, ProjectFactory projectFactory)
delegateProjectManager
- The ProjectManager
to delegate to.protected CachingProjectManager(ProjectManager delegateProjectManager, ProjectComponentManager projectComponentManager, boolean updateCache)
delegateProjectManager
- The ProjectManager
to delegate to.updateCache
- Whether to instantiate a ProjectCache
.Method Detail |
---|
public void updateCache()
public long getNextId(org.ofbiz.core.entity.GenericValue project)
ProjectManager
public void refreshProjectDependencies(org.ofbiz.core.entity.GenericValue project)
ProjectManager
ProjectManager.refresh()
public void refresh()
ProjectManager
public org.ofbiz.core.entity.GenericValue getProject(Long id)
ProjectManager
getProject
in interface ProjectManager
getProject
in class AbstractProjectManager
public Project getProjectObj(Long id)
ProjectManager
Project
by its id.
getProjectObj
in interface ProjectManager
getProjectObj
in class AbstractProjectManager
public org.ofbiz.core.entity.GenericValue getProjectByName(String name)
ProjectManager
getProjectByName
in interface ProjectManager
getProjectByName
in class AbstractProjectManager
public org.ofbiz.core.entity.GenericValue getProjectByKey(String key)
ProjectManager
getProjectByKey
in interface ProjectManager
getProjectByKey
in class AbstractProjectManager
public Project getProjectObjByKey(String projectKey)
ProjectManager
Project
object based on the passed in project key.
getProjectObjByKey
in interface ProjectManager
getProjectObjByKey
in class AbstractProjectManager
Project
object specified by the key or nullpublic Project getProjectObjByName(String projectName)
ProjectManager
Project
object based on the passed in project name.
projectName
- the name of the project
Project
object specified by the supplied name or nullpublic org.ofbiz.core.entity.GenericValue getComponent(org.ofbiz.core.entity.GenericValue project, String name)
getComponent
in interface ProjectManager
getComponent
in class AbstractProjectManager
project
- the Project.name
- the Component name.
public org.ofbiz.core.entity.GenericValue getComponent(Long id)
getComponent
in interface ProjectManager
getComponent
in class AbstractProjectManager
id
- the id of the component to retrieve
public Collection getComponents(org.ofbiz.core.entity.GenericValue project)
getComponents
in interface ProjectManager
getComponents
in class AbstractProjectManager
project
- the project (as a GenericValue) used to search on
public Collection getProjects()
ProjectManager
GenericValue
s.
getProjects
in interface ProjectManager
getProjects
in class AbstractProjectManager
protected Collection noNull(Collection col)
public void updateProject(org.ofbiz.core.entity.GenericValue updatedProject)
ProjectManager
GenericValue
to the database.
updateProject
in interface ProjectManager
updateProject
in class AbstractProjectManager
public Collection getProjectCategories()
ProjectManager
getProjectCategories
in interface ProjectManager
getProjectCategories
in class AbstractProjectManager
GenericValue
spublic org.ofbiz.core.entity.GenericValue getProjectCategory(Long id)
ProjectManager
getProjectCategory
in interface ProjectManager
getProjectCategory
in class AbstractProjectManager
GenericValue
public void updateProjectCategory(org.ofbiz.core.entity.GenericValue projectCat)
ProjectManager
updateProjectCategory
in interface ProjectManager
updateProjectCategory
in class AbstractProjectManager
public Collection getProjectsFromProjectCategory(org.ofbiz.core.entity.GenericValue projectCategory)
ProjectManager
getProjectsFromProjectCategory
in interface ProjectManager
getProjectsFromProjectCategory
in class AbstractProjectManager
GenericValue
s sorted by name. Returns null if the projectCategory param is nullpublic org.ofbiz.core.entity.GenericValue getProjectCategoryFromProject(org.ofbiz.core.entity.GenericValue project)
ProjectManager
getProjectCategoryFromProject
in interface ProjectManager
getProjectCategoryFromProject
in class AbstractProjectManager
GenericValue
or null if no category exists.public Collection getProjectsWithNoCategory()
ProjectManager
getProjectsWithNoCategory
in interface ProjectManager
getProjectsWithNoCategory
in class AbstractProjectManager
GenericValue
s sorted by namepublic void setProjectCategory(org.ofbiz.core.entity.GenericValue project, org.ofbiz.core.entity.GenericValue category)
ProjectManager
setProjectCategory
in interface ProjectManager
setProjectCategory
in class AbstractProjectManager
public Collection getProjectsByLead(User leadUser)
ProjectManager
GenericValue
spublic ProjectCache getCache()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |