com.atlassian.jira.project
Interface ProjectManager

All Known Implementing Classes:
AbstractProjectManager, CachingProjectManager, DefaultProjectManager, MockCachingProjectManager, MockDefaultProjectManager

public interface ProjectManager

Implementations of this interface are responsible for all management of project entities within JIRA.


Method Summary
 List<Project> convertToProjectObjects(Collection<Long> projectIds)
          Converts a collection of projectIds to a list of projects.
 List<org.ofbiz.core.entity.GenericValue> convertToProjects(Collection<Long> projectIds)
          Deprecated. Use convertToProjectObjects(java.util.Collection) instead. Since v4.4.
 Project createProject(String name, String key, String description, String lead, String url, Long assigneeType)
          Creates the project in the database, and adds default project roles for this project.
 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 instead. Deprecated in v4.0.
 org.ofbiz.core.entity.GenericValue getComponent(Long id)
          Deprecated. Use ProjectComponentManager instead. Deprecated in v4.0.
 Collection<org.ofbiz.core.entity.GenericValue> getComponents(org.ofbiz.core.entity.GenericValue project)
          Deprecated. Use ProjectComponentManager instead. Deprecated in v4.0.
 Collection<org.ofbiz.core.entity.GenericValue> getComponents(List<Long> ids)
          Deprecated. Use ProjectComponentManager.getComponents(java.util.List) instead. Deprecated since v4.0.
 User getDefaultAssignee(org.ofbiz.core.entity.GenericValue project, org.ofbiz.core.entity.GenericValue component)
          Deprecated. Please use getDefaultAssignee(Project, ProjectComponent). Since v4.3
 com.atlassian.crowd.embedded.api.User getDefaultAssignee(Project project, Collection<ProjectComponent> components)
          Gets the default assignee for an issue given its project and list of Components.
 com.atlassian.crowd.embedded.api.User getDefaultAssignee(Project project, ProjectComponent component)
          Deprecated. Use getDefaultAssignee(Project, java.util.Collection) which allows for multiple components. Since v4.4.
 long getNextId(org.ofbiz.core.entity.GenericValue project)
          Deprecated. Use getNextId(Project) instead. Deprecated since v4.0.
 long getNextId(Project project)
          Get the next issue ID from this project (transactional).
 org.ofbiz.core.entity.GenericValue getProject(org.ofbiz.core.entity.GenericValue issue)
          Deprecated. Use Issue.getProjectObject() instead. Deprecated since v4.0.
 org.ofbiz.core.entity.GenericValue getProject(Long id)
          Deprecated. please use getProjectObj(java.lang.Long)
 org.ofbiz.core.entity.GenericValue getProjectByKey(String key)
          Deprecated. please use the getProjectObjByKey(java.lang.String) method to return a Project object
 org.ofbiz.core.entity.GenericValue getProjectByName(String name)
          Deprecated. Please use getProjectObjByName(java.lang.String) instead. Deprecated since v4.0.
 Collection<org.ofbiz.core.entity.GenericValue> getProjectCategories()
          Deprecated. since v4.4. Use getAllProjectCategories() instead.
 org.ofbiz.core.entity.GenericValue getProjectCategory(Long id)
          Deprecated. Use getProjectCategoryObject(Long) instead. Since v4.4.
 org.ofbiz.core.entity.GenericValue getProjectCategoryByName(String projectCategoryName)
          Deprecated. Use getProjectCategoryObjectByName(String) instead. Since v4.4.
 org.ofbiz.core.entity.GenericValue getProjectCategoryByNameIgnoreCase(String projectCategoryName)
          Deprecated. Use getProjectCategoryObjectByNameIgnoreCase(String) instead. Since v4.4.
 ProjectCategory getProjectCategoryForProject(Project project)
          Returns a project's category.
 org.ofbiz.core.entity.GenericValue getProjectCategoryFromProject(org.ofbiz.core.entity.GenericValue project)
          Deprecated. Use getProjectCategoryForProject(com.atlassian.jira.project.Project) instead. Since 4.4
 ProjectCategory getProjectCategoryObject(Long id)
          Returns a single project category by id.
 ProjectCategory getProjectCategoryObjectByName(String projectCategoryName)
          Find a project category by name.
 ProjectCategory getProjectCategoryObjectByNameIgnoreCase(String projectCategoryName)
          Find a project category by name ignoring the case of the category name.
 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 Projects 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()
          Deprecated. Use getProjectObjects() instead. Deprecated in v4.0.
 Collection<org.ofbiz.core.entity.GenericValue> getProjectsByLead(User leadUser)
          Deprecated. Use getProjectsLeadBy(com.atlassian.crowd.embedded.api.User) instead
 Collection<org.ofbiz.core.entity.GenericValue> getProjectsFromProjectCategory(org.ofbiz.core.entity.GenericValue projectCategory)
          Deprecated. Use getProjectsFromProjectCategory(ProjectCategory) instead. Since v4.4.
 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()
          Deprecated. Use getProjectObjectsWithNoCategory() instead. Since v4.4.
 boolean isDefaultAssignee(org.ofbiz.core.entity.GenericValue project)
          Deprecated. Use getDefaultAssignee(Project, java.util.Collection) and check for DefaultAssigneeException. Since v4.4.
 boolean isDefaultAssignee(org.ofbiz.core.entity.GenericValue project, org.ofbiz.core.entity.GenericValue component)
          Deprecated. Use getDefaultAssignee(Project, java.util.Collection) and check for DefaultAssigneeException. Since v4.4.
 void refresh()
          Causes a full refresh of the project cache.
 void refreshProjectDependencies(org.ofbiz.core.entity.GenericValue project)
          Deprecated. This method is no longer relevant and does not work as documented. Since v4.4.
 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)
          Deprecated. since v4.4. Use setProjectCategory(com.atlassian.jira.project.Project, com.atlassian.jira.project.ProjectCategory) instead.
 void setProjectCategory(Project project, ProjectCategory category)
          Sets a project's category.
 void updateProject(org.ofbiz.core.entity.GenericValue updatedProject)
          Deprecated. Use updateProject(Project, String, String, String, String, Long) instead
 Project updateProject(Project originalProject, String name, String description, String lead, String url, Long assigneeType)
          Updates the project provided with the new attributes passed in.
 Project updateProject(Project originalProject, 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)
          Deprecated. Use updateProjectCategory(ProjectCategory) instead. Since v4.4.
 void updateProjectCategory(ProjectCategory projectCategory)
          Persist an updated project category.
 

