mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
strip extension from filename
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3594 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -58,6 +58,11 @@ public class OutputUtil
|
|||||||
private static final String PARENT_AVM_PATH =
|
private static final String PARENT_AVM_PATH =
|
||||||
"repo-1:/repo-1/alice/appBase/avm_webapps/ROOT/home-insurance";
|
"repo-1:/repo-1/alice/appBase/avm_webapps/ROOT/home-insurance";
|
||||||
|
|
||||||
|
private static String stripExtension(String s)
|
||||||
|
{
|
||||||
|
return s.replaceAll("(.+)\\..*", "$1");
|
||||||
|
}
|
||||||
|
|
||||||
public static void generate(NodeRef createdNode,
|
public static void generate(NodeRef createdNode,
|
||||||
Document xml,
|
Document xml,
|
||||||
TemplateType tt,
|
TemplateType tt,
|
||||||
@@ -71,7 +76,7 @@ public class OutputUtil
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// get the node ref of the node that will contain the content
|
// get the node ref of the node that will contain the content
|
||||||
fileName = fileName + "-generated.html";
|
fileName = stripExtension(fileName) + ".html";
|
||||||
FileInfo fileInfo =
|
FileInfo fileInfo =
|
||||||
fileFolderService.create(containerNodeRef,
|
fileFolderService.create(containerNodeRef,
|
||||||
fileName,
|
fileName,
|
||||||
|
Reference in New Issue
Block a user