|
||||||||||
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 | |
---|---|
CachingProjectManager(ProjectManager delegateProjectManager,
ProjectComponentManager projectComponentManager,
ProjectFactory projectFactory,
com.atlassian.event.api.EventPublisher eventPublisher,
UserManager userManager,
ApplicationProperties applicationProperties)
|
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. |
ProjectCategory |
createProjectCategory(String name,
String description)
Creates a new ProjectCategory with the given name and description. |
Collection<ProjectCategory> |
getAllProjectCategories()
Returns all ProjectCategories, ordered by name. |
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). |
long |
getNextId(Project 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<org.ofbiz.core.entity.GenericValue> |
getProjectCategories()
Get all ProjectCategories. |
org.ofbiz.core.entity.GenericValue |
getProjectCategory(Long id)
Returns a single project category by id. |
ProjectCategory |
getProjectCategoryForProject(Project project)
Returns a project's category. |
org.ofbiz.core.entity.GenericValue |
getProjectCategoryFromProject(org.ofbiz.core.entity.GenericValue project)
Returns a project's category. |
ProjectCategory |
getProjectCategoryObject(Long id)
Returns a single project category by id. |
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<org.ofbiz.core.entity.GenericValue> |
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<Project> |
getProjectsFromProjectCategory(ProjectCategory projectCategory)
Returns a list of projects in a particular category. |
List<Project> |
getProjectsLeadBy(com.atlassian.crowd.embedded.api.User leadUser)
Returns all the projects that leadUser is the project lead for ordered by the name of the Project. |
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 |
onClearCache(ClearCacheEvent event)
|
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 |
setProjectCategory(Project project,
ProjectCategory category)
Sets a project's category. |
void |
start()
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework. |
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. |
void |
updateProjectCategory(ProjectCategory projectCategory)
Persist an updated project category. |
Methods inherited from class com.atlassian.jira.project.AbstractProjectManager |
---|
convertToProjectObjects, convertToProjects, createProject, getComponents, getDefaultAssignee, getDefaultAssignee, getDefaultAssignee, getProject, getProjectCategoryByName, getProjectCategoryByNameIgnoreCase, getProjectCategoryObjectByName, getProjectCategoryObjectByNameIgnoreCase, 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, com.atlassian.event.api.EventPublisher eventPublisher, UserManager userManager, ApplicationProperties applicationProperties)
Method Detail |
---|
public void start() throws Exception
Startable
start
in interface Startable
Exception
- Allows implementations to throw an Exception.@EventListener public void onClearCache(ClearCacheEvent event)
public void updateCache()
public long getNextId(Project project)
ProjectManager
getNextId
in interface ProjectManager
getNextId
in class AbstractProjectManager
project
- The Project
public long getNextId(org.ofbiz.core.entity.GenericValue project)
ProjectManager
getNextId
in interface ProjectManager
project
- project GenericValue
public void refreshProjectDependencies(org.ofbiz.core.entity.GenericValue project)
ProjectManager
ProjectManager.refresh()
refreshProjectDependencies
in interface ProjectManager
project
- project GenericValuepublic void refresh()
ProjectManager
refresh
in interface ProjectManager
public org.ofbiz.core.entity.GenericValue getProject(Long id)
ProjectManager
getProject
in interface ProjectManager
id
- the Project ID.
public Project getProjectObj(Long id)
ProjectManager
Project
by its id.
getProjectObj
in interface ProjectManager
id
- ID of the Project.
public org.ofbiz.core.entity.GenericValue getProjectByName(String name)
ProjectManager
getProjectByName
in interface ProjectManager
name
- project name
public org.ofbiz.core.entity.GenericValue getProjectByKey(String key)
ProjectManager
getProjectByKey
in interface ProjectManager
key
- the project key
public Project getProjectObjByKey(String projectKey)
ProjectManager
Project
object based on the passed in project key.
getProjectObjByKey
in interface ProjectManager
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.
getProjectObjByKeyIgnoreCase
in interface ProjectManager
projectKey
- the project key, case does not matter.
public Project getProjectObjByName(String projectName)
ProjectManager
Project
object based on the passed in project name.
getProjectObjByName
in interface ProjectManager
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
project
- the Project.name
- the Component name.
ProjectComponentManager.findByComponentName(java.lang.Long, java.lang.String)
public org.ofbiz.core.entity.GenericValue getComponent(Long id)
getComponent
in interface ProjectManager
id
- the id of the component to retrieve
ProjectComponentManager.find(Long)
public Collection getComponents(org.ofbiz.core.entity.GenericValue project)
getComponents
in interface ProjectManager
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.
getProjects
in interface ProjectManager
public List<Project> getProjectObjects()
ProjectManager
Project
s ordered by name.
getProjectObjects
in interface ProjectManager
protected Collection noNull(Collection col)
public Project createProject(String name, String key, String description, String lead, String url, Long assigneeType, Long avatarId)
ProjectManager
createProject
in interface 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.
updateProject
in interface ProjectManager
updatedProject
- Project details to update.public Project updateProject(Project updatedProject, String name, String description, String lead, String url, Long assigneeType, Long avatarId)
ProjectManager
updateProject
in interface 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
removeProjectIssues
in interface 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.
removeProject
in interface ProjectManager
project
- The project to be deleted.public Collection<org.ofbiz.core.entity.GenericValue> getProjectCategories()
ProjectManager
getProjectCategories
in interface ProjectManager
GenericValue
spublic Collection<ProjectCategory> getAllProjectCategories()
ProjectManager
getAllProjectCategories
in interface ProjectManager
public org.ofbiz.core.entity.GenericValue getProjectCategory(Long id)
ProjectManager
getProjectCategory
in interface ProjectManager
id
- Project Category ID.
GenericValue
public ProjectCategory getProjectCategoryObject(Long id)
ProjectManager
getProjectCategoryObject
in interface ProjectManager
id
- Project Category ID.
public void updateProjectCategory(org.ofbiz.core.entity.GenericValue projectCat)
ProjectManager
updateProjectCategory
in interface ProjectManager
projectCat
- project category.public void updateProjectCategory(ProjectCategory projectCategory) throws DataAccessException
ProjectManager
updateProjectCategory
in interface ProjectManager
projectCategory
- project category.
DataAccessException
- If any errors occur accessing the DB.public Collection<org.ofbiz.core.entity.GenericValue> getProjectsFromProjectCategory(org.ofbiz.core.entity.GenericValue projectCategory)
ProjectManager
getProjectsFromProjectCategory
in interface ProjectManager
projectCategory
- project category.
GenericValue
s sorted by name.public Collection<Project> getProjectsFromProjectCategory(ProjectCategory projectCategory) throws DataAccessException
ProjectManager
getProjectsFromProjectCategory
in interface ProjectManager
projectCategory
- project category.
DataAccessException
- If any errors occur accessing the DB.public Collection<Project> getProjectObjectsFromProjectCategory(Long projectCategoryId)
ProjectManager
getProjectObjectsFromProjectCategory
in interface ProjectManager
projectCategoryId
- project category id.
Project
s sorted by name.public org.ofbiz.core.entity.GenericValue getProjectCategoryFromProject(org.ofbiz.core.entity.GenericValue project)
ProjectManager
getProjectCategoryFromProject
in interface ProjectManager
project
- project
GenericValue
or null if no category exists.public ProjectCategory getProjectCategoryForProject(Project project)
ProjectManager
getProjectCategoryForProject
in interface ProjectManager
project
- project
public Collection<org.ofbiz.core.entity.GenericValue> getProjectsWithNoCategory()
ProjectManager
getProjectsWithNoCategory
in interface ProjectManager
GenericValue
s sorted by namepublic Collection<Project> getProjectObjectsWithNoCategory() throws DataAccessException
ProjectManager
getProjectObjectsWithNoCategory
in interface 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
setProjectCategory
in interface ProjectManager
project
- projectcategory
- categorypublic void setProjectCategory(Project project, ProjectCategory category) throws DataAccessException
ProjectManager
setProjectCategory
in interface ProjectManager
project
- projectcategory
- category
DataAccessException
- If any errors occur accessing the DB.public List<Project> getProjectsLeadBy(com.atlassian.crowd.embedded.api.User leadUser)
ProjectManager
getProjectsLeadBy
in interface ProjectManager
leadUser
- Project Lead
public Collection<org.ofbiz.core.entity.GenericValue> getProjectsByLead(User leadUser)
ProjectManager
getProjectsByLead
in interface ProjectManager
leadUser
- Project Lead
GenericValue
spublic ProjectCategory createProjectCategory(String name, String description)
ProjectManager
createProjectCategory
in interface ProjectManager
name
- the Namedescription
- the Description.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |