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<? extends ImmutableTopLevelPlan> 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<ImmutableTopLevelPlan> 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<? extends ImmutableTopLevelPlan> 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 ImmutablePlan.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<ImmutableTopLevelPlan> plans)


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.