public class DocumentAssembler
extends java.lang.Object
Constructor and Description |
---|
DocumentAssembler()
Initializes a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
boolean |
assembleDocument(java.io.InputStream sourceStream,
java.io.OutputStream targetStream,
DataSourceInfo... dataSourceInfos)
Loads a template document from the specified source stream, populates the template document with data from the specified single or multiple sources, and stores the result document to the target stream using default
LoadSaveOptions . |
boolean |
assembleDocument(java.io.InputStream sourceStream,
java.io.OutputStream targetStream,
LoadSaveOptions loadSaveOptions,
DataSourceInfo... dataSourceInfos)
Loads a template document from the specified source stream, populates the template document with data from the specified single or multiple sources, and stores the result document to the target stream using the given
LoadSaveOptions . |
boolean |
assembleDocument(java.lang.String sourcePath,
java.lang.String targetPath,
DataSourceInfo... dataSourceInfos)
Loads a template document from the specified source path, populates the template document with data from the specified single or multiple sources, and stores the result document to the target path using default
LoadSaveOptions . |
boolean |
assembleDocument(java.lang.String sourcePath,
java.lang.String targetPath,
LoadSaveOptions loadSaveOptions,
DataSourceInfo... dataSourceInfos)
Loads a template document from the specified source path, populates the template document with data from the specified single or multiple sources, and stores the result document to the target path using the given
LoadSaveOptions . |
BarcodeSettings |
getBarcodeSettings()
Gets a set of settings controlling barcode generation while assembling a document.
|
KnownTypeSet |
getKnownTypes()
Gets an unordered set (that is, a collection of unique items) containing
Class objects which fully or partially qualified names can be used within document templates processed by this assembler instance to invoke the corresponding types' static members, perform type casts, etc. |
int |
getOptions()
Gets a set of flags controlling behavior of this
DocumentAssembler instance while assembling a document. |
static boolean |
getUseReflectionOptimization()
Gets a value indicating whether invocations of custom type members performed via reflection API are optimized using dynamic class generation or not.
|
void |
setOptions(int value)
Sets a set of flags controlling behavior of this
DocumentAssembler instance while assembling a document. |
static void |
setUseReflectionOptimization(boolean value)
Sets a value indicating whether invocations of custom type members performed via reflection API are optimized using dynamic class generation or not.
|
public DocumentAssembler()
public boolean assembleDocument(java.lang.String sourcePath, java.lang.String targetPath, DataSourceInfo... dataSourceInfos) throws java.lang.Exception
LoadSaveOptions
.sourcePath
- The path to a template document to be populated with data.targetPath
- The path to a result document.dataSourceInfos
- Provides information on data source objects to be used.getOptions()
/ setOptions(int)
property includes the DocumentAssemblyOptions.INLINE_ERROR_MESSAGES
option.java.lang.Exception
public boolean assembleDocument(java.lang.String sourcePath, java.lang.String targetPath, LoadSaveOptions loadSaveOptions, DataSourceInfo... dataSourceInfos) throws java.lang.Exception
LoadSaveOptions
.sourcePath
- The path to a template document to be populated with data.targetPath
- The path to a result document.loadSaveOptions
- Specifies additional options for document loading and saving.dataSourceInfos
- Provides information on data source objects to be used.getOptions()
/ setOptions(int)
property includes the DocumentAssemblyOptions.INLINE_ERROR_MESSAGES
option.java.lang.Exception
public boolean assembleDocument(java.io.InputStream sourceStream, java.io.OutputStream targetStream, DataSourceInfo... dataSourceInfos) throws java.lang.Exception
LoadSaveOptions
.sourceStream
- The stream to read a template document from.targetStream
- The stream to write a result document.dataSourceInfos
- Provides information on data source objects to be used.getOptions()
/ setOptions(int)
property includes the DocumentAssemblyOptions.INLINE_ERROR_MESSAGES
option.java.lang.Exception
public boolean assembleDocument(java.io.InputStream sourceStream, java.io.OutputStream targetStream, LoadSaveOptions loadSaveOptions, DataSourceInfo... dataSourceInfos) throws java.lang.Exception
LoadSaveOptions
.sourceStream
- The stream to read a template document from.targetStream
- The stream to write a result document.loadSaveOptions
- Specifies additional options for document loading and saving.dataSourceInfos
- Provides information on data source objects to be used.getOptions()
/ setOptions(int)
property includes the DocumentAssemblyOptions.INLINE_ERROR_MESSAGES
option.java.lang.Exception
public int getOptions()
DocumentAssembler
instance while assembling a document.DocumentAssembler
instance while assembling a document. The returned value is a bitwise combination of DocumentAssemblyOptions
constants.public void setOptions(int value)
DocumentAssembler
instance while assembling a document.value
- A set of flags controlling behavior of this DocumentAssembler
instance while assembling a document. The value must be a bitwise combination of DocumentAssemblyOptions
constants.public BarcodeSettings getBarcodeSettings()
public KnownTypeSet getKnownTypes()
Class
objects which fully or partially qualified names can be used within document templates processed by this assembler instance to invoke the corresponding types' static members, perform type casts, etc.Class
objects which fully or partially qualified names can be used within document templates processed by this assembler instance to invoke the corresponding types' static members, perform type casts, etc.public static boolean getUseReflectionOptimization()
public static void setUseReflectionOptimization(boolean value)
value
- A value indicating whether invocations of custom type members performed via reflection API are optimized using dynamic class generation or not.