net.sf.jooreports.templates
Interface DocumentTemplate

All Known Implementing Classes:
AbstractDocumentTemplate, UnzippedDocumentTemplate, ZippedDocumentTemplate

public interface DocumentTemplate


Nested Class Summary
static interface DocumentTemplate.ContentWrapper
           
 
Method Summary
 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.
 

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,
                           DocumentTemplateException
Merge the data model into this template and create the output document.

Parameters:
model -
output -
Throws:
java.io.IOException
DocumentTemplateException