|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 leadKey,
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. |
Set<String> |
getAllProjectKeys(Long projectId)
Returns all project keys that are associated with Project . |
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. |
long |
getCurrentCounterForProject(Long id)
Returns the curremt issue counter for the given project. |
com.atlassian.crowd.embedded.api.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(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) |
Project |
getProjectByCurrentKey(String projectKey)
Returns the Project with the given project key. |
Project |
getProjectByCurrentKeyIgnoreCase(String projectKey)
Returns a Project object based on the passed in project key, not taking into account the case
of the project key. |
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. |
long |
getProjectCount()
Return the total number of Project s. |
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 on the 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()
Deprecated. Use getProjectObjects() instead. Deprecated in v4.0. |
Collection<org.ofbiz.core.entity.GenericValue> |
getProjectsByLead(com.atlassian.crowd.embedded.api.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(ApplicationUser leadUser)
Returns all the projects that leadUser is the project lead for ordered by the name of the Project. |
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 |
removeProject(Project project)
Deletes the provided project from the database. |
void |
removeProjectCategory(Long id)
Removes the given ProjectCategory. |
void |
removeProjectIssues(Project project)
Removes all issues for a particular project. |
void |
setCurrentCounterForProject(Project project,
long counter)
Set the project counter. |
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. |
Project |
updateProject(Project originalProject,
String name,
String description,
String leadKey,
String url,
Long assigneeType)
Updates the project provided with the new attributes passed in. |
Project |
updateProject(Project originalProject,
String name,
String description,
String leadKey,
String url,
Long assigneeType,
Long avatarId)
Updates the project provided with the new attributes passed in. |
Project |
updateProject(Project originalProject,
String name,
String description,
String leadKey,
String url,
Long assigneeType,
Long avatarId,
String projectKey)
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 |
---|
Project createProject(String name, String key, String description, String lead, String url, Long assigneeType)
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.
Project createProject(String name, String key, String description, String leadKey, String url, Long assigneeType, Long avatarId)
WARNING: In 6.0, the documentation for this method incorrectly stated that this method would
interpret the lead
as a username, when it was in fact interpreted as a userkey. The method signatures
and documentation have been updated to describe the actual behaviour.
name
- The name of the new projectkey
- The project key of the new projectdescription
- An optional description for the projectleadKey
- The userkey of 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.
Project updateProject(Project originalProject, String name, String description, String leadKey, String url, Long assigneeType)
originalProject
- The project to be updated.name
- The name for the updated projectdescription
- An optional description for the projectleadKey
- The userkey of 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.
Project updateProject(Project originalProject, String name, String description, String leadKey, String url, Long assigneeType, Long avatarId, String projectKey)
originalProject
- The project to be updated.name
- The name for the updated projectdescription
- An optional description for the projectleadKey
- The userkey of 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.projectKey
- The new project key (not updated if null)
Project updateProject(Project originalProject, String name, String description, String leadKey, String url, Long assigneeType, Long avatarId)
originalProject
- The project to be updated.name
- The name for the updated projectdescription
- An optional description for the projectleadKey
- The userkey of 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.
void removeProjectIssues(Project project) throws RemoveException
project
- The project for which issues will be deleted.
RemoveException
- if there's any errors removing issuesvoid removeProject(Project project)
ProjectService.deleteProject(com.atlassian.crowd.embedded.api.User, com.atlassian.jira.bc.project.ProjectService.DeleteProjectValidationResult)
to
properly delete a project.
project
- The project to be deleted.@Deprecated org.ofbiz.core.entity.GenericValue getProject(org.ofbiz.core.entity.GenericValue issue) throws DataAccessException
Issue.getProjectObject()
instead. Deprecated since v4.0.
GenericValue
that an issue is in.
issue
- the issue.
DataAccessException
- If any errors occur accessing the DB.@Deprecated org.ofbiz.core.entity.GenericValue getProject(Long id) throws DataAccessException
getProjectObj(java.lang.Long)
id
- the Project ID.
DataAccessException
- If any errors occur accessing the DB.Project getProjectObj(Long id) throws DataAccessException
Project
by its id.
id
- ID of the Project.
DataAccessException
- If any errors occur accessing the DB.@Deprecated org.ofbiz.core.entity.GenericValue getProjectByName(String name) throws DataAccessException
getProjectObjByName(java.lang.String)
instead. Deprecated since v4.0.
name
- project name
DataAccessException
- If any errors occur accessing the DB.Project getProjectObjByName(String projectName)
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 org.ofbiz.core.entity.GenericValue getProjectByKey(String key) throws DataAccessException
getProjectObjByKey(java.lang.String)
method to return a Project
object
key
- the project key
DataAccessException
- If any errors occur accessing the DB.Project getProjectObjByKey(String projectKey)
Project
object based on the passed in project key.
projectKey
- the Project key.
Project
object specified by the key or null@ExperimentalApi Project getProjectByCurrentKey(String projectKey)
Project
with the given project key.
This method will strictly only return the project whose current project key is the one given.
This method is added to the API in anticipation of being able to edit the project key, but this feature has not actually been added in 6.0.
projectKey
- the Project key.
Project
with the given project key.getProjectObjByKey(String)
Project getProjectByCurrentKeyIgnoreCase(String projectKey)
Project
object based on the passed in project key, not taking into account the case
of the project key.
projectKey
- the project key, case does not matter.
Project getProjectObjByKeyIgnoreCase(String projectKey)
Project
object based on the passed in project key, not taking into account the case
of the project key. Matches also by previous keys that were associated with a project.
projectKey
- the project key, case does not matter.
Set<String> getAllProjectKeys(Long projectId)
Project
.
@Deprecated org.ofbiz.core.entity.GenericValue getComponent(Long id) throws DataAccessException
id
- id
GenericValue
.
DataAccessException
- If any errors occur accessing the DB.ProjectComponentManager.find(Long)
@Deprecated org.ofbiz.core.entity.GenericValue getComponent(org.ofbiz.core.entity.GenericValue project, String name) throws DataAccessException
project
- projectname
- name
GenericValue
.
DataAccessException
- If any errors occur accessing the DB.ProjectComponentManager.findByComponentName(java.lang.Long, java.lang.String)
@Deprecated Collection<org.ofbiz.core.entity.GenericValue> getComponents(org.ofbiz.core.entity.GenericValue project) throws DataAccessException
project
- project
GenericValue
s.
DataAccessException
- If any errors occur accessing the DB.ProjectComponentManager.findAllForProject(java.lang.Long)
Collection<org.ofbiz.core.entity.GenericValue> getProjects() throws DataAccessException
getProjectObjects()
instead. Deprecated in v4.0.
GenericValue
s.
DataAccessException
- If any errors occur accessing the DB.List<Project> getProjectObjects() throws DataAccessException
Project
s ordered by name.
DataAccessException
- If any errors occur accessing the DB.long getProjectCount() throws DataAccessException
Project
s.
DataAccessException
- if any errors occur accessing the DB.long getNextId(Project project) throws DataAccessException
project
- The Project
DataAccessException
- If any errors occur accessing the DB.void refresh()
Collection<org.ofbiz.core.entity.GenericValue> getProjectCategories() throws DataAccessException
getAllProjectCategories()
instead.
GenericValue
s
DataAccessException
- If any errors occur accessing the DB.Collection<ProjectCategory> getAllProjectCategories() throws DataAccessException
DataAccessException
- If any errors occur accessing the DB.org.ofbiz.core.entity.GenericValue getProjectCategory(Long id) throws DataAccessException
getProjectCategoryObject(Long)
instead. Since v4.4.
id
- Project Category ID.
GenericValue
DataAccessException
ProjectCategory getProjectCategoryObject(Long id) throws DataAccessException
id
- Project Category ID.
DataAccessException
org.ofbiz.core.entity.GenericValue getProjectCategoryByName(String projectCategoryName) throws DataAccessException
getProjectCategoryObjectByName(String)
instead. Since v4.4.
projectCategoryName
- Name of the Project Category
GenericValue
DataAccessException
- If any errors occur accessing the DB.ProjectCategory getProjectCategoryObjectByName(String projectCategoryName)
projectCategoryName
- Name of the Project Category
ProjectCategory getProjectCategoryObjectByNameIgnoreCase(String projectCategoryName)
projectCategoryName
- Name of the Project Category
org.ofbiz.core.entity.GenericValue getProjectCategoryByNameIgnoreCase(String projectCategoryName)
getProjectCategoryObjectByNameIgnoreCase(String)
instead. Since v4.4.
projectCategoryName
- Name of the Project Category
GenericValue
DataAccessException
- If any errors occur accessing the DB.void updateProjectCategory(org.ofbiz.core.entity.GenericValue projectCat) throws DataAccessException
updateProjectCategory(ProjectCategory)
instead. Since v4.4.
projectCat
- project category.
DataAccessException
- If any errors occur accessing the DB.void updateProjectCategory(ProjectCategory projectCategory) throws DataAccessException
projectCategory
- project category.
DataAccessException
- If any errors occur accessing the DB.Collection<org.ofbiz.core.entity.GenericValue> getProjectsFromProjectCategory(org.ofbiz.core.entity.GenericValue projectCategory) throws DataAccessException
getProjectsFromProjectCategory(ProjectCategory)
instead. Since v4.4.
projectCategory
- project category.
GenericValue
s sorted by name.
DataAccessException
- If any errors occur accessing the DB.Collection<Project> getProjectsFromProjectCategory(ProjectCategory projectCategory) throws DataAccessException
projectCategory
- project category.
DataAccessException
- If any errors occur accessing the DB.Collection<Project> getProjectObjectsFromProjectCategory(Long projectCategoryId) throws DataAccessException
projectCategoryId
- project category id.
Project
s sorted by name.
DataAccessException
- If any errors occur accessing the DB.Collection<org.ofbiz.core.entity.GenericValue> getProjectsWithNoCategory() throws DataAccessException
getProjectObjectsWithNoCategory()
instead. Since v4.4.
GenericValue
s sorted by name
DataAccessException
- If any errors occur accessing the DB.Collection<Project> getProjectObjectsWithNoCategory() throws DataAccessException
Project
s sorted by name
DataAccessException
- If any errors occur accessing the DB.org.ofbiz.core.entity.GenericValue getProjectCategoryFromProject(org.ofbiz.core.entity.GenericValue project) throws DataAccessException
getProjectCategoryForProject(com.atlassian.jira.project.Project)
instead. Since 4.4
project
- project
GenericValue
or null if no category exists.
DataAccessException
- If any errors occur accessing the DB.ProjectCategory getProjectCategoryForProject(Project project) throws DataAccessException
project
- project
DataAccessException
- If any errors occur accessing the DB.void setProjectCategory(org.ofbiz.core.entity.GenericValue project, org.ofbiz.core.entity.GenericValue category) throws DataAccessException
setProjectCategory(com.atlassian.jira.project.Project, com.atlassian.jira.project.ProjectCategory)
instead.
project
- projectcategory
- category
DataAccessException
- If any errors occur accessing the DB.
IllegalArgumentException
- if the project provided is nullvoid setProjectCategory(Project project, ProjectCategory category) throws DataAccessException
project
- projectcategory
- category
DataAccessException
- If any errors occur accessing the DB.
IllegalArgumentException
- if the project provided is nullProjectCategory createProjectCategory(String name, String description)
name
- the Namedescription
- the Description.
void removeProjectCategory(Long id)
id
- the ProjectCategory to remove.boolean isDefaultAssignee(org.ofbiz.core.entity.GenericValue project)
getDefaultAssignee(Project, java.util.Collection)
and check for DefaultAssigneeException. Since v4.4.
project
- project
boolean isDefaultAssignee(org.ofbiz.core.entity.GenericValue project, org.ofbiz.core.entity.GenericValue component)
getDefaultAssignee(Project, java.util.Collection)
and check for DefaultAssigneeException. Since v4.4.
getDefaultAssignee(GenericValue, GenericValue)
will throw an exception
project
- projectcomponent
- component
isDefaultAssignee(org.ofbiz.core.entity.GenericValue)
is truecom.atlassian.crowd.embedded.api.User getDefaultAssignee(org.ofbiz.core.entity.GenericValue project, org.ofbiz.core.entity.GenericValue component)
getDefaultAssignee(Project, ProjectComponent)
. Since v4.3
project
- projectcomponent
- component
User
DefaultAssigneeException
- If the default assignee does NOT have ASSIGNABLE permission OR Unassigned issues are turned off.com.atlassian.crowd.embedded.api.User getDefaultAssignee(Project project, ProjectComponent component)
getDefaultAssignee(Project, java.util.Collection)
which allows for multiple components. Since v4.4.
project
- projectcomponent
- component
DefaultAssigneeException
- If the default assignee does NOT have ASSIGNABLE permission OR Unassigned issues are turned off.com.atlassian.crowd.embedded.api.User getDefaultAssignee(Project project, Collection<ProjectComponent> components) throws DefaultAssigneeException
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.
project
- projectcomponents
- The components
DefaultAssigneeException
- If the default assignee is invalid (eg user does not have assign permission) .List<Project> getProjectsLeadBy(com.atlassian.crowd.embedded.api.User leadUser)
leadUser
- Project Lead
List<Project> getProjectsLeadBy(ApplicationUser leadUser)
leadUser
- Project Lead
Collection<org.ofbiz.core.entity.GenericValue> getProjectsByLead(com.atlassian.crowd.embedded.api.User leadUser)
getProjectsLeadBy(com.atlassian.crowd.embedded.api.User)
instead
leadUser
- Project Lead
GenericValue
sList<org.ofbiz.core.entity.GenericValue> convertToProjects(Collection<Long> projectIds)
convertToProjectObjects(java.util.Collection)
instead. Since v4.4.
projectIds
- a Collection of Longs
GenericValue
s. Null if input is emptyList<Project> convertToProjectObjects(Collection<Long> projectIds)
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.
projectIds
- a Collection of Project IDs
long getCurrentCounterForProject(Long id)
id
- the ID of the project for which to retrieve the counter
void setCurrentCounterForProject(Project project, long counter)
project
- the project for which to set the counter (required)counter
- the counter value to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |