|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.jira.project.AbstractProjectManager
com.atlassian.jira.project.DefaultProjectManager
public class DefaultProjectManager
A class to manage interactions with projects
Constructor Summary | |
---|---|
DefaultProjectManager()
Don't use this constructor. |
|
DefaultProjectManager(OfBizDelegator delegator,
AssociationManager associationManager,
ProjectFactory projectFactory,
ProjectRoleManager projectRoleManager,
IssueManager issueManager,
ActionDispatcher actionDispatcher,
AvatarManager avatarManager,
UserManager userManager)
|
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. |
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<org.ofbiz.core.entity.GenericValue> |
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<org.ofbiz.core.entity.GenericValue> |
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 |
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)
Gather a list of projects that are in a project 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()
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 |
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)
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. |
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, 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 DefaultProjectManager()
public DefaultProjectManager(OfBizDelegator delegator, AssociationManager associationManager, ProjectFactory projectFactory, ProjectRoleManager projectRoleManager, IssueManager issueManager, ActionDispatcher actionDispatcher, AvatarManager avatarManager, UserManager userManager)
Method Detail |
---|
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 long getNextId(org.ofbiz.core.entity.GenericValue project)
ProjectManager
project
- project GenericValue
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 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 null@Deprecated public org.ofbiz.core.entity.GenericValue getComponent(Long id)
ProjectManager
id
- id
GenericValue
.ProjectComponentManager.find(Long)
@Deprecated public org.ofbiz.core.entity.GenericValue getComponent(org.ofbiz.core.entity.GenericValue project, String name)
ProjectManager
project
- projectname
- name
GenericValue
.ProjectComponentManager.findByComponentName(java.lang.Long, java.lang.String)
@Deprecated public Collection<org.ofbiz.core.entity.GenericValue> getComponents(org.ofbiz.core.entity.GenericValue project)
ProjectManager
project
- project
GenericValue
s.ProjectComponentManager.findAllForProject(java.lang.Long)
public Collection<org.ofbiz.core.entity.GenericValue> getProjects()
GenericValue
s.
public List<Project> getProjectObjects() throws DataAccessException
ProjectManager
Project
s ordered by name.
DataAccessException
- If any errors occur accessing the DB.protected OfBizDelegator getDelegator()
public Collection<org.ofbiz.core.entity.GenericValue> 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)
projectCategory
- Project to look up against
public Collection<Project> getProjectObjectsFromProjectCategory(Long projectCategoryId)
ProjectManager
projectCategoryId
- project category id.
Project
s sorted by name.public Collection<org.ofbiz.core.entity.GenericValue> getProjectsWithNoCategory()
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 org.ofbiz.core.entity.GenericValue getProjectCategoryFromProject(org.ofbiz.core.entity.GenericValue project)
project
- Project
public void setProjectCategory(org.ofbiz.core.entity.GenericValue project, org.ofbiz.core.entity.GenericValue category)
category
is non-null, set project
's Project Category to category
. If
category
is null, remove project
's Project Category association, if one exists.
project
- projectcategory
- categorypublic List<Project> getProjectsLeadBy(com.atlassian.crowd.embedded.api.User leadUser)
ProjectManager
leadUser
- Project Lead
public final Collection<org.ofbiz.core.entity.GenericValue> getProjectsByLead(User leadUser)
ProjectManager
leadUser
- Project Lead
GenericValue
spublic void refreshProjectDependencies(org.ofbiz.core.entity.GenericValue project)
ProjectManager
ProjectManager.refresh()
project
- project GenericValuepublic void refresh()
ProjectManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |