public class AsposeWordTemplateProcessor extends DocumentTemplateProcessor implements TemplateProcessor
TemplateProcessor
using the Aspose ReportingEngine
.Modifier and Type | Field and Description |
---|---|
protected AsposeTemplateProcessorSettings |
asposeTemplateProcessorSettings |
protected Set<Class<?>> |
customKnownTypes |
protected Map<String,Integer> |
supportedContentTypes |
OUTPUT_TYPE_PDF, OUTPUT_TYPE_WORD, supportedContentType, templateResourceResolver
Constructor and Description |
---|
AsposeWordTemplateProcessor(TemplateResourceResolver templateResourceResolver,
AsposeTemplateProcessorSettings asposeTemplateProcessorSettings) |
Modifier and Type | Method and Description |
---|---|
protected ContentItem |
createProcessorContentItem(ContentService contentService,
String outputDocumentName,
String outputDocumentType) |
protected byte[] |
getAsByteArray(com.aspose.words.Document doc,
Integer saveFormat) |
Set<Class<?>> |
getCustomKnownTypes() |
protected String |
getOutputDocumentType(Map<String,Object> payload,
String outputDocumentName) |
Map<String,Integer> |
getSupportedContentTypes() |
protected com.aspose.words.Document |
getTemplateDocument(TemplateHolder templateHolder) |
TemplateProcessingResult |
processTemplate(TemplateHolder templateHolder,
Map<String,Object> payload,
Map<String,Object> templateProcessingSettings)
Processes a template given by its definition which might have been loaded through the
TemplateRepositoryService . |
void |
setCustomKnownTypes(Set<Class<?>> customKnownTypes) |
void |
setSupportedContentTypes(Map<String,Integer> supportedContentTypes) |
canRender, createContentItem, getContentInputStream, getContentService, getExpressionManager, getFromPayloadOrDefault, getVariableContainer, isContentItemGenerationEnabled
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canRender, processTemplate
protected final AsposeTemplateProcessorSettings asposeTemplateProcessorSettings
public AsposeWordTemplateProcessor(TemplateResourceResolver templateResourceResolver, AsposeTemplateProcessorSettings asposeTemplateProcessorSettings)
public TemplateProcessingResult processTemplate(TemplateHolder templateHolder, Map<String,Object> payload, Map<String,Object> templateProcessingSettings)
TemplateProcessor
TemplateRepositoryService
.
The payload is used for the placeholders within the template content and must be valid according the TemplateVariationModel.getParameters()
definition.processTemplate
in interface TemplateProcessor
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)protected ContentItem createProcessorContentItem(ContentService contentService, String outputDocumentName, String outputDocumentType)
createProcessorContentItem
in class DocumentTemplateProcessor
protected byte[] getAsByteArray(com.aspose.words.Document doc, Integer saveFormat) throws Exception
Exception
protected String getOutputDocumentType(Map<String,Object> payload, String outputDocumentName)
protected com.aspose.words.Document getTemplateDocument(TemplateHolder templateHolder)
public void setSupportedContentTypes(Map<String,Integer> supportedContentTypes)