|
||||||||||
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 | |
---|---|
Project |
createProject(String name,
String key,
String description,
String lead,
String url,
Long assigneeType,
Long avatarId)
Creates the project in the database, and adds default project roles for this project. |
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 |
getProjectObjByKeyIgnoreCase(String projectKey)
Returns a Project object based ont he passed in project key, not taking into account the case
of the project key. |
Project |
getProjectObjByName(String projectName)
Returns a Project object based on the passed in project name. |
List<Project> |
getProjectObjects()
Return all Project s ordered by name. |
Collection<Project> |
getProjectObjectsFromProjectCategory(Long projectCategoryId)
Returns a list of projects in a particular category. |
Collection<Project> |
getProjectObjectsWithNoCategory()
Returns a list of projects without project category, sorted by project name |
Collection<org.ofbiz.core.entity.GenericValue> |
getProjects()
Return all project GenericValue s. |
Collection |
getProjectsByLead(User leadUser)
Returns all the projects that leadUser is the project lead for. |
Collection<org.ofbiz.core.entity.GenericValue> |
getProjectsFromProjectCategory(org.ofbiz.core.entity.GenericValue projectCategory)
Returns a list of projects in a particular category. |
Collection<org.ofbiz.core.entity.GenericValue> |
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 |
removeProject(Project project)
Deletes the provided project from the database. |
void |
removeProjectIssues(Project project)
Removes all issues for a particular 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. |
Project |
updateProject(Project updatedProject,
String name,
String description,
String lead,
String url,
Long assigneeType,
Long avatarId)
Updates the project provided with the new attributes passed in. |
void |
updateProjectCategory(org.ofbiz.core.entity.GenericValue projectCat)
Persist an updated project category. |
Methods inherited from class com.atlassian.jira.project.AbstractProjectManager |
---|
convertToProjects, createProject, getComponents, getDefaultAssignee, getNextId, getProject, getProjectCategoryByName, getProjectCategoryByNameIgnoreCase, isDefaultAssignee, isDefaultAssignee, updateProject |
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
project
- project GenericValue
public void refreshProjectDependencies(org.ofbiz.core.entity.GenericValue project)
ProjectManager
ProjectManager.refresh()
project
- project GenericValuepublic void refresh()
ProjectManager
public org.ofbiz.core.entity.GenericValue getProject(Long id)
ProjectManager
id
- the Project ID.
public Project getProjectObj(Long id)
ProjectManager
Project
by its id.
id
- ID of the Project.
public org.ofbiz.core.entity.GenericValue getProjectByName(String name)
ProjectManager
name
- project name
public org.ofbiz.core.entity.GenericValue getProjectByKey(String key)
ProjectManager
key
- the project key
public Project getProjectObjByKey(String projectKey)
ProjectManager
Project
object based on the passed in project key.
projectKey
- the Project key.
Project
object specified by the key or nullpublic Project getProjectObjByKeyIgnoreCase(String projectKey)
ProjectManager
Project
object based ont he passed in project key, not taking into account the case
of the project key.
projectKey
- the project key, case does not matter.
public 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)
project
- the Project.name
- the Component name.
ProjectComponentManager.findByComponentName(java.lang.Long, java.lang.String)
public org.ofbiz.core.entity.GenericValue getComponent(Long id)
id
- the id of the component to retrieve
ProjectComponentManager.find(Long)
public Collection getComponents(org.ofbiz.core.entity.GenericValue project)
project
- the project (as a GenericValue) used to search on
ProjectComponentManager.findAllForProject(java.lang.Long)
public Collection<org.ofbiz.core.entity.GenericValue> getProjects()
ProjectManager
GenericValue
s.
public List<Project> getProjectObjects()
ProjectManager
Project
s ordered by name.
protected Collection noNull(Collection col)
public Project createProject(String name, String key, String description, String lead, String url, Long assigneeType, Long avatarId)
ProjectManager
name
- The name of the new projectkey
- The project key of the new projectdescription
- An optional description for the projectlead
- The lead developer for the projecturl
- An optional URL for the new projectassigneeType
- The default assignee for issues created in this project. May be either project lead, or
unassigned if unassigned issues are enabled.avatarId
- the id of an existing system avatar.
public void updateProject(org.ofbiz.core.entity.GenericValue updatedProject)
ProjectManager
GenericValue
to the database.
updatedProject
- Project details to update.public Project updateProject(Project updatedProject, String name, String description, String lead, String url, Long assigneeType, Long avatarId)
ProjectManager
updatedProject
- The project to be updated.name
- The name for the updated projectdescription
- An optional description for the projectlead
- The lead developer for the projecturl
- An optional URL for the updated projectassigneeType
- The default assignee for issues created in this project. May be either project lead, or
unassigned if unassigned issues are enabled.avatarId
- the id of an existing avatar.
public void removeProjectIssues(Project project) throws RemoveException
ProjectManager
project
- The project for which issues will be deleted.
RemoveException
- if there's any errors removing issuespublic void removeProject(Project project)
ProjectManager
ProjectService.deleteProject(com.opensymphony.user.User, com.atlassian.jira.bc.project.ProjectService.DeleteProjectValidationResult)
to
properly delete a project.
project
- The project to be deleted.public Collection getProjectCategories()
ProjectManager
GenericValue
spublic org.ofbiz.core.entity.GenericValue getProjectCategory(Long id)
ProjectManager
id
- Project Category ID.
GenericValue
public void updateProjectCategory(org.ofbiz.core.entity.GenericValue projectCat)
ProjectManager
projectCat
- project category.public Collection<org.ofbiz.core.entity.GenericValue> getProjectsFromProjectCategory(org.ofbiz.core.entity.GenericValue projectCategory)
ProjectManager
projectCategory
- project category.
GenericValue
s sorted by name.public Collection<Project> getProjectObjectsFromProjectCategory(Long projectCategoryId)
ProjectManager
projectCategoryId
- project category id.
Project
s sorted by name.public org.ofbiz.core.entity.GenericValue getProjectCategoryFromProject(org.ofbiz.core.entity.GenericValue project)
ProjectManager
project
- project
GenericValue
or null if no category exists.public Collection<org.ofbiz.core.entity.GenericValue> getProjectsWithNoCategory()
ProjectManager
GenericValue
s sorted by namepublic Collection<Project> getProjectObjectsWithNoCategory() throws DataAccessException
ProjectManager
Project
s sorted by name
DataAccessException
- If any errors occur accessing the DB.public void setProjectCategory(org.ofbiz.core.entity.GenericValue project, org.ofbiz.core.entity.GenericValue category)
ProjectManager
project
- projectcategory
- categorypublic Collection getProjectsByLead(User leadUser)
ProjectManager
leadUser
- Project Lead
GenericValue
s
TODO: deprecate this method.public ProjectCache getCache()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |