Reuse REST code to list child projects in AdminSetParent

For 'set-project-parent --children-of PROJECT' AdminSetParent needs to
list the child projects of PROJECT. To do this use the REST endpoint
for listing child projects instead of having an own implementation for
computing the child projects in AdminSetParent.

Change-Id: Ic557623842f743c440df4bba0dfe713bd7d52ba1
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2013-03-19 10:16:43 +01:00
committed by Gerrit Code Review
parent 8a3fb5b120
commit 3d57eadf92
6 changed files with 39 additions and 28 deletions

View File

@@ -142,6 +142,13 @@ public class ProjectCacheImpl implements ProjectCache {
}
}
/** Invalidate the cached information about the given project. */
public void evict(final Project.NameKey p) {
if (p != null) {
byName.invalidate(p.get());
}
}
@Override
public void remove(final Project p) {
listLock.lock();