public interface ProjectManager
Project
Modifier and Type | Method and Description |
---|---|
Project |
createProject(String key,
String name)
Creates a new Project
Note that this method will not save the project
|
Project |
createProject(String key,
String name,
String description)
Creates a new Project
|
void |
deleteProject(Project project)
Removes the project from the system
|
Set<Project> |
getAllProjects()
Returns a collection of
Project objects |
Collection<Project> |
getAllProjectsMarkedForDeletion() |
List<Project> |
getEmptyProjects()
Returns empty projects.
|
Number |
getNonDeletedProjectCount()
Returns the number of projects, excluding the ones marked for deletion.
|
List<Project> |
getNonEmptyProjects()
Returns non empty projects.
|
Project |
getProjectById(long id)
Returns the project given the id
|
Project |
getProjectByKey(String key)
Returns the project given a project key
|
Project |
getProjectByName(String projectName)
Returns project by name
|
Project |
getProjectByOid(BambooEntityOid oid)
Returns project by oid
|
Number |
getProjectCount()
Returns the number of projects, including the ones marked for deletion.
|
Set<Project> |
getProjects()
Returns a collection of
Project objects |
List<Project> |
getSortedProjects()
Returns a sorted by name list of projects.
|
boolean |
isExistingProjectKey(String projectKey)
Returns true if the project name already exists
|
boolean |
isExistingProjectName(String projectName)
Returns true if the project name already exists
|
void |
saveProject(Project project)
Saves the project
|
@NotNull Project createProject(@NotNull String key, @NotNull String name)
key
- name
- @NotNull Project createProject(@NotNull String key, @NotNull String name, @NotNull String description)
key
- name
- description
- @NotNull Set<Project> getProjects()
Project
objects@NotNull List<Project> getNonEmptyProjects()
@NotNull List<Project> getEmptyProjects()
@NotNull List<Project> getSortedProjects()
@NotNull Set<Project> getAllProjects()
Project
objectsNumber getProjectCount()
Number getNonDeletedProjectCount()
@Nullable Project getProjectByKey(@NotNull String key)
key
- - the project key e.g. BAMBOO (not BAMBOO-TRUNK)Project
if the key matches. Otherwise null@Nullable Project getProjectById(long id)
id
- Project
. null if not found.@Nullable Project getProjectByOid(@NotNull BambooEntityOid oid)
Project getProjectByName(@NotNull String projectName)
projectName
- boolean isExistingProjectKey(@NotNull String projectKey)
projectKey
- to checkboolean isExistingProjectName(@NotNull String projectName)
projectName
- to checkvoid saveProject(@NotNull Project project)
project
- void deleteProject(@NotNull Project project)
project
- project@NotNull Collection<Project> getAllProjectsMarkedForDeletion()
Project
s that are marked for deletion..Copyright © 2018 Atlassian Software Systems Pty Ltd. All rights reserved.