mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- model changes
- adding freemarker expression for output path patterns - enabling using the same rendering engine template with multiple mime types - extracting rendering engine template from rendering engine to make moving to templateservice easier eventually git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4351 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -49,14 +49,23 @@ public class XSLFORenderingEngine
|
||||
|
||||
private static final Log LOGGER = LogFactory.getLog(XSLFORenderingEngine.class);
|
||||
|
||||
public XSLFORenderingEngine(final NodeRef nodeRef,
|
||||
final NodeService nodeService,
|
||||
final ContentService contentService)
|
||||
public XSLFORenderingEngine()
|
||||
{
|
||||
super(nodeRef, nodeService, contentService);
|
||||
super();
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return "XSL-FO";
|
||||
}
|
||||
|
||||
public String getDefaultTemplateFileExtension()
|
||||
{
|
||||
return "fo";
|
||||
}
|
||||
|
||||
public void render(final Document xmlContent,
|
||||
final RenderingEngineTemplate ret,
|
||||
final Map<String, String> parameters,
|
||||
final OutputStream out)
|
||||
throws IOException,
|
||||
@@ -67,7 +76,7 @@ public class XSLFORenderingEngine
|
||||
{
|
||||
final FopFactory fopFactory = FopFactory.newInstance();
|
||||
final FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
|
||||
final Fop fop = fopFactory.newFop(this.getMimetypeForRendition(),
|
||||
final Fop fop = fopFactory.newFop(ret.getMimetypeForRendition(),
|
||||
foUserAgent,
|
||||
out);
|
||||
// Resulting SAX events (the generated FO) must be piped through to FOP
|
||||
@@ -79,7 +88,6 @@ public class XSLFORenderingEngine
|
||||
throw new RenderingEngine.RenderingException(fope);
|
||||
}
|
||||
|
||||
super.render(new DOMSource(xmlContent), parameters, result);
|
||||
|
||||
super.render(new DOMSource(xmlContent), ret, parameters, result);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user