Replaced use of deprecated config service init method

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6773 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2007-09-13 08:38:12 +00:00
parent db187b3dfd
commit 3515f388ff

View File

@@ -26,7 +26,6 @@ package org.alfresco.web.config;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -70,7 +69,7 @@ public class WebClientConfigTest extends BaseTest
// setup the config service // setup the config service
String configFile = getResourcesDir() + "test-config.xml"; String configFile = getResourcesDir() + "test-config.xml";
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFile)); XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFile));
svc.init(); svc.initConfig();
// get hold of the property sheet config from the global section // get hold of the property sheet config from the global section
Config global = svc.getGlobalConfig(); Config global = svc.getGlobalConfig();
@@ -133,7 +132,7 @@ public class WebClientConfigTest extends BaseTest
// setup the config service // setup the config service
String configFiles = getResourcesDir() + "test-config.xml"; String configFiles = getResourcesDir() + "test-config.xml";
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles)); XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.init(); svc.initConfig();
Config propViewConfig = svc.getConfig("Property Viewing"); Config propViewConfig = svc.getConfig("Property Viewing");
assertNotNull("Property Viewing section should not be null", propViewConfig); assertNotNull("Property Viewing section should not be null", propViewConfig);
@@ -174,7 +173,7 @@ public class WebClientConfigTest extends BaseTest
// setup the config service // setup the config service
String configFiles = getResourcesDir() + "test-config.xml"; String configFiles = getResourcesDir() + "test-config.xml";
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles)); XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.init(); svc.initConfig();
Config propEditConfig = svc.getConfig("Property Editing"); Config propEditConfig = svc.getConfig("Property Editing");
assertNotNull("Property Editing section should not be null", propEditConfig); assertNotNull("Property Editing section should not be null", propEditConfig);
@@ -220,7 +219,7 @@ public class WebClientConfigTest extends BaseTest
configFiles.add(getResourcesDir() + "test-config.xml"); configFiles.add(getResourcesDir() + "test-config.xml");
configFiles.add(getResourcesDir() + "test-config-override.xml"); configFiles.add(getResourcesDir() + "test-config-override.xml");
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles)); XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.init(); svc.initConfig();
// get the config for the size property in the space-aspect property sheet // get the config for the size property in the space-aspect property sheet
PropertySheetConfigElement propSheet = ((PropertySheetConfigElement)svc.getConfig("space-aspect"). PropertySheetConfigElement propSheet = ((PropertySheetConfigElement)svc.getConfig("space-aspect").
@@ -298,7 +297,7 @@ public class WebClientConfigTest extends BaseTest
// setup the config service // setup the config service
String configFiles = getResourcesDir() + "test-config.xml"; String configFiles = getResourcesDir() + "test-config.xml";
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles)); XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.init(); svc.initConfig();
// get the global config and from that the client config // get the global config and from that the client config
ClientConfigElement clientConfig = (ClientConfigElement)svc.getGlobalConfig(). ClientConfigElement clientConfig = (ClientConfigElement)svc.getGlobalConfig().
@@ -323,7 +322,7 @@ public class WebClientConfigTest extends BaseTest
configFiles.add(getResourcesDir() + "test-config.xml"); configFiles.add(getResourcesDir() + "test-config.xml");
configFiles.add(getResourcesDir() + "test-config-override.xml"); configFiles.add(getResourcesDir() + "test-config-override.xml");
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles)); XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.init(); svc.initConfig();
// try and get the global config section // try and get the global config section
Config globalSection = svc.getGlobalConfig(); Config globalSection = svc.getGlobalConfig();
@@ -354,7 +353,7 @@ public class WebClientConfigTest extends BaseTest
// setup the config service // setup the config service
String configFiles = getResourcesDir() + "test-config.xml"; String configFiles = getResourcesDir() + "test-config.xml";
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles)); XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.init(); svc.initConfig();
// *** Test the returning of a view id override // *** Test the returning of a view id override
Config testCfg = svc.getConfig("viewid-navigation-result"); Config testCfg = svc.getConfig("viewid-navigation-result");
@@ -432,7 +431,7 @@ public class WebClientConfigTest extends BaseTest
// setup the config service // setup the config service
String configFiles = getResourcesDir() + "test-config.xml"; String configFiles = getResourcesDir() + "test-config.xml";
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles)); XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.init(); svc.initConfig();
// do a lookup using the generic config elements and make sure the correct // do a lookup using the generic config elements and make sure the correct
// info comes out // info comes out
@@ -483,7 +482,7 @@ public class WebClientConfigTest extends BaseTest
configFiles.add(getResourcesDir() + "test-config.xml"); configFiles.add(getResourcesDir() + "test-config.xml");
configFiles.add(getResourcesDir() + "test-config-override.xml"); configFiles.add(getResourcesDir() + "test-config-override.xml");
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles)); XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.init(); svc.initConfig();
LanguagesConfigElement config = (LanguagesConfigElement)svc.getConfig("Languages"). LanguagesConfigElement config = (LanguagesConfigElement)svc.getConfig("Languages").
getConfigElement(LanguagesConfigElement.CONFIG_ELEMENT_ID); getConfigElement(LanguagesConfigElement.CONFIG_ELEMENT_ID);
@@ -523,7 +522,7 @@ public class WebClientConfigTest extends BaseTest
configFiles.add(getResourcesDir() + "test-config.xml"); configFiles.add(getResourcesDir() + "test-config.xml");
configFiles.add(getResourcesDir() + "test-config-override.xml"); configFiles.add(getResourcesDir() + "test-config-override.xml");
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles)); XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.init(); svc.initConfig();
AdvancedSearchConfigElement config = (AdvancedSearchConfigElement)svc.getConfig("Advanced Search"). AdvancedSearchConfigElement config = (AdvancedSearchConfigElement)svc.getConfig("Advanced Search").
getConfigElement(AdvancedSearchConfigElement.CONFIG_ELEMENT_ID); getConfigElement(AdvancedSearchConfigElement.CONFIG_ELEMENT_ID);
@@ -571,7 +570,7 @@ public class WebClientConfigTest extends BaseTest
configFiles.add(getResourcesDir() + "test-config.xml"); configFiles.add(getResourcesDir() + "test-config.xml");
configFiles.add(getResourcesDir() + "test-config-override.xml"); configFiles.add(getResourcesDir() + "test-config-override.xml");
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles)); XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.init(); svc.initConfig();
ViewsConfigElement config = (ViewsConfigElement)svc.getConfig("Views"). ViewsConfigElement config = (ViewsConfigElement)svc.getConfig("Views").
getConfigElement(ViewsConfigElement.CONFIG_ELEMENT_ID); getConfigElement(ViewsConfigElement.CONFIG_ELEMENT_ID);
@@ -633,7 +632,7 @@ public class WebClientConfigTest extends BaseTest
// setup the config service // setup the config service
String configFiles = getResourcesDir() + "test-config-dialogs-wizards.xml"; String configFiles = getResourcesDir() + "test-config-dialogs-wizards.xml";
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles)); XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.init(); svc.initConfig();
// get Dialogs config section // get Dialogs config section
Config dialogsConfig = svc.getConfig("Dialogs"); Config dialogsConfig = svc.getConfig("Dialogs");
@@ -695,7 +694,7 @@ public class WebClientConfigTest extends BaseTest
configFiles.add(getResourcesDir() + "test-config-dialogs-wizards.xml"); configFiles.add(getResourcesDir() + "test-config-dialogs-wizards.xml");
configFiles.add(getResourcesDir() + "test-config-override.xml"); configFiles.add(getResourcesDir() + "test-config-override.xml");
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles)); XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.init(); svc.initConfig();
// get the 'dialogs' element // get the 'dialogs' element
DialogsConfigElement dialogsElement = ((DialogsConfigElement)svc.getConfig("Dialogs"). DialogsConfigElement dialogsElement = ((DialogsConfigElement)svc.getConfig("Dialogs").
@@ -720,7 +719,7 @@ public class WebClientConfigTest extends BaseTest
// setup the config service // setup the config service
String configFiles = getResourcesDir() + "test-config-dialogs-wizards.xml"; String configFiles = getResourcesDir() + "test-config-dialogs-wizards.xml";
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles)); XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.init(); svc.initConfig();
// get Dialogs config section // get Dialogs config section
Config wizardsConfig = svc.getConfig("Wizards"); Config wizardsConfig = svc.getConfig("Wizards");
@@ -839,7 +838,7 @@ public class WebClientConfigTest extends BaseTest
// setup the config service // setup the config service
String configFile = getResourcesDir() + "test-config.xml"; String configFile = getResourcesDir() + "test-config.xml";
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFile)); XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFile));
svc.init(); svc.initConfig();
// get the "Actions" config // get the "Actions" config
Config cfg = svc.getGlobalConfig(); Config cfg = svc.getGlobalConfig();
@@ -880,7 +879,7 @@ public class WebClientConfigTest extends BaseTest
configFiles.add(getResourcesDir() + "test-config.xml"); configFiles.add(getResourcesDir() + "test-config.xml");
configFiles.add(getResourcesDir() + "test-config-override.xml"); configFiles.add(getResourcesDir() + "test-config-override.xml");
XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles)); XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles));
svc.init(); svc.initConfig();
// get the "Actions" config // get the "Actions" config
Config cfg = svc.getConfig("Actions Override"); Config cfg = svc.getConfig("Actions Override");