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:
Ariel Backenroth
2006-08-23 22:03:56 +00:00
parent 31acacc947
commit 11b56cc912

View File

@@ -58,6 +58,11 @@ public class OutputUtil
private static final String PARENT_AVM_PATH =
"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,
Document xml,
TemplateType tt,
@@ -71,7 +76,7 @@ public class OutputUtil
try
{
// get the node ref of the node that will contain the content
fileName = fileName + "-generated.html";
fileName = stripExtension(fileName) + ".html";
FileInfo fileInfo =
fileFolderService.create(containerNodeRef,
fileName,