Create factory to retrieve an instance of the "configurationService" object

This commit is contained in:
KevinVdV
2015-12-14 13:07:08 +01:00
committed by Tim Donohue
parent 85e27d5309
commit 0d79a7109a
125 changed files with 425 additions and 394 deletions

View File

@@ -14,7 +14,7 @@ import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.event.Consumer;
import org.dspace.event.Event;
import org.dspace.utils.DSpace;
import org.dspace.services.factory.DSpaceServicesFactory;
import java.util.HashSet;
import java.util.Set;
@@ -38,9 +38,7 @@ public class IndexEventConsumer implements Consumer {
// handles to delete since IDs are not useful by now.
private Set<String> handlesToDelete = null;
DSpace dspace = new DSpace();
IndexingService indexer = dspace.getServiceManager().getServiceByName(IndexingService.class.getName(),IndexingService.class);
IndexingService indexer = DSpaceServicesFactory.getInstance().getServiceManager().getServiceByName(IndexingService.class.getName(),IndexingService.class);
@Override
public void initialize() throws Exception {