mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
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:
@@ -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;
|
||||
|
||||
/**
|
||||
@@ -73,11 +74,18 @@ public class TemplatesWebScript extends DeclarativeWebScript
|
||||
Set<String> templatePaths = new HashSet<String>();
|
||||
for (Store apiStore : searchPath.getStores())
|
||||
{
|
||||
for(String templatePath : apiStore.getDocumentPaths(path, false, templatePattern))
|
||||
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);
|
||||
|
Reference in New Issue
Block a user