Class FormExporter


  • public class FormExporter
    extends Object
    Exporter for creating documents from FORMCYCLE forms
    Author:
    XIMA MEDIA GmbH
    • 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

      • withKeepPlaceholder

        public FormExporter withKeepPlaceholder​(boolean keepPlaceholder)
        Parameters:
        keepPlaceholder - Whether placeholders in form field properties are replaced.
        Returns:
        FormExporter for 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 - ERessourcenTyp client or project resource
        resourceUUID - UUID of the resource
        Returns:
        FormExporter for fluent API
      • withLocale

        public FormExporter withLocale​(Locale locale)
        Sets the default editing language for the created document.
        Parameters:
        locale - Locale to set.
        Returns:
        FormExporter for fluent API
      • withExcludeImages

        public FormExporter withExcludeImages​(boolean excludeImages)
        Sets whether or not to exclude images in exported document
        Parameters:
        excludeImages - Boolean exclude XImage in the exported form
        Returns:
        FormExporter for fluent API
      • doExport

        public byte[] doExport()
        Creates a document for the configured form
        Returns:
        byte array of the exported form document