use of com.google.gerrit.server.project.ChildProjectResource in project gerrit by GerritCodeReview.
the class ChildProjectsCollection method parse.
@Override
public ChildProjectResource parse(ProjectResource parent, IdString id) throws RestApiException, IOException, PermissionBackendException {
parent.getProjectState().checkStatePermitsRead();
ProjectResource p = projectsCollection.parse(TopLevelResource.INSTANCE, id);
for (ProjectState pp : p.getProjectState().parents()) {
if (parent.getNameKey().equals(pp.getProject().getNameKey())) {
return new ChildProjectResource(parent, p.getProjectState());
}
}
throw new ResourceNotFoundException(id);
}
Aggregations