public abstract class AbstractProjectManager extends Object implements ProjectManager
| Constructor and Description |
|---|
AbstractProjectManager(UserManager userManager,
ApplicationProperties applicationProperties) |
| Modifier and Type | Method and Description |
|---|---|
List<Project> |
convertToProjectObjects(Collection<Long> projectIds)
Converts a collection of projectIds to a list of projects.
|
ApplicationUser |
getDefaultAssignee(Project project,
Collection<ProjectComponent> components)
Gets the default assignee for an issue given its project and list of Components.
|
ApplicationUser |
getDefaultAssignee(Project project,
ProjectComponent component)
Gets the default assignee for a project and/or component depending on if a component was specified.
|
Project |
getProjectByCurrentKey(String projectKey)
Returns the
Project with the given project key. |
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 |
updateProject(Project updatedProject,
String name,
String description,
String lead,
String url,
Long assigneeType)
Updates the project provided with the new attributes passed in.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateProject, createProjectCategory, getAllProjectCategories, getAllProjectKeys, getCurrentCounterForProject, getNextId, getProjectByCurrentKeyIgnoreCase, getProjectCategory, getProjectCategoryForProject, getProjectCategoryObject, getProjectCount, getProjectObj, getProjectObjByKey, getProjectObjByKeyIgnoreCase, getProjectObjByName, getProjectObjects, getProjectObjectsFromProjectCategory, getProjectObjectsWithNoCategory, getProjects, getProjectsFromProjectCategory, getProjectsLeadBy, isProjectCategoryUnique, refresh, removeProject, removeProjectCategory, removeProjectIssues, removeProjectIssues, setCurrentCounterForProject, setProjectCategory, updateProject, updateProject, updateProjectCategory, updateProjectTypepublic AbstractProjectManager(UserManager userManager, ApplicationProperties applicationProperties)
public Project getProjectByCurrentKey(String projectKey)
ProjectManagerProject 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.
getProjectByCurrentKey in interface ProjectManagerprojectKey - the Project key.Project with the given project key.ProjectManager.getProjectObjByKey(String)public ProjectCategory getProjectCategoryObjectByName(String projectCategoryName) throws DataAccessException
ProjectManagergetProjectCategoryObjectByName in interface ProjectManagerprojectCategoryName - Name of the Project CategoryDataAccessExceptionpublic ProjectCategory getProjectCategoryObjectByNameIgnoreCase(String projectCategoryName) throws DataAccessException
ProjectManagergetProjectCategoryObjectByNameIgnoreCase in interface ProjectManagerprojectCategoryName - Name of the Project CategoryDataAccessExceptionpublic List<Project> convertToProjectObjects(Collection<Long> projectIds)
ProjectManagerWill 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.
convertToProjectObjects in interface ProjectManagerprojectIds - a Collection of Project IDspublic ApplicationUser getDefaultAssignee(Project project, ProjectComponent component)
ProjectManagergetDefaultAssignee in interface ProjectManagerproject - projectcomponent - componentpublic ApplicationUser getDefaultAssignee(Project project, Collection<ProjectComponent> components) throws DefaultAssigneeException
ProjectManagerIf 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.
getDefaultAssignee in interface ProjectManagerproject - projectcomponents - The componentsDefaultAssigneeException - If the default assignee is invalid (eg user does not have assign permission) .public Project updateProject(Project updatedProject, String name, String description, String lead, String url, Long assigneeType)
ProjectManagerupdateProject in interface ProjectManagerupdatedProject - The project to be updated.name - The name for the updated projectdescription - An optional description for the projectlead - 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.public Project updateProject(Project updatedProject, String name, String description, String lead, String url, Long assigneeType, Long avatarId)
ProjectManagerupdateProject in interface ProjectManagerupdatedProject - The project to be updated.name - The name for the updated projectdescription - An optional description for the projectlead - 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.Copyright © 2002-2017 Atlassian. All Rights Reserved.