Allow throwing RestApiException from all create methods in REST root collections

Internally at Google we need to subclass the REST root collections and
we want to be able to reject the creation of new resources in the root
collections with any REST exception.

Change-Id: I30688e5ae11f0631d61a875ab03afddce42de67b
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2018-06-13 10:40:07 +02:00
parent cb9b96e34b
commit d6188704aa
3 changed files with 5 additions and 3 deletions

View File

@@ -181,7 +181,7 @@ public class ProjectsCollection
}
@Override
public CreateProject create(TopLevelResource parent, IdString name) {
public CreateProject create(TopLevelResource parent, IdString name) throws RestApiException {
return createProjectFactory.create(name.get());
}
}