public void prepare()
throws Exception
{
Configuration config = archivaConfiguration.getConfiguration();
DatabaseScanningConfiguration dbscanning = config.getDatabaseScanning();
this.cron = dbscanning.getCronExpression();
AddAdminDatabaseConsumerClosure addAdminDbConsumer;
getLogger().info( "Total Available Unprocessed Consumers: " + databaseConsumers.getAvailableUnprocessedConsumers().size() );
getLogger().info( "Total Available Cleanup Consumers: " + databaseConsumers.getAvailableCleanupConsumers().size() );
addAdminDbConsumer = new AddAdminDatabaseConsumerClosure( dbscanning.getUnprocessedConsumers() );
CollectionUtils.forAllDo( databaseConsumers.getAvailableUnprocessedConsumers(), addAdminDbConsumer );
this.unprocessedConsumers = addAdminDbConsumer.getList();
Collections.sort( this.unprocessedConsumers, AdminRepositoryConsumerComparator.getInstance() );
addAdminDbConsumer = new AddAdminDatabaseConsumerClosure( dbscanning.getCleanupConsumers() );
CollectionUtils.forAllDo( databaseConsumers.getAvailableCleanupConsumers(), addAdminDbConsumer );
this.cleanupConsumers = addAdminDbConsumer.getList();
Collections.sort( this.cleanupConsumers, AdminRepositoryConsumerComparator.getInstance() );
}