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<TopLevelPlan> plans, com.opensymphony.xwork.TextProvider textProvider)
           
 
Method Summary
 java.util.Collection<Project> getAllProjects()
           
 java.lang.String getCurrentStatus(java.lang.String projectKey)
          Returns the string representation the current status of builds for this project.
 int getFailingBuilds(java.lang.String projectKey)
           
 int getPlanCount(java.lang.String projectKey)
           
 java.lang.String getProjectSummary(java.lang.String projectKey)
           
 java.lang.String getProjectSummaryForPlans(java.util.Collection<TopLevelPlan> plans)
           
 java.util.Set<Project> getUniqueProjects(java.util.Collection<? extends TopLevelPlan> plans)
           
 
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<TopLevelPlan> plans,
                               @NotNull
                               com.opensymphony.xwork.TextProvider textProvider)
Method Detail

getPlanCount

public int getPlanCount(java.lang.String projectKey)
Specified by:
getPlanCount 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 representation 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<? extends TopLevelPlan> plans)
Specified by:
getUniqueProjects in interface ProjectStatusHelper

getProjectSummaryForPlans

public java.lang.String getProjectSummaryForPlans(java.util.Collection<TopLevelPlan> plans)


Copyright © 2011 Atlassian. All Rights Reserved.