Package net.sf.jooreports.templates
Interface DocumentTemplate
-
- All Known Implementing Classes:
AbstractDocumentTemplate,UnzippedDocumentTemplate,ZippedDocumentTemplate
public interface DocumentTemplate
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceDocumentTemplate.ContentWrapper
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreateDocument(java.lang.Object model, java.io.OutputStream output)Merge the data model into this template and create the output document.java.util.MapgetConfigurations()voidsetContentWrapper(DocumentTemplate.ContentWrapper contentWrapper)Hook to set custom FreeMarker directives on each XML entry.voidsetOpenDocumentSettings(java.util.Map openDocumentSettings)voidsetXmlEntries(java.lang.String[] xmlEntries)Set which XML entries in the ODT template can contain templating instructions.
-
-
-
Method Detail
-
setXmlEntries
void setXmlEntries(java.lang.String[] xmlEntries)
Set which XML entries in the ODT template can contain templating instructions.By default they are content.xml and styles.xml.
To add all possible XML entries use
template.setXmlEntries(new String[] { "content.xml", "meta.xml", "settings.xml", "styles.xml" });- Parameters:
xmlEntries-
-
setContentWrapper
void setContentWrapper(DocumentTemplate.ContentWrapper contentWrapper)
Hook to set custom FreeMarker directives on each XML entry.The default implementation escapes XML entities and converts newline characters into line-break tags.
- Parameters:
contentWrapper-
-
setOpenDocumentSettings
void setOpenDocumentSettings(java.util.Map openDocumentSettings)
-
getConfigurations
java.util.Map getConfigurations()
-
createDocument
void createDocument(java.lang.Object model, java.io.OutputStream output) throws java.io.IOException, DocumentTemplateExceptionMerge the data model into this template and create the output document.- Parameters:
model-output-- Throws:
java.io.IOExceptionDocumentTemplateException
-
-