class FileSystemDeleteWorker {

    protected void removeAllDeletedSpaces() {
        try {
            ifDebugEnabled(logger,
                           () -> logger.debug("Removing all deleted spaces"));
            Collection<OrganizationalUnit> deletedSpaces = this.organizationalUnitService.getAllDeletedOrganizationalUnit();
            ifDebugEnabled(logger,
                           () -> logger.debug("Found {} spaces to be deleted",
                                              deletedSpaces.size()));
            deletedSpaces.forEach(ou -> this.removeSpaceDirectory(ou.getSpace()));
            if (deletedSpaces.size() > 0) {
                this.removeOrganizationalUnitEvent.fire(new RemoveOrganizationalUnitEvent());
            }
            ifDebugEnabled(logger,
                           () -> logger.debug("Deleted spaces had been removed"));
        } catch (Exception e) {
            ifDebugEnabled(logger,
                           () -> logger.error("Error when trying to remove all deleted Spaces",
                                              e));
        }
    }

    public  FileSystemDeleteWorker();
    @Inject public  FileSystemDeleteWorker(@Named("ioStrategy") final IOService ioService,
                                  final OrganizationalUnitService organizationalUnitService,
                                  final RepositoryService repositoryService,
                                  final @Named("systemFS") FileSystem systemFS,
                                  final SpaceConfigStorageRegistry registry,
                                  final Event<RemoveOrganizationalUnitEvent> removeOrganizationalUnitEvent,
                                  final ConfigurationService configurationService);

}