com.atlassian.bamboo.project
Class ProjectStatusHelperImpl

java.lang.Object
  extended by com.atlassian.bamboo.project.ProjectStatusHelperImpl
All Implemented Interfaces:
ProjectStatusHelper

public class ProjectStatusHelperImpl
extends java.lang.Object
implements ProjectStatusHelper


Constructor Summary
ProjectStatusHelperImpl(java.util.Collection<Build> builds, java.util.Collection<Chain> chains)
           
 
Method Summary
 java.util.Collection<Project> getAllProjects()
           
 int getBuildCount(java.lang.String projectKey)
           
 int getChainCount(java.lang.String projectKey)
           
 java.util.Collection<Chain> getChains(java.lang.String projectKey)
           
 java.lang.String getCurrentStatus(java.lang.String projectKey)
          Returns the string representatioin the current status of builds for this project.
 int getFailingBuilds(java.lang.String projectKey)
           
 java.lang.String getProjectSummary(java.lang.String projectKey)
           
 java.util.Set<Project> getUniqueProjects(java.util.Collection<Chain> chains)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectStatusHelperImpl

public ProjectStatusHelperImpl(java.util.Collection<Build> builds,
                               java.util.Collection<Chain> chains)
Method Detail

getBuildCount

public int getBuildCount(java.lang.String projectKey)
Specified by:
getBuildCount in interface ProjectStatusHelper

getFailingBuilds

public int getFailingBuilds(java.lang.String projectKey)
Specified by:
getFailingBuilds in interface ProjectStatusHelper

getCurrentStatus

public java.lang.String getCurrentStatus(java.lang.String projectKey)
Description copied from interface: ProjectStatusHelper
Returns the string representatioin the current status of builds for this project. Mirrors Plan.getCurrentStatus(). It will return "current" if any plan is building, and "fail" if any plan is failing.

Specified by:
getCurrentStatus in interface ProjectStatusHelper
Parameters:
projectKey - Key of a project to check status
Returns:
a String representing the status

getProjectSummary

public java.lang.String getProjectSummary(java.lang.String projectKey)
Specified by:
getProjectSummary in interface ProjectStatusHelper

getAllProjects

@NotNull
public java.util.Collection<Project> getAllProjects()

getUniqueProjects

@NotNull
public java.util.Set<Project> getUniqueProjects(java.util.Collection<Chain> chains)
Specified by:
getUniqueProjects in interface ProjectStatusHelper

getChains

@NotNull
public java.util.Collection<Chain> getChains(java.lang.String projectKey)
Specified by:
getChains in interface ProjectStatusHelper

getChainCount

public int getChainCount(java.lang.String projectKey)
Specified by:
getChainCount in interface ProjectStatusHelper


Copyright © 2010 Atlassian. All Rights Reserved.