Method Detail

createProject

Project createProject(String name,
                      String key,
                      String description,
                      String lead,
                      String url,
                      Long assigneeType)
Creates the project in the database, and adds default project roles for this project. If no name, key or lead are provided an exception will be thrown.

Parameters:
name - The name of the new project
key - The project key of the new project
description - An optional description for the project
lead - The lead developer for the project
url - An optional URL for the new project
assigneeType - The default assignee for issues created in this project. May be either project lead, or unassigned if unassigned issues are enabled.
Returns:
The newly created project.

createProject

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. If no name, key or lead are provided an exception will be thrown.

Parameters:
name - The name of the new project
key - The project key of the new project
description - An optional description for the project
lead - The lead developer for the project
url - An optional URL for the new project
assigneeType - 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.
Returns:
The newly created project.

updateProject

@Deprecated
void updateProject(org.ofbiz.core.entity.GenericValue updatedProject)
                   throws DataAccessException
Deprecated. Use updateProject(Project, String, String, String, String, Long) instead

Persists a project GenericValue to the database.

Parameters:
updatedProject - Project details to update.
Throws:
DataAccessException - If any errors occur accessing the DB.

updateProject

Project updateProject(Project originalProject,
                      String name,
                      String description,
                      String lead,
                      String url,
                      Long assigneeType)
Updates the project provided with the new attributes passed in. This method is responsible for persisting any changes to the database.

Parameters:
originalProject - The project to be updated.
name - The name for the updated project
description - An optional description for the project
lead - The lead developer for the project
url - An optional URL for the updated project
assigneeType - The default assignee for issues created in this project. May be either project lead, or unassigned if unassigned issues are enabled.
Returns:
The updated project

updateProject

Project updateProject(Project originalProject,
                      String name,
                      String description,
                      String lead,
                      String url,
                      Long assigneeType,
                      Long avatarId)
Updates the project provided with the new attributes passed in. This method is responsible for persisting any changes to the database.

Parameters:
originalProject - The project to be updated.
name - The name for the updated project
description - An optional description for the project
lead - The lead developer for the project
url - An optional URL for the updated project
assigneeType - 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.
Returns:
The updated project

removeProjectIssues

void removeProjectIssues(Project project)
                         throws RemoveException
