Modifier and Type | Class and Description |
---|---|
static class |
Dashboard.Widget
Note that this class is an inner class to avoid confusion with the extension point org.sonar.api.web.Widget.
|
Modifier and Type | Method and Description |
---|---|
Dashboard.Widget |
addWidget(String widgetId,
int columnId)
Add a widget with the given parameters, and return the newly created
Dashboard.Widget object if one wants to add parameters to it. |
static Dashboard |
create()
Creates a new
Dashboard . |
String |
getDescription()
Returns the description of the dashboard.
|
DashboardLayout |
getLayout()
Returns the layout.
|
Collection<Dashboard.Widget> |
getWidgets() |
List<Dashboard.Widget> |
getWidgetsOfColumn(int columnId) |
boolean |
isActivated()
A dashboard can be activated for all anonymous users or users who haven't configured their own dashboards.
|
boolean |
isGlobal()
A dashboard is global when it doesn't display information from a projet but rather more general information.
|
Dashboard |
setActivated(boolean activated)
Set whether the dashboard is activated for all anonymous users or users who haven't configured their own dashboards.
|
Dashboard |
setDescription(String description)
Sets the description of the dashboard.
|
Dashboard |
setGlobal(boolean global)
A dashboard is global when it doesn't display information from a projet but rather more general information.
|
Dashboard |
setLayout(DashboardLayout dl) |
public Dashboard.Widget addWidget(String widgetId, int columnId)
Dashboard.Widget
object if one wants to add parameters to it.
The widget ids are listed by the web service /api/widgets
widgetId
- id of an existing widgetcolumnId
- column starts with 1. The widget is ignored if the column id does not match the layout.public Collection<Dashboard.Widget> getWidgets()
public List<Dashboard.Widget> getWidgetsOfColumn(int columnId)
public String getDescription()
public Dashboard setDescription(String description)
description
- the description to setpublic DashboardLayout getLayout()
public Dashboard setLayout(DashboardLayout dl)
public boolean isGlobal()
Before version 3.1 no dashboard was global.
public Dashboard setGlobal(boolean global)
Before version 3.1 no dashboard was global.
public boolean isActivated()
Before version 3.1 every dashboard created through this extension point was automatically activated. This is still the default behavior.
public Dashboard setActivated(boolean activated)
Copyright © 2009-2012 SonarSource. All Rights Reserved.