public interface TemplateGenerator
| Modifier and Type | Method and Description |
|---|---|
File |
createTemplate(Hashtable fieldValues,
Hashtable valuesTable,
Hashtable valuesImages)
Creates an empty template.
|
File |
fillDocument(InputStream input,
String nameFile,
Hashtable fieldValues,
Hashtable valuesTable,
Hashtable valuesImages)
Fills the template
|
File |
fillDocument(InputStream input,
String nameFile,
Hashtable fieldValues,
Hashtable valuesTable,
Hashtable valuesImages,
Hashtable valuesPivotTable) |
File |
fillDocument(String resource,
Hashtable valuesDescriptions,
Hashtable valuesTable,
Hashtable valuesImages)
Fills the specified template
|
File |
fillDocument(String resource,
Hashtable valuesDescriptions,
Hashtable valuesTable,
Hashtable valuesImages,
Hashtable valuesPivotTable) |
List |
queryTemplateFields(File template)
Creates a list with all data fields included in the template
|
List |
queryTemplateFields(String template)
Creates a list with all data fields included in the template
|
void |
setCreateLabelsInTemplate(boolean createLabels) |
void |
setDateFormat(DateFormat df)
Sets the date format to use in the dates of the document
|
void |
setNumberFormat(NumberFormat nf)
Sets the number format to use in the numeric values of the document
|
void |
setShowTemplate(boolean show)
Sets the value of the variable show.
|
File fillDocument(String resource, Hashtable valuesDescriptions, Hashtable valuesTable, Hashtable valuesImages) throws Exception
resource - : Resource where the template is located.valuesDescriptions - Values for the data fieldsvaluesTable - Table valuesvaluesImages - Image valuesExceptionFile fillDocument(String resource, Hashtable valuesDescriptions, Hashtable valuesTable, Hashtable valuesImages, Hashtable valuesPivotTable) throws Exception
ExceptionFile fillDocument(InputStream input, String nameFile, Hashtable fieldValues, Hashtable valuesTable, Hashtable valuesImages) throws Exception
input - : Template to fill.nameFile - : Name used to save the filled templatefieldValues - : This object contains the data field values to insert in the
template. Keys must be the field names and values must have
the data field values to insert.valuesTable - : The object contains the table values to insert in the
template. Each key must be the table entity name and value
must be an EntityResultvaluesImages - : The object contains the image values to insert. Key must be
the image field name and value must be the image data. The
value could be an image object (Image), a BytesBlock or a
File.ExceptionFile fillDocument(InputStream input, String nameFile, Hashtable fieldValues, Hashtable valuesTable, Hashtable valuesImages, Hashtable valuesPivotTable) throws Exception
Exceptionvoid setDateFormat(DateFormat df)
df - Formatvoid setNumberFormat(NumberFormat nf)
nf - void setShowTemplate(boolean show)
show - void setCreateLabelsInTemplate(boolean createLabels)
File createTemplate(Hashtable fieldValues, Hashtable valuesTable, Hashtable valuesImages) throws Exception
fieldValues - : This object contains the data fields attributes and labels
to show in the templatevaluesTable - : The object contains the table information to insert in the
template. This map must have the table entity name as key and
the value must be other Hashtable with the columns attributes
and names to show (column name - column label)valuesImages - : The object contains information about the image fields which
owns the form. This map contains the name of the image field
(value) and its attribute (key)ExceptionList queryTemplateFields(String template) throws Exception
template - Template to queryExceptionCopyright © 2016 Imatia Innovation S.L.. All rights reserved.