mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 07:23:08 +00:00
[DS-1160] - Refactor InitializeDatabase to use Configuration Service rather than ConfigurationManager
This commit is contained in:
@@ -14,6 +14,8 @@ import java.io.IOException;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
import org.dspace.services.ConfigurationService;
|
||||
import org.dspace.utils.DSpace;
|
||||
|
||||
/**
|
||||
* Command-line executed class for initializing the DSpace database. This should
|
||||
@@ -37,7 +39,6 @@ public class InitializeDatabase
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
ConfigurationManager.loadConfig(null);
|
||||
log.info("Initializing Database");
|
||||
|
||||
try
|
||||
@@ -68,7 +69,8 @@ public class InitializeDatabase
|
||||
*/
|
||||
private static FileReader getScript(String name) throws FileNotFoundException, IOException
|
||||
{
|
||||
String dbName = ConfigurationManager.getProperty("db.name");
|
||||
String dbName = new DSpace().getConfigurationService().getProperty("db.name") ;
|
||||
|
||||
File myFile = null;
|
||||
|
||||
if (dbName != null)
|
||||
|
Reference in New Issue
Block a user