Removes all issues for a particular project. A RemoveException will be thrown on any errors removing issues.

Parameters:
project - The project for which issues will be deleted.
Throws:
RemoveException - if there's any errors removing issues

removeProject

void removeProject(Project project)
Deletes the provided project from the database. Please note that this method only deletes the project itself and not any related entities. Use ProjectService.deleteProject(com.opensymphony.user.User, com.atlassian.jira.bc.project.ProjectService.DeleteProjectValidationResult) to properly delete a project.

Parameters:
project - The project to be deleted.

getProject

@Deprecated
org.ofbiz.core.entity.GenericValue getProject(org.ofbiz.core.entity.GenericValue issue)
                                              throws DataAccessException
Deprecated. Use Issue.getProjectObject() instead. Deprecated since v4.0.

Returns a project GenericValue that an issue is in.

Parameters:
issue - the issue.
Returns:
GenericValue representation of a Project.
Throws:
DataAccessException - If any errors occur accessing the DB.

getProject

@Deprecated
org.ofbiz.core.entity.GenericValue getProject(Long id)
                                              throws DataAccessException
Deprecated. please use getProjectObj(java.lang.Long)

Retrieve a single project by it's id.

Parameters:
id - the Project ID.
Returns:
GenericValue representation of a Project.
Throws:
DataAccessException - If any errors occur accessing the DB.

getProjectObj

Project getProjectObj(Long id)
                      throws DataAccessException
Retrieves a single Project by its id.

Parameters:
id - ID of the Project.
Returns:
Project object or null if project with that id doesn't exist.
Throws:
DataAccessException - If any errors occur accessing the DB.

getProjectByName

@Deprecated
org.ofbiz.core.entity.GenericValue getProjectByName(String name)
                                                    throws DataAccessException
Deprecated. Please use getProjectObjByName(java.lang.String) instead. Deprecated since v4.0.

Retrieve a single project by it's project name.

Parameters:
name - project name
Returns:
GenericValue representation of a Project.
Throws:
DataAccessException - If any errors occur accessing the DB.

getProjectObjByName

Project getProjectObjByName(String projectName)
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

getProjectByKey

@Deprecated
org.ofbiz.core.entity.GenericValue getProjectByKey(String key)
                                                   throws DataAccessException
Deprecated. please use the getProjectObjByKey(java.lang.String) method to return a Project object

Retrieve a single project by it's project key.

Parameters:
key - the project key
Returns:
GenericValue representation of a Project.
Throws:
DataAccessException - If any errors occur accessing the DB.

getProjectObjByKey

Project getProjectObjByKey(String projectKey)
Returns a Project object based on the passed in project key.

Parameters:
projectKey - the Project key.
Returns:
the Project object specified by the key or null

getProjectObjByKeyIgnoreCase

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.

Parameters:
projectKey - the project key, case does not matter.
Returns:
the project object specified by the key or null if not such project exists.

getComponent

@Deprecated
org.ofbiz.core.entity.GenericValue getComponent(Long id)
                                                throws DataAccessException
Deprecated. Use ProjectComponentManager instead. Deprecated in v4.0.

Get a component from within this project, by it's id.

Parameters:
id - id
Returns:
A component GenericValue.
Throws:
DataAccessException - If any errors occur accessing the DB.
See Also:
ProjectComponentManager.find(Long)

getComponent

@Deprecated
org.ofbiz.core.entity.GenericValue getComponent(org.ofbiz.core.entity.GenericValue project,
                                                           String name)
                                                throws DataAccessException
Deprecated. Use ProjectComponentManager instead. Deprecated in v4.0.

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

Parameters:
project - project
name - name
Returns:
A component GenericValue.
Throws:
DataAccessException - If any errors occur accessing the DB.
See Also:
ProjectComponentManager.findByComponentName(java.lang.Long, java.lang.String)

getComponents

@Deprecated
Collection<org.ofbiz.core.entity.GenericValue> getComponents(org.ofbiz.core.entity.GenericValue project)
                                                             throws DataAccessException
Deprecated. Use ProjectComponentManager instead. Deprecated in v4.0.

Returns a collection of components in a project.

Parameters:
project - project
Returns:
A collection of GenericValues.
Throws:
DataAccessException - If any errors occur accessing the DB.
See Also:
ProjectComponentManager.findAllForProject(java.lang.Long)

getComponents

@Deprecated
Collection<org.ofbiz.core.entity.GenericValue> getComponents(List<Long> ids)
                                                             throws DataAccessException
