Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

78438: Merged EOL (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud)
      77695: ACE-2149 - EOL AVM / WCM. Ripped WCM out of Explorer.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82564 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Erik Winlof
2014-09-03 12:18:05 +00:00
parent 1ea3931e33
commit 124f05593e
221 changed files with 21 additions and 28579 deletions

View File

@@ -925,143 +925,5 @@ public void testPropertyViewing()
List<QName> attrs = clientConfig.getSimpleSearchAdditionalAttributes();
assertNotNull("Expecting a list of search attributes", attrs);
assertEquals("Expecting 2 search attributes", 2, attrs.size());
}
public void testWCM()
{
// setup the config service
XMLConfigService svc = initXMLConfigService(TEST_CONFIG);
// get the global config object
Config global = svc.getGlobalConfig();
assertNotNull(global);
// get the wcm config
ConfigElement wcmConfig = global.getConfigElement("wcm");
assertNotNull(wcmConfig);
// get the workflows config
ConfigElement workflows = wcmConfig.getChild("workflows");
assertNotNull(workflows);
assertEquals("wcmwf:submit", workflows.getValue());
// get the admin workflows config
ConfigElement adminWorkflows = wcmConfig.getChild("admin-workflows");
assertNotNull(adminWorkflows);
assertEquals("wcmwf:changerequest", adminWorkflows.getValue());
// get the browse page size config
ConfigElement viewsConfig = wcmConfig.getChild("views");
assertNotNull(viewsConfig);
ConfigElement browsePageSizeConfig = viewsConfig.getChild("browse-page-size");
assertNotNull(browsePageSizeConfig);
assertEquals("25", browsePageSizeConfig.getValue());
// get the deployment polling frequency
ConfigElement deploymentConfig = wcmConfig.getChild("deployment");
assertNotNull(deploymentConfig);
ConfigElement pollingConfig = deploymentConfig.getChild("progress-polling-frequency");
assertNotNull(pollingConfig);
assertEquals("2", pollingConfig.getValue());
// get the link validation polling frequency
ConfigElement linksConfig = wcmConfig.getChild("links-management");
assertNotNull(linksConfig);
pollingConfig = linksConfig.getChild("progress-polling-frequency");
assertNotNull(pollingConfig);
assertEquals("2", pollingConfig.getValue());
// get the widget config
ConfigElement xformsConfig = wcmConfig.getChild("xforms");
assertNotNull(xformsConfig);
List<ConfigElement> widgetConfig = xformsConfig.getChildren("widget");
assertEquals(2, widgetConfig.size());
// make sure the xforms-scripts config is NOT present
ConfigElement scriptsConfig = wcmConfig.getChild("xforms-scripts");
assertNull(scriptsConfig);
// make sure the custom config element is NOT present
ConfigElement customConfig = wcmConfig.getChild("custom-config");
assertNull(customConfig);
}
public void testWCMOverride()
{
// setup the config service
XMLConfigService svc = initXMLConfigService(TEST_CONFIG, TEST_CONFIG_OVERRIDE);
// get the global config object
Config global = svc.getGlobalConfig();
assertNotNull(global);
// get the wcm config
ConfigElement wcmConfig = global.getConfigElement("wcm");
assertNotNull(wcmConfig);
// get the workflows config
ConfigElement workflows = wcmConfig.getChild("workflows");
assertNotNull(workflows);
assertEquals("custom:submit", workflows.getValue().trim());
StringTokenizer t = new StringTokenizer(workflows.getValue().trim(), ", ");
while (t.hasMoreTokens())
{
System.out.println("workflow = '" + t.nextToken() + "'");
}
// get the admin workflows config
ConfigElement adminWorkflows = wcmConfig.getChild("admin-workflows");
assertNotNull(adminWorkflows);
assertEquals("custom:changerequest, custom:somejob", adminWorkflows.getValue());
t = new StringTokenizer(adminWorkflows.getValue().trim(), ", ");
while (t.hasMoreTokens())
{
System.out.println("admin workflow = '" + t.nextToken() + "'");
}
// get the browse page size config
ConfigElement viewsConfig = wcmConfig.getChild("views");
assertNotNull(viewsConfig);
ConfigElement browsePageSizeConfig = viewsConfig.getChild("browse-page-size");
assertNotNull(browsePageSizeConfig);
assertEquals("50", browsePageSizeConfig.getValue());
// get the deployment polling frequency
ConfigElement deploymentConfig = wcmConfig.getChild("deployment");
assertNotNull(deploymentConfig);
ConfigElement pollingConfig = deploymentConfig.getChild("progress-polling-frequency");
assertNotNull(pollingConfig);
assertEquals("10", pollingConfig.getValue());
// get the link validation polling frequency
ConfigElement linksConfig = wcmConfig.getChild("links-management");
assertNotNull(linksConfig);
pollingConfig = linksConfig.getChild("progress-polling-frequency");
assertNotNull(pollingConfig);
assertEquals("15", pollingConfig.getValue());
// get the widget config
ConfigElement xformsConfig = wcmConfig.getChild("xforms");
assertNotNull(xformsConfig);
List<ConfigElement> widgetConfig = xformsConfig.getChildren("widget");
assertEquals(3, widgetConfig.size());
// make sure the xforms-scripts config is present
ConfigElement scriptsConfig = wcmConfig.getChild("xforms-scripts");
assertNotNull(scriptsConfig);
assertEquals("/custom/custom-xforms.js, /custom/another-custom-xforms.js", scriptsConfig.getValue());
t = new StringTokenizer(scriptsConfig.getValue().trim(), ", ");
while (t.hasMoreTokens())
{
System.out.println("custom script = '" + t.nextToken() + "'");
}
// make sure the custom config element is present
ConfigElement customConfig = wcmConfig.getChild("custom-config");
assertNotNull(customConfig);
assertEquals("50", customConfig.getValue());
}
}