com.atlassian.jira.project.ProjectManager |
Known Indirect Subclasses |
Implementations of this interface are responsible for all management of project entities within JIRA.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Converts a collection of projectIds to a list of projects.
| |||||||||||
Creates the project in the database, and adds default project roles for this project.
| |||||||||||
Creates a new ProjectCategory with the given name and description.
| |||||||||||
Returns all ProjectCategories, ordered by name.
| |||||||||||
Returns all project keys that are associated with
Project . | |||||||||||
Returns the curremt issue counter for the given project.
| |||||||||||
Gets the default assignee for an issue given its project and list of Components.
| |||||||||||
This method is deprecated.
Use
getDefaultAssignee(Project, java.util.Collection) which allows for multiple components. Since v4.4.
| |||||||||||
Get the next issue ID from this project (transactional).
| |||||||||||
Returns the
Project with the given project key. | |||||||||||
Returns a
Project object based on the passed in project key, not taking into account the case
of the project key. | |||||||||||
Returns a single project category by id.
| |||||||||||
Returns a project's category.
| |||||||||||
Returns a single project category by id.
| |||||||||||
Find a project category by name.
| |||||||||||
Find a project category by name ignoring the case of the category name.
| |||||||||||
Return the total number of
Project s. | |||||||||||
Retrieves a single
Project by its id. | |||||||||||
Returns a
Project object based on the passed in project key. | |||||||||||
Returns a
Project object based on the passed in project key, not taking into account the case
of the project key. | |||||||||||
Returns a
Project object based on the passed in project name. | |||||||||||
Return all
Project s ordered by name. | |||||||||||
Returns a list of projects in a particular category.
| |||||||||||
Returns a list of projects without project category, sorted by project name
| |||||||||||
Return all
Project s ordered by name. | |||||||||||
Returns a list of projects in a particular category.
| |||||||||||
Returns all the projects that leadUser is the project lead for ordered by the name of the Project.
| |||||||||||
Checks if a project category with a given name exists.
| |||||||||||
Causes a full refresh of the project cache.
| |||||||||||
Deletes the provided project from the database.
| |||||||||||
Removes the given ProjectCategory.
| |||||||||||
Removes all issues for a particular project.
| |||||||||||
Set the project counter.
| |||||||||||
Sets a project's category.
| |||||||||||
Updates the project provided with the new attributes passed in.
| |||||||||||
Updates the project provided with the new attributes passed in.
| |||||||||||
Updates the project provided with the new attributes passed in.
| |||||||||||
Persist an updated project category.
| |||||||||||
Updates the type of a project.
|
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.
projectIds | a Collection of Project IDs |
---|
Creates the project in the database, and adds default project roles for this project.
If no name, key, lead or project type are provided an exception will be thrown.
user | The user creating the project |
---|---|
projectCreationData | An object encapsulating all the data for the project that will get created |
Creates a new ProjectCategory with the given name and description.
name | the Name |
---|---|
description | the Description. |
Returns all ProjectCategories, ordered by name.
DataAccessException | If any errors occur accessing the DB. |
---|
Returns all project keys that are associated with Project
.
Returns the curremt issue counter for the given project. This value is for information only; you should not use it to predict or create issue ids, because it may change concurrently as new issues are created.
id | the ID of the project for which to retrieve the counter |
---|
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.
project | project |
---|---|
components | The components |
DefaultAssigneeException | If the default assignee is invalid (eg user does not have assign permission) . |
---|
This method is 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.
project | project |
---|---|
component | component |
DefaultAssigneeException | If the default assignee does NOT have ASSIGNABLE permission OR Unassigned issues are turned off. |
---|
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.
project | The Project |
---|
DataAccessException | If any errors occur accessing the DB. |
---|
@Internal
or @PublicApi
.
Returns the 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.Returns a 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. |
---|
Returns a single project category by id.
id | Project Category ID. |
---|
DataAccessException |
---|
Returns a project's category.
project | project |
---|
DataAccessException | If any errors occur accessing the DB. |
---|
Returns a single project category by id.
Legacy synonym for getProjectCategory(Long)
id | Project Category ID. |
---|
DataAccessException |
---|
Find a project category by name.
projectCategoryName | Name of the Project Category |
---|
Find a project category by name ignoring the case of the category name.
projectCategoryName | Name of the Project Category |
---|
Return the total number of Project
s.
DataAccessException | if any errors occur accessing the DB. |
---|
Retrieves a single Project
by its id.
id | ID of the Project. |
---|
DataAccessException | If any errors occur accessing the DB. |
---|
Returns a 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. |
---|
Return all Project
s ordered by name.
This method does the same thing as getProjects() and exists for legacy reasons.
DataAccessException | If any errors occur accessing the DB. |
---|
Returns a list of projects in a particular category.
projectCategoryId | project category id. |
---|
Project
s sorted by name.DataAccessException | If any errors occur accessing the DB. |
---|
Returns a list of projects without project category, sorted by project name
Project
s sorted by nameDataAccessException | If any errors occur accessing the DB. |
---|
Return all Project
s ordered by name.
Returns a list of projects in a particular category.
projectCategory | project category. |
---|
DataAccessException | If any errors occur accessing the DB. |
---|
Returns all the projects that leadUser is the project lead for ordered by the name of the Project.
leadUser | Project Lead |
---|
Checks if a project category with a given name exists.
projectCategory | the name of the project category |
---|
Causes a full refresh of the project cache.
Deletes the provided project from the database.
Please note that this method only deletes the project itself and not any related entities.
Use deleteProject(ApplicationUser, ProjectService.DeleteProjectValidationResult)
to
properly delete a project.
project | The project to be deleted. |
---|
Removes the given ProjectCategory.
id | the ProjectCategory to remove. |
---|
Removes all issues for a particular project. A RemoveException will be thrown on any errors removing issues.
project | The project for which issues will be deleted. |
---|
RemoveException | if there's any errors removing issues |
---|
Set the project counter. Warning Setting the project counter is not needed in the normal operations of JIRA, this method exist for functionality like project-import etc.
project | the project for which to set the counter (required) |
---|---|
counter | the counter value to set |
Sets a project's category.
project | project |
---|---|
category | category |
DataAccessException | If any errors occur accessing the DB. |
---|---|
IllegalArgumentException | if the project provided is null |
Updates the project provided with the new attributes passed in. This method is responsible for persisting any changes to the database.
originalProject | The project to be updated. |
---|---|
name | The name for the updated project |
description | An optional description for the project |
leadKey | The userkey of 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. |
Updates the project provided with the new attributes passed in. This method is responsible for persisting any changes to the database.
originalProject | The project to be updated. |
---|---|
name | The name for the updated project |
description | An optional description for the project |
leadKey | The userkey of 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. |
projectKey | The new project key (not updated if null) |
Updates the project provided with the new attributes passed in. This method is responsible for persisting any changes to the database.
originalProject | The project to be updated. |
---|---|
name | The name for the updated project |
description | An optional description for the project |
leadKey | The userkey of 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. |
Persist an updated project category.
projectCategory | project category. |
---|
DataAccessException | If any errors occur accessing the DB. |
---|
Updates the type of a project.
user | The user performing the action |
---|---|
project | The project which type needs to be updated |
newProjectType | The new project type |