mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-13 21:13:19 +00:00
Create factory to retrieve an instance of the "configurationService" object
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user