Class DOCXImporterTool

All Implemented Interfaces:
IChildEngine, ITool, IVariable, Serializable, Cloneable, Observer

@OpenApiAll public class DOCXImporterTool extends DefaultImporterTool
This tool will allow user to import docx template.
See Also:
  • Constructor Details

    • DOCXImporterTool

      public DOCXImporterTool(ITemplateEngine iTemplateEngine)
      Constructor.
      Parameters:
      iTemplateEngine - parent engine
  • Method Details

    • importer

      public CharSequence importer(File importedFile, String importedSectionName)
      Description copied from class: DefaultImporterTool
      Gets the String content of the imported file. This will do all the importTool's work. It is called by both public methods, with the difference that section is null if we want to include the whole file. Else it has a section name and only that subsection will be included.
      Overrides:
      importer in class DefaultImporterTool
      Parameters:
      importedFile - the childTemplate file to be evaluated
      importedSectionName - if there is a section else this is null
      Returns:
      the evaluated and validated output from childTemplate
    • isSupport

      protected boolean isSupport(String engineType)
      Description copied from class: DefaultImporterTool
      CHeck supported engine type
      Overrides:
      isSupport in class DefaultImporterTool
      Parameters:
      engineType - engine type
      Returns:
      true if the specific engine is supported, otherwise; false
    • setupEngine

      protected void setupEngine(ITemplateEngine engine)
      Description copied from class: DefaultImporterTool
      Set up engine.
      Add properties and context to engine.
      Overrides:
      setupEngine in class DefaultImporterTool
      Parameters:
      engine - current engine