com.atlassian.bamboo.project
Interface ProjectManager

All Known Implementing Classes:
DefaultProjectManager, ProjectManagerDecorator, RiggedProjectManager

public interface ProjectManager

Manager for Project


Method Summary
 Project createProject(java.lang.String key, java.lang.String name)
          Creates a new Project Note that this method will not save the project
 Project createProject(java.lang.String key, java.lang.String name, java.lang.String description)
          Creates a new Project
 void deleteProject(Project project)
          Removes the project from the system
 java.util.Set<Project> getAllProjects()
          Returns a collection of Project objects
 java.util.Collection<Project> getAllProjectsMarkedForDeletion()
           
 Project getProjectById(long id)
          Returns the build given the id
 Project getProjectByKey(java.lang.String key)
          Returns the prokect given a project key
 Project getProjectByName(java.lang.String projectName)
          Returns project by name
 java.util.Set<Project> getProjects()
          Returns a collection of Project objects
 java.util.List<Project> getSortedProjects()
          Returns a sorted by name list of projects.
 boolean isExistingProjectKey(java.lang.String projectKey)
          Returns true if the project name already exists
 boolean isExistingProjectName(java.lang.String projectName)
          Returns true if the project name already exists
 void saveProject(Project project)
          Saves the project
 

Method Detail

createProject

@NotNull
Project createProject(@NotNull
                              java.lang.String key,
                              @NotNull
                              java.lang.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
                              java.lang.String key,
                              @NotNull
                              java.lang.String name,
                              @NotNull
                              java.lang.String description)
Creates a new Project

Parameters:
key -
name -
description -
Returns:
project

getProjects

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

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

getSortedProjects

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

Returns:

getAllProjects

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

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

getProjectByKey

Project getProjectByKey(@NotNull
                        java.lang.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

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
                         java.lang.String projectName)
Returns project by name

Parameters:
projectName -
Returns:
project

isExistingProjectKey

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

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

isExistingProjectName

boolean isExistingProjectName(@NotNull
                              java.lang.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
java.util.Collection<Project> getAllProjectsMarkedForDeletion()
Returns:
all Projects that are marked for deletion..


Copyright © 2011 Atlassian. All Rights Reserved.