Deprecated. Use ProjectComponentManager.getComponents(java.util.List) instead. Deprecated since v4.0.

Get a list of components from their IDs

Parameters:
ids - Component IDs
Returns:
A collection of component GenericValues
Throws:
DataAccessException - If any errors occur accessing the DB.

getProjects

Collection<org.ofbiz.core.entity.GenericValue> getProjects()
                                                           throws DataAccessException
Deprecated. Use getProjectObjects() instead. Deprecated in v4.0.

Return all project GenericValues.

Returns:
all projects as Collection
Throws:
DataAccessException - If any errors occur accessing the DB.

getProjectObjects

List<Project> getProjectObjects()
                                throws DataAccessException
Return all Projects ordered by name.

Returns:
all projects ordered by name.
Throws:
DataAccessException - If any errors occur accessing the DB.

getNextId

long getNextId(org.ofbiz.core.entity.GenericValue project)
               throws DataAccessException
Deprecated. Use getNextId(Project) instead. Deprecated since v4.0.

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.

Parameters:
project - project GenericValue
Returns:
A long value representing a new issue id for the project.
Throws:
DataAccessException - If any errors occur accessing the DB.

getNextId

long getNextId(Project project)
               throws DataAccessException
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.

Parameters:
project - The Project
Returns:
A long value representing a new issue id for the project.
Throws:
DataAccessException - If any errors occur accessing the DB.

refreshProjectDependencies

void refreshProjectDependencies(org.ofbiz.core.entity.GenericValue project)
                                throws DataAccessException
Deprecated. This method is no longer relevant and does not work as documented. Since v4.4.

This will refresh the dependencies of a project. Please do not use this to refresh the passed in project in the project cache. use refresh()

Parameters:
project - project GenericValue
Throws:
DataAccessException - If any errors occur accessing the DB.

refresh

void refresh()
Causes a full refresh of the project cache.


getProjectCategories

Collection<org.ofbiz.core.entity.GenericValue> getProjectCategories()
                                                                    throws DataAccessException
Deprecated. since v4.4. Use getAllProjectCategories() instead.

Get all ProjectCategories.

Returns:
A collection of category GenericValues
Throws:
DataAccessException - If any errors occur accessing the DB.

getAllProjectCategories

Collection<ProjectCategory> getAllProjectCategories()
                                                    throws DataAccessException
Returns all ProjectCategories, ordered by name.

Returns:
all ProjectCategories, ordered by name.
Throws:
DataAccessException - If any errors occur accessing the DB.

getProjectCategory

org.ofbiz.core.entity.GenericValue getProjectCategory(Long id)
                                                      throws DataAccessException
Deprecated. Use getProjectCategoryObject(Long) instead. Since v4.4.

Returns a single project category by id.

Parameters:
id - Project Category ID.
Returns:
A category GenericValue
Throws:
DataAccessException

getProjectCategoryObject

ProjectCategory getProjectCategoryObject(Long id)
                                         throws DataAccessException
Returns a single project category by id.

Parameters:
id - Project Category ID.
Returns:
The project category
Throws:
DataAccessException

getProjectCategoryByName

org.ofbiz.core.entity.GenericValue getProjectCategoryByName(String projectCategoryName)
                                                            throws DataAccessException
Deprecated. Use getProjectCategoryObjectByName(String) instead. Since v4.4.

Find a project category by name. NOTE: The current implementation is not the most efficient.

Parameters:
projectCategoryName - Name of the Project Category
Returns:
A category GenericValue
Throws:
DataAccessException - If any errors occur accessing the DB.

getProjectCategoryObjectByName

ProjectCategory getProjectCategoryObjectByName(String projectCategoryName)
Find a project category by name.

Parameters:
projectCategoryName - Name of the Project Category
Returns:
The ProjectCategory or null if none found

getProjectCategoryObjectByNameIgnoreCase

ProjectCategory getProjectCategoryObjectByNameIgnoreCase(String projectCategoryName)
Find a project category by name ignoring the case of the category name.

Parameters:
projectCategoryName - Name of the Project Category
Returns:
The ProjectCategory or null if none found

getProjectCategoryByNameIgnoreCase

org.ofbiz.core.entity.GenericValue getProjectCategoryByNameIgnoreCase(String projectCategoryName)
Deprecated. Use getProjectCategoryObjectByNameIgnoreCase(String) instead. Since v4.4.

