Class AsposePdfTemplateProcessor
- java.lang.Object
-
- com.flowable.template.engine.impl.processor.DocumentTemplateProcessor
-
- com.flowable.template.engine.impl.processor.AsposePdfTemplateProcessor
-
- All Implemented Interfaces:
TemplateProcessor
public class AsposePdfTemplateProcessor extends DocumentTemplateProcessor
ATemplateProcessorusing the AsposeDocument.
-
-
Field Summary
-
Fields inherited from class com.flowable.template.engine.impl.processor.DocumentTemplateProcessor
OUTPUT_TYPE_PDF, OUTPUT_TYPE_WORD, supportedContentType, templateResourceResolver
-
-
Constructor Summary
Constructors Constructor Description AsposePdfTemplateProcessor(TemplateResourceResolver templateResourceResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ContentItemcreateProcessorContentItem(ContentService contentService, String outputDocumentName, String outputDocumentType)protected byte[]getAsByteArray(com.aspose.pdf.Document doc)protected intgetChoiceIndex(Object varValue, com.aspose.pdf.ChoiceField choiceField)protected StringgetDocumentName(Map<String,Object> payload)protected StringgetFieldExpression(com.aspose.pdf.Field field)protected Iterable<com.aspose.pdf.Field>getSupportedFields(com.aspose.pdf.Form pdfForm)protected com.aspose.pdf.DocumentgetTemplateDocument(TemplateHolder templateHolder)protected booleanisExpression(String fieldExpression)protected booleanisOptionField(com.aspose.pdf.Field field)protected byte[]processDocument(TemplateHolder templateHolder, ExpressionManager expressionManager, VariableContainer variableContainer)TemplateProcessingResultprocessTemplate(TemplateHolder templateHolder, Map<String,Object> payload, Map<String,Object> templateProcessingSettings)Processes a template given by its definition which might have been loaded through theTemplateRepositoryService.-
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
processTemplate
-
-
-
-
Constructor Detail
-
AsposePdfTemplateProcessor
public AsposePdfTemplateProcessor(TemplateResourceResolver templateResourceResolver)
-
-
Method Detail
-
processTemplate
public TemplateProcessingResult processTemplate(TemplateHolder templateHolder, Map<String,Object> payload, Map<String,Object> templateProcessingSettings)
Description copied from interface:TemplateProcessorProcesses 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.- 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
-
processDocument
protected byte[] processDocument(TemplateHolder templateHolder, ExpressionManager expressionManager, VariableContainer variableContainer) throws Exception
- Throws:
Exception
-
getChoiceIndex
protected int getChoiceIndex(Object varValue, com.aspose.pdf.ChoiceField choiceField)
-
isExpression
protected boolean isExpression(String fieldExpression)
-
getFieldExpression
protected String getFieldExpression(com.aspose.pdf.Field field)
-
getSupportedFields
protected Iterable<com.aspose.pdf.Field> getSupportedFields(com.aspose.pdf.Form pdfForm)
-
isOptionField
protected boolean isOptionField(com.aspose.pdf.Field field)
-
createProcessorContentItem
protected ContentItem createProcessorContentItem(ContentService contentService, String outputDocumentName, String outputDocumentType)
- Specified by:
createProcessorContentItemin classDocumentTemplateProcessor
-
getAsByteArray
protected byte[] getAsByteArray(com.aspose.pdf.Document doc) throws Exception- Throws:
Exception
-
getTemplateDocument
protected com.aspose.pdf.Document getTemplateDocument(TemplateHolder templateHolder)
-
-