Class TestDocxStamper<T>

java.lang.Object
pro.verron.officestamper.test.TestDocxStamper<T>

public final class TestDocxStamper<T> extends Object
Common methods to interact with docx documents.
Since:
1.6.5
Version:
${version}
Author:
Joseph Verron
  • Constructor Details

  • Method Details

    • stampAndLoad

      public org.docx4j.openpackaging.packages.WordprocessingMLPackage stampAndLoad(InputStream template, T context) throws IOException, org.docx4j.openpackaging.exceptions.Docx4JException
      Stamps the given template resolving the expressions within the template against the specified context. Returns the resulting document after it has been saved and loaded again to ensure that changes in the DOCX4J object structure were really transported into the XML of the .docx file.
      Parameters:
      template - a InputStream object
      context - a T object
      Returns:
      a WordprocessingMLPackage object
      Throws:
      IOException - if any.
      org.docx4j.openpackaging.exceptions.Docx4JException - if any.
      Since:
      1.6.6
    • stampAndLoadAndExtract

      public String stampAndLoadAndExtract(InputStream template, T context)

      stampAndLoadAndExtract.

      Parameters:
      template - a InputStream object
      context - a T object
      Returns:
      a List object
      Since:
      1.6.6