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

@@ -25,7 +25,6 @@ import org.dspace.content.service.WorkspaceItemService;
import org.dspace.identifier.factory.IdentifierServiceFactory;
import org.dspace.identifier.service.DOIService;
import org.dspace.services.ConfigurationService;
import org.dspace.utils.DSpace;
import org.dspace.workflow.WorkflowException;
import org.dspace.workflow.WorkflowItem;
import org.dspace.workflow.factory.WorkflowServiceFactory;
@@ -93,7 +92,7 @@ public class DOIIdentifierProviderTest
//we need to commit the changes so we don't block the table for testing
context.restoreAuthSystemState();
config = new DSpace().getConfigurationService();
config = DSpaceServicesFactory.getInstance().getConfigurationService();
// Configure the service under test.
config.setProperty(DOIIdentifierProvider.CFG_PREFIX, PREFIX);
config.setProperty(DOIIdentifierProvider.CFG_NAMESPACE_SEPARATOR,
@@ -101,7 +100,7 @@ public class DOIIdentifierProviderTest
connector = new MockDOIConnector();
provider = new DSpace().getServiceManager().getServiceByName(DOIIdentifierProvider.class.getName(), DOIIdentifierProvider.class);
provider = DSpaceServicesFactory.getInstance().getServiceManager().getServiceByName(DOIIdentifierProvider.class.getName(), DOIIdentifierProvider.class);
provider.setConfigurationService(config);
provider.setDOIConnector(connector);
}