mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- fix error in namespaces in get company footer
- add a very demoware ready sample multi channel output, meaning generating a really ugly plain text version of the press release and adding a link to it from the html version. - removing the company footer xsl as it is no longer mandatory to have one - passing more parameters to the xsl process - rather ugly implementation - needs to be revisited git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4044 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -18,6 +18,8 @@ package org.alfresco.web.templating;
|
||||
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.avm.AVMNodeConverter;
|
||||
@@ -71,7 +73,10 @@ public class OutputUtil
|
||||
LOGGER.debug("Created file node for file: " +
|
||||
fullAvmPath);
|
||||
final OutputStreamWriter out = new OutputStreamWriter(fileOut);
|
||||
tom.generate(xml, tt, sandBoxUrl, out);
|
||||
|
||||
final HashMap<String, String> parameters =
|
||||
getOutputMethodParameters(sandBoxUrl, fileName, generatedFileName);
|
||||
tom.generate(xml, tt, parameters, out);
|
||||
out.close();
|
||||
|
||||
NodeRef outputNodeRef = AVMNodeConverter.ToNodeRef(-1, fullAvmPath);
|
||||
@@ -136,7 +141,9 @@ public class OutputUtil
|
||||
}
|
||||
|
||||
final OutputStreamWriter writer = new OutputStreamWriter(out);
|
||||
tom.generate(xml, tt, sandBoxUrl, writer);
|
||||
final HashMap<String, String> parameters =
|
||||
getOutputMethodParameters(sandBoxUrl, fileName, generatedFileName);
|
||||
tom.generate(xml, tt, parameters, writer);
|
||||
writer.close();
|
||||
LOGGER.debug("generated " + fileName + " using " + tom);
|
||||
}
|
||||
@@ -148,4 +155,15 @@ public class OutputUtil
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
private static HashMap<String, String> getOutputMethodParameters(final String sandBoxUrl,
|
||||
final String fileName,
|
||||
final String generatedFileName)
|
||||
{
|
||||
final HashMap<String, String> parameters = new HashMap<String, String>();
|
||||
parameters.put("avm_store_url", sandBoxUrl);
|
||||
parameters.put("derived_from_file_name", fileName);
|
||||
parameters.put("generated_file_name", generatedFileName);
|
||||
return parameters;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user