Support listing child projects via REST

It is now possible to list the direct child projects of a project via
REST by GET on /projects/*/children/.

Change-Id: If57b44118c6742f7d0bef751f2be0b8abebfc0a2
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2013-03-18 13:23:00 +01:00
committed by David Pursehouse
parent 0ec5daccaf
commit 4425c746eb
10 changed files with 341 additions and 1 deletions

View File

@@ -14,6 +14,7 @@
package com.google.gerrit.server.project;
import static com.google.gerrit.server.project.ChildProjectResource.CHILD_PROJECT_KIND;
import static com.google.gerrit.server.project.DashboardResource.DASHBOARD_KIND;
import static com.google.gerrit.server.project.ProjectResource.PROJECT_KIND;
@@ -29,6 +30,7 @@ public class Module extends RestApiModule {
bind(DashboardsCollection.class);
DynamicMap.mapOf(binder(), PROJECT_KIND);
DynamicMap.mapOf(binder(), CHILD_PROJECT_KIND);
DynamicMap.mapOf(binder(), DASHBOARD_KIND);
put(PROJECT_KIND).to(PutProject.class);
@@ -40,6 +42,8 @@ public class Module extends RestApiModule {
get(PROJECT_KIND, "parent").to(GetParent.class);
put(PROJECT_KIND, "parent").to(SetParent.class);
child(PROJECT_KIND, "children").to(ChildProjectsCollection.class);
get(PROJECT_KIND, "HEAD").to(GetHead.class);
put(PROJECT_KIND, "HEAD").to(SetHead.class);