Package org.alfresco.repo.template
Class XSLTProcessor
java.lang.Object
org.alfresco.repo.processor.BaseProcessor
org.alfresco.repo.template.XSLTProcessor
- All Implemented Interfaces:
org.alfresco.processor.Processor,TemplateProcessor
-
Field Summary
FieldsFields inherited from class org.alfresco.repo.processor.BaseProcessor
extension, name, processorExtensions, scriptService, services, templateService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddParameters(XSLTemplateModel xsltModel, Document xslTemplate) Adds the specified parameters to the xsl template as variables within the alfresco namespace.addScripts(XSLTemplateModel xsltModel, Document xslTemplate) Adds a script element to the xsl which makes static methods on this object available to the xsl tempalte.protected SourcegetXMLSource(Map<QName, Object> model) voidProcess a template against the supplied data model and write to the out.voidProcess a template in the given locale against the supplied data model and write to the out.voidprocessString(String template, Object model, Writer out) Process a string template against the supplied data model and write to the out.voidregister()Registers this processor with the relevant servicesMethods inherited from class org.alfresco.repo.processor.BaseProcessor
getExtension, getName, getProcessorExtensions, registerProcessorExtension, setExtension, setName, setScriptService, setServiceRegistry, setTemplateServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.alfresco.processor.Processor
getExtension, getName, registerProcessorExtension
-
Field Details
-
ROOT_NAMESPACE
-
-
Constructor Details
-
XSLTProcessor
public XSLTProcessor()
-
-
Method Details
-
register
public void register()Description copied from class:BaseProcessorRegisters this processor with the relevant services- Overrides:
registerin classBaseProcessor
-
process
Description copied from interface:TemplateProcessorProcess a template against the supplied data model and write to the out.- Specified by:
processin interfaceTemplateProcessor- Parameters:
template- Template name/pathmodel- Object model to process template againstout- Writer object to send output too
-
processString
Description copied from interface:TemplateProcessorProcess a string template against the supplied data model and write to the out.- Specified by:
processStringin interfaceTemplateProcessor- Parameters:
template- Template stringmodel- Object model to process template againstout- Writer object to send output too
-
addScripts
Adds a script element to the xsl which makes static methods on this object available to the xsl tempalte.- Parameters:
xslTemplate- the xsl template
-
addParameters
Adds the specified parameters to the xsl template as variables within the alfresco namespace.- Parameters:
xsltModel- the variables to place within the xsl templatexslTemplate- the xsl template
-
getXMLSource
-
process
Description copied from interface:TemplateProcessorProcess a template in the given locale against the supplied data model and write to the out.- Specified by:
processin interfaceTemplateProcessor- Parameters:
template- Template name/pathmodel- Object model to process template againstout- Writer object to send output toolocale- The Locale to process the template in
-