From 201c1df23dd816790b6e856149612ce61185b5ee Mon Sep 17 00:00:00 2001 From: Ariel Backenroth Date: Wed, 29 Nov 2006 22:02:22 +0000 Subject: [PATCH] - fixing build of sample website to produce a war instead of a zip - fixing creating content with patterns starting with directories (had to reorder call to resetLayer) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4464 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- project-build.xml | 33 +++++++++---------- .../web/bean/wcm/CreateWebContentWizard.java | 18 +++++++--- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/project-build.xml b/project-build.xml index 0052f2a4c4..9453c3a9cc 100644 --- a/project-build.xml +++ b/project-build.xml @@ -110,31 +110,30 @@ - - - + - - - - - - - + + + + + + + + - - - + + diff --git a/source/java/org/alfresco/web/bean/wcm/CreateWebContentWizard.java b/source/java/org/alfresco/web/bean/wcm/CreateWebContentWizard.java index 2b98c336c0..6ecd4f2051 100644 --- a/source/java/org/alfresco/web/bean/wcm/CreateWebContentWizard.java +++ b/source/java/org/alfresco/web/bean/wcm/CreateWebContentWizard.java @@ -299,6 +299,7 @@ public class CreateWebContentWizard extends BaseContentWizard @Override protected void saveContent(File fileContent, String strContent) throws Exception { + final FormsService fs = FormsService.getInstance(); if (logger.isDebugEnabled()) logger.debug("saving file content to " + this.fileName); // get the parent path of the location to save the content @@ -306,7 +307,7 @@ public class CreateWebContentWizard extends BaseContentWizard path = path.replaceFirst(AVMConstants.STORE_MAIN, AVMConstants.STORE_PREVIEW); if (MimetypeMap.MIMETYPE_XML.equals(this.mimeType) && this.formName != null) { - final FormsService fs = FormsService.getInstance(); + final Document formInstanceData = (fileContent != null ? fs.parseXML(fileContent) : fs.parseXML(strContent)); @@ -315,15 +316,22 @@ public class CreateWebContentWizard extends BaseContentWizard final String[] sb = AVMNodeConverter.SplitBase(path); path = sb[0]; this.fileName = sb[1]; - fs.makeAllDirectories(path); } + + if (logger.isDebugEnabled()) + logger.debug("reseting layer " + path.split(":")[0] + ":/" + AVMConstants.DIR_APPBASE); + + this.avmSyncService.resetLayer(path.split(":")[0] + ":/" + AVMConstants.DIR_APPBASE); + + if (logger.isDebugEnabled()) + logger.debug("creating all directories in path " + path); + + fs.makeAllDirectories(path); + if (logger.isDebugEnabled()) logger.debug("creating file " + this.fileName + " in " + path); - - this.avmSyncService.resetLayer(path.split(":")[0] + ":/" + AVMConstants.DIR_APPBASE); - // put the content of the file into the AVM store if (fileContent != null) {