public class AsposeWordTemplateProcessor extends DocumentTemplateProcessor implements TemplateProcessor
TemplateProcessor
using the Aspose ReportingEngine
.Modifier and Type | Field and Description |
---|---|
protected Set<Class<?>> |
customKnownTypes |
protected Map<String,Integer> |
supportedContentTypes |
OUTPUT_TYPE_PDF, OUTPUT_TYPE_WORD, supportedContentType, templateResourceResolver
Constructor and Description |
---|
AsposeWordTemplateProcessor(TemplateResourceResolver templateResourceResolver) |
Modifier and Type | Method and Description |
---|---|
protected org.flowable.content.api.ContentItem |
createProcessorContentItem(org.flowable.content.api.ContentService contentService,
String outputDocumentName,
String outputDocumentType) |
protected byte[] |
getAsByteArray(com.aspose.words.Document doc,
Integer saveFormat) |
Set<Class<?>> |
getCustomKnownTypes() |
protected String |
getOutputDocumentType(Map<String,Object> payload,
String outputDocumentName) |
Map<String,Integer> |
getSupportedContentTypes() |
protected com.aspose.words.Document |
getTemplateDocument(TemplateHolder templateHolder) |
TemplateProcessingResult |
processTemplate(TemplateHolder templateHolder,
Map<String,Object> payload)
Processes a template given by its definition which might have been loaded through the
TemplateRepositoryService . |
void |
setCustomKnownTypes(Set<Class<?>> customKnownTypes) |
void |
setSupportedContentTypes(Map<String,Integer> supportedContentTypes) |
canRender, createContentItem, getContentInputStream, getContentService, getExpressionManager, getFromPayloadOrDefault, getVariableContainer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canRender
public AsposeWordTemplateProcessor(TemplateResourceResolver templateResourceResolver)
public TemplateProcessingResult processTemplate(TemplateHolder templateHolder, Map<String,Object> payload)
TemplateProcessor
TemplateRepositoryService
.
The payload is used for the placeholders within the template content and must be valid according the TemplateVariationModel.getParameters()
definition.processTemplate
in interface TemplateProcessor
templateHolder
- the template holder with template and template variation informationpayload
- the optional payload, if the template is using placeholders to render properly (must be valid according the parameter definition)protected org.flowable.content.api.ContentItem createProcessorContentItem(org.flowable.content.api.ContentService contentService, String outputDocumentName, String outputDocumentType)
createProcessorContentItem
in class DocumentTemplateProcessor
protected byte[] getAsByteArray(com.aspose.words.Document doc, Integer saveFormat) throws Exception
Exception
protected String getOutputDocumentType(Map<String,Object> payload, String outputDocumentName)
protected com.aspose.words.Document getTemplateDocument(TemplateHolder templateHolder)
public void setSupportedContentTypes(Map<String,Integer> supportedContentTypes)
Copyright © 2019. All rights reserved.