Files
gerrit/java
Edwin Kempin 972b7b111f Add comments to make clear that DELETE on root collection is not supported
Binding a view to handle DELETE on root collections is not supported:

  // doesn't work because PROJECT_KIND is handled by a root collection
  deleteOnCollection(PROJECT_KIND).to(Foo.class)

This might be confusing because DELETE on child collections is
supported:

  // works because BRANCH_KIND is handled by a child collection
  deleteOnCollection(BRANCH_KIND).to(Bar.class)

Add additional comments to make it easier for developers to figure out
that DELETE on root collections is not supported:

- JavaDoc on RestApiModule.deleteOnCollection
- comment in RestApiServlet at the place where DELETE on root
  collections would be handled

The JavaDoc on RestCollectionModifyView which is the interface that REST
views that want to handle DELETE on collections must implement already
states that DELETE on root collections is not supported.

It was considered to just support DELETE on root collections (see
abandoned change Ia42879f607) but we decided against this since we don't
want to support functionality that is very unlikely to be used (there is
no good use-case for which we would need to support DELETE on root
collections).

Change-Id: I73f2a28c3d87df258c5b260df0601fbcbd777837
Signed-off-by: Edwin Kempin <ekempin@google.com>
2018-07-19 08:04:33 +00:00
..