Class DeploymentDashboardManager
- java.lang.Object
-
- jetbrains.buildServer.serverSide.deploymentDashboards.DeploymentDashboardManager
-
public class DeploymentDashboardManager extends Object
-
-
Constructor Summary
Constructors Constructor Description DeploymentDashboardManager(DeploymentDashboardStorage storage, ProjectManager projectManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
areDashboardsEnabledForProject(SProject project)
Returns `true` if deployment dashboards are enabled in a project with `projectId` ID, or false otherwise.DeploymentDashboard
createDashboard(String projectId, String dashboardId, String dashboardName)
Creates a new dashboard in project with `projectId` ID under `dashboardId`.Map<String,DeploymentDashboard>
getAllDashboards()
Returns map of all known dashboard IDs and associated dashboards.Map<String,DeploymentDashboard>
getAllDashboards(String projectId, Boolean includeFromSubprojects)
Returns map of dashboard IDs and associated dashboards for a project with given `projectId`.DeploymentDashboard
getDashboard(String dashboardId)
Returns dashboard found under `dashboardId`.void
persistDashboard(DeploymentDashboard dashboard)
Persists deployment dashboard.void
persistInstance(DeploymentInstance instance)
Persists deployment instance.void
removeDashboard(String dashboardId)
Removes dashboard found by `dashboardId`.
-
-
-
Constructor Detail
-
DeploymentDashboardManager
public DeploymentDashboardManager(@NotNull DeploymentDashboardStorage storage, @NotNull ProjectManager projectManager)
-
-
Method Detail
-
areDashboardsEnabledForProject
public Boolean areDashboardsEnabledForProject(@NotNull SProject project)
Returns `true` if deployment dashboards are enabled in a project with `projectId` ID, or false otherwise.
-
getAllDashboards
public Map<String,DeploymentDashboard> getAllDashboards()
Returns map of all known dashboard IDs and associated dashboards.
-
getAllDashboards
public Map<String,DeploymentDashboard> getAllDashboards(String projectId, Boolean includeFromSubprojects)
Returns map of dashboard IDs and associated dashboards for a project with given `projectId`.
-
getDashboard
public DeploymentDashboard getDashboard(String dashboardId) throws DashboardNotFoundException
Returns dashboard found under `dashboardId`. If dashboard was not found, throws `DashboardNotFoundException`.- Throws:
DashboardNotFoundException
-
createDashboard
public DeploymentDashboard createDashboard(String projectId, String dashboardId, String dashboardName) throws DashboardAlreadyExistsException
Creates a new dashboard in project with `projectId` ID under `dashboardId`.- Throws:
DashboardAlreadyExistsException
-
persistDashboard
public void persistDashboard(DeploymentDashboard dashboard) throws ImplicitDashboardCreationDisabledException
Persists deployment dashboard. If implicit dashboard creation is disabled and this dashboard does not exist yet, throws `ImplicitDashboardCreationDisabledException`.
-
persistInstance
public void persistInstance(DeploymentInstance instance)
Persists deployment instance.
-
removeDashboard
public void removeDashboard(String dashboardId) throws DashboardNotFoundException
Removes dashboard found by `dashboardId`. If dashboard was not found, throws `DashboardNotFoundException`.- Throws:
DashboardNotFoundException
-
-