mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-497 (Distorted folders name after Load Test Data DODExampleFilePlan.xml)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.0@45034 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -21,6 +21,7 @@ package org.alfresco.module.org_alfresco_module_rm.script;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -69,6 +70,7 @@ public class BootstrapTestDataGet extends DeclarativeWebScript
|
||||
private static final String ARG_IMPORT = "import";
|
||||
|
||||
private static final String XML_IMPORT = "alfresco/module/org_alfresco_module_rm/dod5015/DODExampleFilePlan.xml";
|
||||
private static final String charsetName = "UTF-8";
|
||||
|
||||
private static final StoreRef SPACES_STORE = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");
|
||||
|
||||
@@ -177,7 +179,15 @@ public class BootstrapTestDataGet extends DeclarativeWebScript
|
||||
{
|
||||
throw new AlfrescoRuntimeException("The DODExampleFilePlan.xml import file could not be found");
|
||||
}
|
||||
Reader viewReader = new InputStreamReader(is);
|
||||
Reader viewReader = null;
|
||||
try
|
||||
{
|
||||
viewReader = new InputStreamReader(is, charsetName);
|
||||
}
|
||||
catch (UnsupportedEncodingException error)
|
||||
{
|
||||
throw new AlfrescoRuntimeException("The Character Encoding '" + charsetName + "' is not supported.");
|
||||
}
|
||||
Location location = new Location(filePlan);
|
||||
importerService.importView(viewReader, location, null, null);
|
||||
}
|
||||
|
Reference in New Issue
Block a user