- 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:
Ariel Backenroth
2006-11-14 08:49:18 +00:00
parent 73a73a3264
commit cb5a882837
21 changed files with 1150 additions and 626 deletions

View File

@@ -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);
}
}