public interface

ProjectManager

com.atlassian.bamboo.project.ProjectManager
Known Indirect Subclasses

Class Overview

Manager for Project

Summary

Public Methods
@NotNull Project createProject(String key, String name)
Creates a new Project Note that this method will not save the project
@NotNull Project createProject(String key, String name, String description)
Creates a new Project
void deleteProject(Project project)
Removes the project from the system
@NotNull Set<Project> getAllProjects()
Returns a collection of Project objects
@NotNull Collection<Project> getAllProjectsMarkedForDeletion()
@Nullable Project getProjectById(long id)
Returns the build given the id
@Nullable Project getProjectByKey(String key)
Returns the prokect given a project key
Project getProjectByName(String projectName)
Returns project by name
@NotNull Set<Project> getProjects()
Returns a collection of Project objects
@NotNull 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

Public Methods

@NotNull public Project createProject (String key, String name)

Creates a new Project Note that this method will not save the project

Returns
  • project

@NotNull public Project createProject (String key, String name, String description)

Creates a new Project

Returns
  • project

public void deleteProject (Project project)

Removes the project from the system

Parameters
project project

@NotNull public Set<Project> getAllProjects ()

Returns a collection of Project objects

Returns
  • all Projects in the system, including the ones marked for deletion

@NotNull public Collection<Project> getAllProjectsMarkedForDeletion ()

Returns
  • all Projects that are marked for deletion..

@Nullable public Project getProjectById (long id)

Returns the build given the id

Returns

@Nullable public Project getProjectByKey (String key)

Returns the prokect given a project key

Parameters
key - the project key e.g. BAMBOO (not BAMBOO-TRUNK)
Returns
  • A Project if the key matches. Otherwise null

public Project getProjectByName (String projectName)

Returns project by name

Returns
  • project

@NotNull public Set<Project> getProjects ()

Returns a collection of Project objects

Returns
  • all Projects in the system, excluding the ones marked for deletion

@NotNull public List<Project> getSortedProjects ()

Returns a sorted by name list of projects.

public boolean isExistingProjectKey (String projectKey)

Returns true if the project name already exists

Parameters
projectKey to check
Returns
  • true if projectName already exists

public boolean isExistingProjectName (String projectName)

Returns true if the project name already exists

Parameters
projectName to check
Returns
  • true if projectName already exists

public void saveProject (Project project)

Saves the project