Class WordXMLRawTemplateProcessor
- java.lang.Object
-
- org.nuxeo.template.processors.AbstractTemplateProcessor
-
- org.nuxeo.template.processors.docx.WordXMLRawTemplateProcessor
-
- All Implemented Interfaces:
TemplateProcessor
,BidirectionalTemplateProcessor
public class WordXMLRawTemplateProcessor extends AbstractTemplateProcessor implements BidirectionalTemplateProcessor
WordXML implementation of theBidirectionalTemplateProcessor
. Uses Raw XML parsing : legacy code for now.- Author:
- Tiry ([email protected])
-
-
Field Summary
Fields Modifier and Type Field Description static String
TEMPLATE_TYPE
static String
WORD_XML_DATE_FORMAT
-
Fields inherited from class org.nuxeo.template.processors.AbstractTemplateProcessor
BUFFER_SIZE, log
-
-
Constructor Summary
Constructors Constructor Description WordXMLRawTemplateProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<TemplateInput>
getInitialParametersDefinition(Blob blob)
Extract parameters from the Template file.protected TemplateInput
getParamByName(String name, List<TemplateInput> params)
String
readPropertyFile(InputStream in)
Blob
renderTemplate(TemplateBasedDocument templateDocument, String templateName)
Perform rendering of the named template against theTemplateBasedDocument
DocumentModel
updateDocumentFromBlob(TemplateBasedDocument templateDocument, String templateName)
-
Methods inherited from class org.nuxeo.template.processors.AbstractTemplateProcessor
getSourceTemplateBlob, getWorkingDir
-
-
-
-
Field Detail
-
WORD_XML_DATE_FORMAT
public static final String WORD_XML_DATE_FORMAT
- See Also:
- Constant Field Values
-
TEMPLATE_TYPE
public static final String TEMPLATE_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
renderTemplate
public Blob renderTemplate(TemplateBasedDocument templateDocument, String templateName) throws IOException
Description copied from interface:TemplateProcessor
Perform rendering of the named template against theTemplateBasedDocument
- Specified by:
renderTemplate
in interfaceTemplateProcessor
- Throws:
IOException
-
getInitialParametersDefinition
public List<TemplateInput> getInitialParametersDefinition(Blob blob) throws IOException
Description copied from interface:TemplateProcessor
Extract parameters from the Template file.- Specified by:
getInitialParametersDefinition
in interfaceTemplateProcessor
- Returns:
- List of parameters for this template
- Throws:
IOException
-
getParamByName
protected TemplateInput getParamByName(String name, List<TemplateInput> params)
-
readPropertyFile
public String readPropertyFile(InputStream in) throws IOException
- Throws:
IOException
-
updateDocumentFromBlob
public DocumentModel updateDocumentFromBlob(TemplateBasedDocument templateDocument, String templateName) throws IOException
- Specified by:
updateDocumentFromBlob
in interfaceBidirectionalTemplateProcessor
- Throws:
IOException
-
-