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

@@ -10,7 +10,7 @@ package org.dspace.discovery;
import org.apache.log4j.Logger;
import org.apache.commons.cli.*;
import org.dspace.core.Context;
import org.dspace.utils.DSpace;
import org.dspace.services.factory.DSpaceServicesFactory;
import java.io.IOException;
import java.sql.SQLException;
@@ -102,9 +102,7 @@ public class IndexClient {
* new DSpace.getServiceManager().getServiceByName("org.dspace.discovery.SolrIndexer");
*/
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);
if (line.hasOption("r")) {
log.info("Removing " + line.getOptionValue("r") + " from Index");