java.lang.Object
pro.verron.officestamper.test.TestDocxStamper<T>
Common methods to interact with docx documents.
- Since:
- 1.6.5
- Version:
- ${version}
- Author:
- Joseph Verron
-
Constructor Summary
ConstructorDescriptionConstructor for TestDocxStamper. -
Method Summary
Modifier and TypeMethodDescriptionorg.docx4j.openpackaging.packages.WordprocessingMLPackage
stampAndLoad
(InputStream template, T context) Stamps the given template resolving the expressions within the template against the specified context.stampAndLoadAndExtract
(InputStream template, T context) stampAndLoadAndExtract.
-
Constructor Details
-
TestDocxStamper
Constructor for TestDocxStamper.
- Parameters:
config
- aOfficeStamperConfiguration
object- Since:
- 1.6.6
-
-
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
- aInputStream
objectcontext
- a T object- Returns:
- a
WordprocessingMLPackage
object - Throws:
IOException
- if any.org.docx4j.openpackaging.exceptions.Docx4JException
- if any.- Since:
- 1.6.6
-
stampAndLoadAndExtract
stampAndLoadAndExtract.
- Parameters:
template
- aInputStream
objectcontext
- a T object- Returns:
- a
List
object - Since:
- 1.6.6
-