Manage default dashboard by PUT and DELETE

PUT with an id to /default will set the local-default property and
commit this change to refs/meta/config.

DELETE on /default will remove the local-default property.

Change-Id: If804762df9fa11dcb3a7ceebc5867ace70afdb35
This commit is contained in:
Shawn O. Pearce
2012-11-16 15:00:21 -08:00
parent 76542daa7a
commit a7d9c9b7ac
7 changed files with 289 additions and 5 deletions

View File

@@ -17,12 +17,13 @@ package com.google.gerrit.server.project;
import static com.google.gerrit.server.git.GitRepositoryManager.REFS_DASHBOARDS;
import com.google.gerrit.extensions.restapi.RestReadView;
import com.google.gerrit.server.project.DashboardsCollection.DashboardInfo;
import java.io.UnsupportedEncodingException;
class GetDashboard implements RestReadView<DashboardResource> {
@Override
public Object apply(DashboardResource resource)
public DashboardInfo apply(DashboardResource resource)
throws UnsupportedEncodingException {
return DashboardsCollection.parse(
resource.getControl().getProject(),