Extract deletion preconditions to its own class

Instead of spreading the assertions done before deleting a change in
several classes, extract them in a dedicated class, DeletePreconditions.
This eases the unit testing of the now simplified classes and better
reflects the fact that some of these assertions do not belong anymore to
the class where they were hosted. One example: the check for submodules
was in the DatabaseDeleteHandler class because this information used to
be in the database, but this is no longer the case.

Additional test coverage for this class will be provided in an upcoming
change adding IT tests.

Change-Id: Ie1f513f5981035aba217200f608c6ca6e6357cb1
9 files changed
tree: c60472ef3029d0f1be1857cf47605529c56d5d9f
  1. .settings/
  2. src/
  3. tools/
  4. .gitignore
  5. bazlets.bzl
  6. BUILD
  7. external_plugin_deps.bzl
  8. README.md
  9. WORKSPACE
README.md

Delete project plugin for Gerrit Code Review

A plugin which allows projects to be deleted from Gerrit via an SSH command, REST API or the Project settings screen.

Build Status