Class DocumentTemplateProcessor
java.lang.Object
com.flowable.template.engine.impl.processor.DocumentTemplateProcessor
- All Implemented Interfaces:
TemplateProcessor
- Direct Known Subclasses:
AsposePdfTemplateProcessor,AsposeWordTemplateProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected Stringprotected TemplateResourceResolver -
Constructor Summary
ConstructorsConstructorDescriptionDocumentTemplateProcessor(TemplateResourceResolver templateResourceResolver, String supportedContentType) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanRender(TemplateModel templateModel, TemplateVariationModel templateVariation) Before a template is rendered, the service will call this method to check, whether this processor is able to handle the given template.protected ContentItemcreateContentItem(VariableContainer variableContainer, String outputDocumentName, String outputDocumentType, byte[] documentBytes) protected abstract ContentItemcreateProcessorContentItem(ContentService contentService, String outputDocumentName, String outputDocumentType) protected InputStreamgetContentInputStream(TemplateHolder templateHolder) protected ContentServiceprotected ExpressionManagergetExpressionManager(Map<String, Object> payload) protected Stringprotected VariableContainergetVariableContainer(Map<String, Object> payload) protected booleanisContentItemGenerationEnabled(Map<String, Object> templateProcessingSettings) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.flowable.template.api.processor.TemplateProcessor
processTemplate, processTemplate
-
Field Details
-
OUTPUT_TYPE_PDF
- See Also:
-
OUTPUT_TYPE_WORD
- See Also:
-
templateResourceResolver
-
supportedContentType
-
-
Constructor Details
-
DocumentTemplateProcessor
public DocumentTemplateProcessor(TemplateResourceResolver templateResourceResolver, String supportedContentType)
-
-
Method Details
-
canRender
Description copied from interface:TemplateProcessorBefore a template is rendered, the service will call this method to check, whether this processor is able to handle the given template. Typically, this is based on the type / subType of the template.- Specified by:
canRenderin interfaceTemplateProcessor- Parameters:
templateModel- the template definition containing meta information like type and sub type of the templatetemplateVariation- the template to check, if it can be rendered by this processor- Returns:
trueif it can be rendered by this processor,falseotherwise
-
createProcessorContentItem
protected abstract ContentItem createProcessorContentItem(ContentService contentService, String outputDocumentName, String outputDocumentType) -
createContentItem
protected ContentItem createContentItem(VariableContainer variableContainer, String outputDocumentName, String outputDocumentType, byte[] documentBytes) throws IOException - Throws:
IOException
-
getFromPayloadOrDefault
-
getExpressionManager
-
getVariableContainer
-
getContentInputStream
-
getContentService
-
isContentItemGenerationEnabled
-