Merged V3.2 to HEAD

16297: Reversed some changes introduced prematurely by 16296 
   16296: Merged V3.1 to V3.2
      16294: ETHREEOH-2846: Propagate exceptions when searching for web scripts
         - Stops share from successfully initializing when there are I/O errors traversing its class path store
      16292: Merged V3.2 to V3.1 (record only)
         15798: ETHREEOH-2686: Resolved problem with site dashboards disappearing after NTLM login / session expiry


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16299 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2009-09-16 12:09:23 +00:00
parent c85ea934b7
commit 7e95e8cc16

View File

@@ -24,16 +24,17 @@
*/
package org.alfresco.repo.web.scripts.activities;
import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.web.scripts.DeclarativeWebScript;
import org.alfresco.web.scripts.SearchPath;
import org.alfresco.web.scripts.Status;
import org.alfresco.web.scripts.Store;
import org.alfresco.web.scripts.WebScriptException;
import org.alfresco.web.scripts.WebScriptRequest;
/**
@@ -72,12 +73,19 @@ public class TemplatesWebScript extends DeclarativeWebScript
Set<String> templatePaths = new HashSet<String>();
for (Store apiStore : searchPath.getStores())
{
try
{
for (String templatePath : apiStore.getDocumentPaths(path, false, templatePattern))
{
templatePaths.add(templatePath);
}
}
catch (IOException e)
{
throw new WebScriptException("Failed to search for templates from store " + apiStore, e);
}
}
Map<String, Object> model = new HashMap<String, Object>();
model.put("paths", templatePaths);