Class DocumentTemplateProcessor
java.lang.Object
com.flowable.template.engine.impl.processor.DocumentTemplateProcessor
- All Implemented Interfaces:
TemplateProcessor
- Direct Known Subclasses:
AsposePdfTemplateProcessor
,AsposeWordTemplateProcessor
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected static final String
protected String
protected TemplateResourceResolver
-
Constructor Summary
ConstructorDescriptionDocumentTemplateProcessor
(TemplateResourceResolver templateResourceResolver, String supportedContentType) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canRender
(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 ContentItem
createContentItem
(VariableContainer variableContainer, String outputDocumentName, String outputDocumentType, byte[] documentBytes) protected abstract ContentItem
createProcessorContentItem
(ContentService contentService, String outputDocumentName, String outputDocumentType) protected InputStream
getContentInputStream
(TemplateHolder templateHolder) protected ContentService
protected ExpressionManager
getExpressionManager
(Map<String, Object> payload) protected String
protected VariableContainer
getVariableContainer
(Map<String, Object> payload) protected boolean
isContentItemGenerationEnabled
(Map<String, Object> templateProcessingSettings) 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
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:TemplateProcessor
Before 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:
canRender
in 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:
true
if it can be rendered by this processor,false
otherwise
-
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
-