Package de.xima.fc.form.export
Class FormExporter
- java.lang.Object
-
- de.xima.fc.form.export.FormExporter
-
public class FormExporter extends Object
Exporter for creating documents from formcycle forms- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description FormExporter(com.alibaba.fastjson.JSONObject persist, IXFormRenderConfig renderConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]doExport()Creates a document for the configured formFormExporterwithExcludeImages(boolean excludeImages)Sets whether or not to exclude images in exported documentFormExporterwithFormat(EFormPrintFormat format)FormExporterwithKeepPlaceholder(boolean keepPlaceholder)FormExporterwithLocale(Locale locale)Sets the default editing language for the created document.FormExporterwithTemplate(ERessourcenTyp resourceType, UUID resourceUUID)Sets the template that should be used via its resource type (client or project) and UUID
-
-
-
Constructor Detail
-
FormExporter
public FormExporter(com.alibaba.fastjson.JSONObject persist, IXFormRenderConfig renderConfig)- Parameters:
persist- Persist with the data of the form to export.renderConfig- Render config to use for exporting.
-
-
Method Detail
-
withFormat
public FormExporter withFormat(EFormPrintFormat format)
- Parameters:
format-EFormPrintFormatexport format- Returns:
FormExporterfor fluent API
-
withKeepPlaceholder
public FormExporter withKeepPlaceholder(boolean keepPlaceholder)
- Parameters:
keepPlaceholder- Whether placeholders in form field properties are replaced.- Returns:
FormExporterfor fluent API
-
withTemplate
public FormExporter withTemplate(ERessourcenTyp resourceType, UUID resourceUUID)
Sets the template that should be used via its resource type (client or project) and UUID- Parameters:
resourceType-ERessourcenTypclient or project resourceresourceUUID-UUIDof the resource- Returns:
FormExporterfor fluent API
-
withLocale
public FormExporter withLocale(Locale locale)
Sets the default editing language for the created document.- Parameters:
locale- Locale to set.- Returns:
FormExporterfor fluent API
-
withExcludeImages
public FormExporter withExcludeImages(boolean excludeImages)
Sets whether or not to exclude images in exported document- Parameters:
excludeImages-BooleanexcludeXImagein the exported form- Returns:
FormExporterfor fluent API
-
doExport
public byte[] doExport()
Creates a document for the configured form- Returns:
- byte array of the exported form document
-
-