public abstract class DocumentTemplateProcessor extends Object implements TemplateProcessor
Modifier and Type | Field and Description |
---|---|
protected static String |
OUTPUT_TYPE_PDF |
protected static String |
OUTPUT_TYPE_WORD |
protected String |
supportedContentType |
protected TemplateResourceResolver |
templateResourceResolver |
Constructor and Description |
---|
DocumentTemplateProcessor(TemplateResourceResolver templateResourceResolver,
String supportedContentType) |
Modifier and Type | Method and Description |
---|---|
boolean |
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 org.flowable.content.api.ContentItem |
createContentItem(org.flowable.common.engine.api.variable.VariableContainer variableContainer,
String outputDocumentName,
String outputDocumentType,
byte[] documentBytes) |
protected abstract org.flowable.content.api.ContentItem |
createProcessorContentItem(org.flowable.content.api.ContentService contentService,
String outputDocumentName,
String outputDocumentType) |
protected InputStream |
getContentInputStream(TemplateHolder templateHolder) |
protected org.flowable.content.api.ContentService |
getContentService() |
protected org.flowable.common.engine.impl.el.ExpressionManager |
getExpressionManager(Map<String,Object> payload) |
protected String |
getFromPayloadOrDefault(Map<String,Object> payload,
String key,
String defaultValue) |
protected org.flowable.common.engine.api.variable.VariableContainer |
getVariableContainer(Map<String,Object> payload) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
processTemplate
protected static final String OUTPUT_TYPE_PDF
protected static final String OUTPUT_TYPE_WORD
protected TemplateResourceResolver templateResourceResolver
protected String supportedContentType
public DocumentTemplateProcessor(TemplateResourceResolver templateResourceResolver, String supportedContentType)
public boolean canRender(TemplateModel templateModel, TemplateVariationModel templateVariation)
TemplateProcessor
canRender
in interface TemplateProcessor
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 processortrue
if it can be rendered by this processor, false
otherwiseprotected abstract org.flowable.content.api.ContentItem createProcessorContentItem(org.flowable.content.api.ContentService contentService, String outputDocumentName, String outputDocumentType)
protected org.flowable.content.api.ContentItem createContentItem(org.flowable.common.engine.api.variable.VariableContainer variableContainer, String outputDocumentName, String outputDocumentType, byte[] documentBytes) throws IOException
IOException
protected String getFromPayloadOrDefault(Map<String,Object> payload, String key, String defaultValue)
protected org.flowable.common.engine.impl.el.ExpressionManager getExpressionManager(Map<String,Object> payload)
protected org.flowable.common.engine.api.variable.VariableContainer getVariableContainer(Map<String,Object> payload)
protected InputStream getContentInputStream(TemplateHolder templateHolder)
protected org.flowable.content.api.ContentService getContentService()
Copyright © 2019. All rights reserved.