Find a project category by name ignoring the case of the category name. NOTE: The current implementation is not the most efficient.

Parameters:
projectCategoryName - Name of the Project Category
Returns:
A category GenericValue
Throws:
DataAccessException - If any errors occur accessing the DB.

updateProjectCategory

void updateProjectCategory(org.ofbiz.core.entity.GenericValue projectCat)
                           throws DataAccessException
Deprecated. Use updateProjectCategory(ProjectCategory) instead. Since v4.4.

Persist an updated project category.

Parameters:
projectCat - project category.
Throws:
DataAccessException - If any errors occur accessing the DB.

updateProjectCategory

void updateProjectCategory(ProjectCategory projectCategory)
                           throws DataAccessException
Persist an updated project category.

Parameters:
projectCategory - project category.
Throws:
DataAccessException - If any errors occur accessing the DB.

getProjectsFromProjectCategory

Collection<org.ofbiz.core.entity.GenericValue> getProjectsFromProjectCategory(org.ofbiz.core.entity.GenericValue projectCategory)
                                                                              throws DataAccessException
Deprecated. Use getProjectsFromProjectCategory(ProjectCategory) instead. Since v4.4.

Returns a list of projects in a particular category.

Parameters:
projectCategory - project category.
Returns:
A collection of project GenericValues sorted by name.
Throws:
DataAccessException - If any errors occur accessing the DB.

getProjectsFromProjectCategory

Collection<Project> getProjectsFromProjectCategory(ProjectCategory projectCategory)
                                                   throws DataAccessException
Returns a list of projects in a particular category.

Parameters:
projectCategory - project category.
Returns:
A collection of projects sorted by name.
Throws:
DataAccessException - If any errors occur accessing the DB.

getProjectObjectsFromProjectCategory

Collection<Project> getProjectObjectsFromProjectCategory(Long projectCategoryId)
                                                         throws DataAccessException
Returns a list of projects in a particular category.

Parameters:
projectCategoryId - project category id.
Returns:
A collection of project Projects sorted by name.
Throws:
DataAccessException - If any errors occur accessing the DB.
Since:
v4.0

getProjectsWithNoCategory

Collection<org.ofbiz.core.entity.GenericValue> getProjectsWithNoCategory()
                                                                         throws DataAccessException
Deprecated. Use getProjectObjectsWithNoCategory() instead. Since v4.4.

Returns a list of projects without project category, sorted by project name

Returns:
A collection of project GenericValues sorted by name
Throws:
DataAccessException - If any errors occur accessing the DB.

getProjectObjectsWithNoCategory

Collection<Project> getProjectObjectsWithNoCategory()
                                                    throws DataAccessException
Returns a list of projects without project category, sorted by project name

Returns:
A collection of Projects sorted by name
Throws:
DataAccessException - If any errors occur accessing the DB.
Since:
v4.0

getProjectCategoryFromProject

org.ofbiz.core.entity.GenericValue getProjectCategoryFromProject(org.ofbiz.core.entity.GenericValue project)
                                                                 throws DataAccessException
Deprecated. Use getProjectCategoryForProject(com.atlassian.jira.project.Project) instead. Since 4.4

Returns a project's category.

Parameters:
project - project
Returns:
A category GenericValue or null if no category exists.
Throws:
DataAccessException - If any errors occur accessing the DB.

getProjectCategoryForProject

ProjectCategory getProjectCategoryForProject(Project project)
                                             throws DataAccessException
Returns a project's category.

Parameters:
project - project
Returns:
A ProjectCategory or null if this project has no category.
Throws:
DataAccessException - If any errors occur accessing the DB.
Since:
4.4

setProjectCategory

void setProjectCategory(org.ofbiz.core.entity.GenericValue project,
                        org.ofbiz.core.entity.GenericValue category)
                        throws DataAccessException
Deprecated. since v4.4. Use setProjectCategory(com.atlassian.jira.project.Project, com.atlassian.jira.project.ProjectCategory) instead.

Sets a projects category.

Parameters:
project - project
category - category
Throws:
DataAccessException - If any errors occur accessing the DB.
IllegalArgumentException - if the project provided is null

setProjectCategory

void setProjectCategory(Project project,
                        ProjectCategory category)
                        throws DataAccessException
Sets a project's category.

Parameters:
project - project
category - category
Throws:
DataAccessException - If any errors occur accessing the DB.
IllegalArgumentException - if the project provided is null

