com.atlassian.bamboo.project
Interface ProjectManager

All Known Implementing Classes:
DefaultProjectManager

public interface ProjectManager

Manager for Project


Method Summary
 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()
           
 Project getProjectById(long id)
          Returns the build given the id
 Project getProjectByKey(String key)
          Returns the project given a project key
 Project getProjectByName(String projectName)
          Returns project by name
 Number getProjectCount()
           
 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
 

Method Detail

createProject

@NotNull
Project createProject(@NotNull
                              String key,
                              @NotNull
                              String name)
Creates a new Project Note that this method will not save the project

Parameters:
key -
name -
Returns:
project

createProject

@NotNull
Project createProject(@NotNull
                              String key,
                              @NotNull
                              String name,
                              @NotNull
                              String description)
Creates a new Project

Parameters:
key -
name -
description -
Returns:
project

getProjects

@NotNull
Set<Project> getProjects()
Returns a collection of Project objects

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

getSortedProjects

@NotNull
List<Project> getSortedProjects()
Returns a sorted by name list of projects.

Returns:

getAllProjects

@NotNull
Set<Project> getAllProjects()
Returns a collection of Project objects

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

getProjectCount

Number getProjectCount()

getProjectByKey

@Nullable
Project getProjectByKey(@NotNull
                                 String key)
Returns the project given a project key

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

getProjectById

@Nullable
Project getProjectById(long id)
Returns the build given the id

Parameters:
id -
Returns:
A Project. null if not found.

getProjectByName

Project getProjectByName(@NotNull
                         String projectName)
Returns project by name

Parameters:
projectName -
Returns:
project

isExistingProjectKey

boolean isExistingProjectKey(@NotNull
                             String projectKey)
Returns true if the project name already exists

Parameters:
projectKey - to check
Returns:
true if projectName already exists

isExistingProjectName

boolean isExistingProjectName(@NotNull
                              String projectName)
Returns true if the project name already exists

Parameters:
projectName - to check
Returns:
true if projectName already exists

saveProject

void saveProject(@NotNull
                 Project project)
Saves the project

Parameters:
project -

deleteProject

void deleteProject(@NotNull
                   Project project)
Removes the project from the system

Parameters:
project - project

getAllProjectsMarkedForDeletion

@NotNull
Collection<Project> getAllProjectsMarkedForDeletion()
Returns:
all Projects that are marked for deletion..


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.