mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- 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:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user