createProjectCategory

ProjectCategory createProjectCategory(String name,
                                      String description)
Creates a new ProjectCategory with the given name and description.

Parameters:
name - the Name
description - the Description.
Returns:
the new ProjectCategory.

isDefaultAssignee

boolean isDefaultAssignee(org.ofbiz.core.entity.GenericValue project)
Deprecated. Use getDefaultAssignee(Project, java.util.Collection) and check for DefaultAssigneeException. Since v4.4.

Checks if there is a valid default assignee for a given project.

Parameters:
project - project
Returns:
False if no assignee type is set for a project and unassigned issues are not allowed, and the projectlead is not assignable. Also false, if either the assigneetype is not unassigned or unassigned issues are not allowed and the projectlead is not assignable. Otherwise returns TRUE since there is a default assignee.

isDefaultAssignee

boolean isDefaultAssignee(org.ofbiz.core.entity.GenericValue project,
                          org.ofbiz.core.entity.GenericValue component)
Deprecated. Use getDefaultAssignee(Project, java.util.Collection) and check for DefaultAssigneeException. Since v4.4.

This function checks if there is a valid default assignee set in the system
If this returns false then the getDefaultAssignee(GenericValue, GenericValue) will throw an exception

Parameters:
project - project
component - component
Returns:
true if either the component is not null and has an assignee type != project default, or if isDefaultAssignee(org.ofbiz.core.entity.GenericValue) is true

getDefaultAssignee

User getDefaultAssignee(org.ofbiz.core.entity.GenericValue project,
                        org.ofbiz.core.entity.GenericValue component)
Deprecated. Please use getDefaultAssignee(Project, ProjectComponent). Since v4.3

Gets the default assignee for a project and/or component depending on if a component was specified.

Parameters:
project - project
component - component
Returns:
A User
Throws:
DefaultAssigneeException - If the default assignee does NOT have ASSIGNABLE permission OR Unassigned issues are turned off.

getDefaultAssignee

com.atlassian.crowd.embedded.api.User getDefaultAssignee(Project project,
                                                         ProjectComponent component)
Deprecated. Use getDefaultAssignee(Project, java.util.Collection) which allows for multiple components. Since v4.4.

Gets the default assignee for a project and/or component depending on if a component was specified.

Parameters:
project - project
component - component
Returns:
the default assignee for this project/component
Throws:
DefaultAssigneeException - If the default assignee does NOT have ASSIGNABLE permission OR Unassigned issues are turned off.

getDefaultAssignee

com.atlassian.crowd.embedded.api.User getDefaultAssignee(Project project,
                                                         Collection<ProjectComponent> components)
                                                         throws DefaultAssigneeException
Gets the default assignee for an issue given its project and list of Components.

If the default assignee configuration is invalid, then a DefaultAssigneeException is thrown. This could be because the default is unassigned, and unassigned issues are not allowed, or because the default user does not have permission to be assigned to issues in this project.

Parameters:
project - project
components - The components
Returns:
the default assignee for this project/components
Throws:
DefaultAssigneeException - If the default assignee is invalid (eg user does not have assign permission) .

getProjectsLeadBy

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.

Parameters:
leadUser - Project Lead
Returns:
A collection of projects

getProjectsByLead

Collection<org.ofbiz.core.entity.GenericValue> getProjectsByLead(User leadUser)
Deprecated. Use getProjectsLeadBy(com.atlassian.crowd.embedded.api.User) instead

Returns all the projects that leadUser is the project lead for.

Parameters:
leadUser - Project Lead
Returns:
A collection of project GenericValues

convertToProjects

List<org.ofbiz.core.entity.GenericValue> convertToProjects(Collection<Long> projectIds)
Deprecated. Use convertToProjectObjects(java.util.Collection) instead. Since v4.4.

Converts a collection of projectIds to a collection of projects. Will return null if is null or blank

Parameters:
projectIds - a Collection of Longs
Returns:
List of Project GenericValues. Null if input is empty

convertToProjectObjects

List<Project> convertToProjectObjects(Collection<Long> projectIds)
Converts a collection of projectIds to a list of projects.

Will return null if incoming collection is null.

The returned list of Project Objects will have the same sort order as the incoming collection of IDs.

Parameters:
projectIds - a Collection of Project IDs
Returns:
List of Projects, or null if input is null


Copyright © 2002-2011 Atlassian. All Rights Reserved.