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