Class AHSimpleDataMerger


  • public class AHSimpleDataMerger
    extends java.lang.Object
    Simple type data-merge
    Version:
    1.0 2021/09/29
    Author:
    Copyright (c) 2020-2022 Antenna House, Inc. All rights reserved.
    • Constructor Detail

      • AHSimpleDataMerger

        public AHSimpleDataMerger()
        Constructor
    • Method Detail

      • createSimpleTypeDataFromCSV

        public void createSimpleTypeDataFromCSV​(java.lang.String dataPath,
                                                CommonOption.DataFileEncoding dataFileEncoding)
        Create the MergeData from the CSV file
        Parameters:
        dataPath - CSV file path
        dataFileEncoding - Character encoding of CSV file
      • createSimpleTypeDataFromJSON

        public void createSimpleTypeDataFromJSON​(java.lang.String dataPath,
                                                 CommonOption.DataFileEncoding dataFileEncoding)
        Create the MergeData from the JSON file
        Parameters:
        dataPath - JSON file path
        dataFileEncoding - Character encoding of JSON file
      • executeSimpleDataMerge

        public void executeSimpleDataMerge​(InputParam inputParam,
                                           OutputParam outputParam)
                                    throws AHOOXMLDocxManagerException,
                                           java.io.IOException,
                                           java.lang.InterruptedException
        Execute the simple type data-merge to the template
        Parameters:
        inputParam - Input parameter
        outputParam - Output parameter
        Throws:
        AHOOXMLDocxManagerException
        java.io.IOException
        java.lang.InterruptedException
      • getDataMergeFields

        public java.util.ArrayList<java.lang.String> getDataMergeFields​(java.lang.String inputFile)
                                                                 throws AHOOXMLDocxManagerException,
                                                                        java.io.IOException,
                                                                        java.lang.InterruptedException
        Get the fields defined in the data-merge template
        Parameters:
        inputFile - Path of the template file for data-merge
        Returns:
        Name list of the data-merge field
        Throws:
        AHOOXMLDocxManagerException
        java.io.IOException
        java.lang.InterruptedException