mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
forgot that this codepath got split. writing to the correct path on create now... no wonder only regenerate appeared to be working.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3573 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -55,6 +55,8 @@ import org.alfresco.repo.avm.*;
|
|||||||
public class OutputUtil
|
public class OutputUtil
|
||||||
{
|
{
|
||||||
private static final Log LOGGER = LogFactory.getLog(OutputUtil.class);
|
private static final Log LOGGER = LogFactory.getLog(OutputUtil.class);
|
||||||
|
private static final String PARENT_AVM_PATH =
|
||||||
|
"repo-1:/repo-1/alice/appBase/avm_webapps/ROOT/home-insurance";
|
||||||
|
|
||||||
public static void generate(NodeRef createdNode,
|
public static void generate(NodeRef createdNode,
|
||||||
Document xml,
|
Document xml,
|
||||||
@@ -105,14 +107,13 @@ public class OutputUtil
|
|||||||
}
|
}
|
||||||
|
|
||||||
AVMService avmService = AVMContext.fgInstance.getAVMService();
|
AVMService avmService = AVMContext.fgInstance.getAVMService();
|
||||||
String parentPath = "repo-1:/repo-1/alice/appBase/avm_webapps/my_webapp";
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
out = new OutputStreamWriter(avmService.createFile(parentPath, fileName));
|
out = new OutputStreamWriter(avmService.createFile(PARENT_AVM_PATH, fileName));
|
||||||
}
|
}
|
||||||
catch (AVMExistsException e)
|
catch (AVMExistsException e)
|
||||||
{
|
{
|
||||||
out = new OutputStreamWriter(avmService.getFileOutputStream(parentPath + "/" + fileName));
|
out = new OutputStreamWriter(avmService.getFileOutputStream(PARENT_AVM_PATH + "/" + fileName));
|
||||||
}
|
}
|
||||||
LOGGER.debug("generating " + fileName + " to avm");
|
LOGGER.debug("generating " + fileName + " to avm");
|
||||||
tom.generate(xml, tt, out);
|
tom.generate(xml, tt, out);
|
||||||
@@ -171,14 +172,14 @@ public class OutputUtil
|
|||||||
LOGGER.debug("generated " + fileName + " using " + tom);
|
LOGGER.debug("generated " + fileName + " using " + tom);
|
||||||
|
|
||||||
AVMService avmService = AVMContext.fgInstance.getAVMService();
|
AVMService avmService = AVMContext.fgInstance.getAVMService();
|
||||||
String parentPath = "repo-1:/repo-1/alice/appBase/avm_webapps/ROOT/home-insurance";
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
out = new OutputStreamWriter(avmService.createFile(parentPath, generatedFileName));
|
out = new OutputStreamWriter(avmService.createFile(PARENT_AVM_PATH, generatedFileName));
|
||||||
}
|
}
|
||||||
catch (AVMExistsException e)
|
catch (AVMExistsException e)
|
||||||
{
|
{
|
||||||
out = new OutputStreamWriter(avmService.getFileOutputStream(parentPath + "/" + generatedFileName));
|
out = new OutputStreamWriter(avmService.getFileOutputStream(PARENT_AVM_PATH + "/" + generatedFileName));
|
||||||
}
|
}
|
||||||
LOGGER.debug("generating " + generatedFileName + " to avm");
|
LOGGER.debug("generating " + generatedFileName + " to avm");
|
||||||
tom.generate(xml, tt, out);
|
tom.generate(xml, tt, out);
|
||||||
|
Reference in New Issue
Block a user