Package com.atlassian.bamboo.project
Class ProjectStatusHelperImpl
- java.lang.Object
-
- com.atlassian.bamboo.project.ProjectStatusHelperImpl
-
- All Implemented Interfaces:
ProjectStatusHelper
public class ProjectStatusHelperImpl extends Object implements ProjectStatusHelper
-
-
Constructor Summary
Constructors Constructor Description ProjectStatusHelperImpl(Collection<? extends ImmutableTopLevelPlan> plans, @NotNull com.opensymphony.xwork2.TextProvider textProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Collection<Project>
getAllProjects()
String
getCurrentStatus(String projectKey)
Returns the string representation the current status of builds for this project.int
getFailingBuilds(String projectKey)
int
getPlanCount(String projectKey)
String
getProjectSummary(String projectKey)
String
getProjectSummaryForPlans(Collection<ImmutableTopLevelPlan> plans)
@NotNull Set<Project>
getUniqueProjects(Collection<? extends TopLevelPlan> plans)
-
-
-
Constructor Detail
-
ProjectStatusHelperImpl
public ProjectStatusHelperImpl(Collection<? extends ImmutableTopLevelPlan> plans, @NotNull @NotNull com.opensymphony.xwork2.TextProvider textProvider)
-
-
Method Detail
-
getPlanCount
public int getPlanCount(String projectKey)
- Specified by:
getPlanCount
in interfaceProjectStatusHelper
-
getFailingBuilds
public int getFailingBuilds(String projectKey)
- Specified by:
getFailingBuilds
in interfaceProjectStatusHelper
-
getCurrentStatus
public String getCurrentStatus(String projectKey)
Description copied from interface:ProjectStatusHelper
Returns the string representation the current status of builds for this project. MirrorsImmutablePlan.getCurrentStatus()
. It will return "current" if any plan is building, and "fail" if any plan is failing.- Specified by:
getCurrentStatus
in interfaceProjectStatusHelper
- Parameters:
projectKey
- Key of a project to check status- Returns:
- a String representing the status
-
getProjectSummary
public String getProjectSummary(String projectKey)
- Specified by:
getProjectSummary
in interfaceProjectStatusHelper
-
getAllProjects
@NotNull public @NotNull Collection<Project> getAllProjects()
-
getUniqueProjects
@NotNull public @NotNull Set<Project> getUniqueProjects(Collection<? extends TopLevelPlan> plans)
- Specified by:
getUniqueProjects
in interfaceProjectStatusHelper
-
getProjectSummaryForPlans
public String getProjectSummaryForPlans(Collection<ImmutableTopLevelPlan> plans)
-
-