Class AsposeWordTemplateProcessor
java.lang.Object
com.flowable.template.engine.impl.processor.DocumentTemplateProcessor
com.flowable.template.engine.impl.processor.AsposeWordTemplateProcessor
- All Implemented Interfaces:
TemplateProcessor
public class AsposeWordTemplateProcessor
extends DocumentTemplateProcessor
implements TemplateProcessor
A
TemplateProcessor
using the Aspose ReportingEngine
.-
Field Summary
Fields inherited from class com.flowable.template.engine.impl.processor.DocumentTemplateProcessor
OUTPUT_TYPE_PDF, OUTPUT_TYPE_WORD, supportedContentType, templateResourceResolver
-
Constructor Summary
ConstructorDescriptionAsposeWordTemplateProcessor
(TemplateResourceResolver templateResourceResolver, AsposeTemplateProcessorSettings asposeTemplateProcessorSettings) -
Method Summary
Modifier and TypeMethodDescriptionprotected ContentItem
createProcessorContentItem
(ContentService contentService, String outputDocumentName, String outputDocumentType) protected byte[]
getAsByteArray
(com.aspose.words.Document doc, com.aspose.words.SaveOptions saveOptions) protected String
getOutputDocumentType
(Map<String, Object> payload, String outputDocumentName) protected com.aspose.words.Document
getTemplateDocument
(TemplateHolder templateHolder) processTemplate
(TemplateHolder templateHolder, Map<String, Object> payload, Map<String, Object> templateProcessingSettings) Processes a template given by its definition which might have been loaded through theTemplateRepositoryService
.protected com.aspose.words.SaveOptions
saveOptions
(String outputDocumentType, AsposeTemplateProcessorSettings asposeTemplateProcessorSettings) void
setCustomKnownTypes
(Set<Class<?>> customKnownTypes) void
setSupportedContentTypes
(Map<String, Integer> supportedContentTypes) Methods inherited from class com.flowable.template.engine.impl.processor.DocumentTemplateProcessor
canRender, createContentItem, getContentInputStream, getContentService, getExpressionManager, getFromPayloadOrDefault, getVariableContainer, isContentItemGenerationEnabled
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.flowable.template.api.processor.TemplateProcessor
canRender, processTemplate
-
Field Details
-
asposeTemplateProcessorSettings
-
supportedContentTypes
-
customKnownTypes
-
-
Constructor Details
-
AsposeWordTemplateProcessor
public AsposeWordTemplateProcessor(TemplateResourceResolver templateResourceResolver, AsposeTemplateProcessorSettings asposeTemplateProcessorSettings)
-
-
Method Details
-
processTemplate
public TemplateProcessingResult processTemplate(TemplateHolder templateHolder, Map<String, Object> payload, Map<String, Object> templateProcessingSettings) Description copied from interface:TemplateProcessor
Processes a template given by its definition which might have been loaded through theTemplateRepositoryService
. The payload is used for the placeholders within the template content and must be valid according theTemplateVariationModel.getParameters()
definition.- Specified by:
processTemplate
in interfaceTemplateProcessor
- Parameters:
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)- Returns:
- the template processing results
-
createProcessorContentItem
protected ContentItem createProcessorContentItem(ContentService contentService, String outputDocumentName, String outputDocumentType) - Specified by:
createProcessorContentItem
in classDocumentTemplateProcessor
-
saveOptions
protected com.aspose.words.SaveOptions saveOptions(String outputDocumentType, AsposeTemplateProcessorSettings asposeTemplateProcessorSettings) -
getAsByteArray
protected byte[] getAsByteArray(com.aspose.words.Document doc, com.aspose.words.SaveOptions saveOptions) throws Exception - Throws:
Exception
-
getOutputDocumentType
-
getTemplateDocument
-
getSupportedContentTypes
-
setSupportedContentTypes
-
getCustomKnownTypes
-
setCustomKnownTypes
-