- 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
This commit is contained in:
Ariel Backenroth
2006-11-29 22:02:22 +00:00
parent b6049d4b9e
commit 201c1df23d
2 changed files with 29 additions and 22 deletions

View File

@@ -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)
{