public interface DocumentTemplate
| Modifier and Type | Interface and Description |
|---|---|
static interface |
DocumentTemplate.ContentWrapper |
| Modifier and Type | Method and Description |
|---|---|
void |
createDocument(java.lang.Object model,
java.io.OutputStream output)
Merge the data model into this template and create the output document.
|
java.util.Map |
getConfigurations() |
void |
setContentWrapper(DocumentTemplate.ContentWrapper contentWrapper)
Hook to set custom FreeMarker directives on each XML entry.
|
void |
setOpenDocumentSettings(java.util.Map openDocumentSettings) |
void |
setXmlEntries(java.lang.String[] xmlEntries)
Set which XML entries in the ODT template can contain templating instructions.
|
void setXmlEntries(java.lang.String[] xmlEntries)
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"
});
xmlEntries - void setContentWrapper(DocumentTemplate.ContentWrapper contentWrapper)
The default implementation escapes XML entities and converts newline characters into line-break tags.
contentWrapper - void setOpenDocumentSettings(java.util.Map openDocumentSettings)
java.util.Map getConfigurations()
void createDocument(java.lang.Object model,
java.io.OutputStream output)
throws java.io.IOException,
DocumentTemplateException
model - output - java.io.IOExceptionDocumentTemplateException