in src/main/java/com/googlesource/gerrit/plugins/deleteproject/PluginModule.java [43:71]
protected void configure() {
bind(LifecycleListener.class).annotatedWith(UniqueAnnotations.create()).to(DeleteLog.class);
bind(LifecycleListener.class)
.annotatedWith(UniqueAnnotations.create())
.to(DeleteTrashFolders.class);
bind(CacheDeleteHandler.class);
bind(CapabilityDefinition.class)
.annotatedWith(Exports.named(DELETE_PROJECT))
.to(DeleteProjectCapability.class);
bind(CapabilityDefinition.class)
.annotatedWith(Exports.named(DELETE_OWN_PROJECT))
.to(DeleteOwnProjectCapability.class);
bind(FilesystemDeleteHandler.class);
bind(DeletePreconditions.class);
if (scheduleCleaning) {
bind(LifecycleListener.class)
.annotatedWith(UniqueAnnotations.create())
.to(ArchiveRepositoryRemover.class);
}
install(
new RestApiModule() {
@Override
protected void configure() {
delete(PROJECT_KIND).to(DeleteProject.class);
post(PROJECT_KIND, "delete").to(DeleteAction.class);
}
});
}