public class DashboardsCollection extends Object implements ChildCollection<ProjectResource,DashboardResource>, AcceptsCreate<ProjectResource>
| Modifier and Type | Class and Description |
|---|---|
static class |
DashboardsCollection.InvalidDashboardId |
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_DASHBOARD_NAME |
| Modifier and Type | Method and Description |
|---|---|
RestModifyView<ProjectResource,?> |
create(ProjectResource parent,
IdString id)
Handle creation of a child resource.
|
static boolean |
isDefaultDashboard(IdString id) |
static boolean |
isDefaultDashboard(String id) |
RestView<ProjectResource> |
list()
Create a view to list the contents of the collection.
|
static DashboardInfo |
newDashboardInfo(String ref,
String path) |
static String |
normalizeDashboardRef(String ref) |
DashboardResource |
parse(ProjectResource parent,
IdString id)
Parse a path component into a resource handle.
|
DynamicMap<RestView<DashboardResource>> |
views()
Get the views that support this collection.
|
public static final String DEFAULT_DASHBOARD_NAME
public static boolean isDefaultDashboard(String id)
public static boolean isDefaultDashboard(IdString id)
public RestView<ProjectResource> list() throws ResourceNotFoundException
RestCollectionThe returned view should accept the parent type to scope the search, and may want to take a "q" parameter option to narrow the results.
list in interface RestCollection<ProjectResource,DashboardResource>ResourceNotFoundException - if the collection cannot be listed.public RestModifyView<ProjectResource,?> create(ProjectResource parent, IdString id) throws RestApiException
AcceptsCreatecreate in interface AcceptsCreate<ProjectResource>parent - parent collection handle.id - id of the resource being created.RestApiException - the view cannot be constructed.public DashboardResource parse(ProjectResource parent, IdString id) throws ResourceNotFoundException, IOException, org.eclipse.jgit.errors.ConfigInvalidException, PermissionBackendException
RestCollectionparse in interface RestCollection<ProjectResource,DashboardResource>parent - the handle to the collection.id - string identifier supplied by the client. In a URL such as /changes/1234/abandon this string is "1234".ResourceNotFoundException - the object does not exist, or the caller is not permitted to
know if the resource exists.IOExceptionorg.eclipse.jgit.errors.ConfigInvalidExceptionPermissionBackendExceptionpublic DynamicMap<RestView<DashboardResource>> views()
RestCollectionWithin a resource the views are accessed as RESOURCE/plugin~view.
views in interface RestCollection<ProjectResource,DashboardResource>public static DashboardInfo newDashboardInfo(String ref, String path)