public interface ProcessReportAPIBase
Modifier and Type | Method and Description |
---|---|
BatchReport |
batchNext(java.io.OutputStream report)
Generates the next document in the batch and returns the results of that document.
|
void |
batchSetup(java.util.Map<java.lang.String,DataSourceProvider> dataProviders,
java.lang.String batchForEach,
java.util.Map<java.lang.String,java.lang.String> batchParameters)
Prepares the object to run batch reports.
|
void |
buildSchema(java.io.OutputStream xmlSchema)
Generates a UDT schema XML files based on the tags in the template.
|
void |
close()
Call when you are done with this object, including done with the OutputStream returned by getReport if that
stream was created by ProcessReport.
|
ProcessReportAPIBase |
duplicate(java.io.OutputStream out)
Creates and returns a copy of this object.
|
java.util.List<java.lang.String> |
findPodsUsed()
Find Pod's being used by a Document.
|
java.lang.String |
getBaseDirectory()
Get the base directory used for imported files that have a relative path.
|
int |
getCharset()
This call set's the locale used in creating a report.
|
int |
getCopyMetadata()
Get if the Windward metadata will be copied to the generated report.
|
int |
getDataMode()
As the report is run, the data for each tag can also be placed in an associated data.xml file.
|
java.io.OutputStream |
getDataStream()
As the report is run, the data for each tag can also be placed in an associated data.xml file.
|
java.lang.String |
getDescription()
Get the description of the document.
|
ProcessReport.DrillDownTemplate |
getDrillDownInfo()
Get the info for the template file this is in.
|
ErrorInfo |
getErrorInfo()
Get an object containing a set of errors encounterred during the report generation.
|
WindwardEventHandler |
getEventHandler()
Get event handler assigned to the report.
|
int |
getHiddenMode()
Get the mode for handling hidden objecxts in the template.
|
int |
getHyphenate()
Get if the generated report will be hyphenated.
|
ImportInfo[] |
getImportInfo()
Get all imports in the processed template.
|
java.lang.String |
getKeywords()
Get the keywords of the document.
|
java.util.Locale |
getLocale()
This call returns the locale used in creating a report.
|
int |
getNumPages()
Returns how many pages long a report is.
|
java.lang.Object |
getOutputBuilderData()
Optional data to pass to the external output builder.
|
java.util.Map<java.lang.String,java.lang.Object> |
getParameters()
Returns the map of parameters for this report.
|
int |
getRenderExtent()
How the generated report will be cropped.
|
java.lang.String |
getRenderPages()
The pages that will be generated.
|
java.io.OutputStream |
getReport()
Return the final report.
|
int |
getReportType()
Get the report format of the output stream.
|
java.lang.String |
getReportTypeString()
Get the report format of the output as a string.
|
java.lang.String |
getSubject()
Get the subject of the document.
|
int |
getTemplateVersion()
Set the version of Windward/AutoTag this template was created for.
|
int |
getTimeout()
Set the number of seconds to timeout generating a report.
|
java.lang.String |
getTitle()
Get the title of the document.
|
int |
getWriteTags()
Get the style unprocessed tags are written out as.
|
boolean |
isCopyEmbeddedObjects()
True if embedded objects are to be copied to output.
|
boolean |
isDebugMode()
Get if debug mode is on or off.
|
boolean |
isLayoutDocument()
If set to false, then for output we do not have to layout (DOCX, XLSX, PPTX, HTML in non-pages mode), the engine
will not perform layout on the generated report.
|
boolean |
isPageBasedReport()
true if the generated report is page based.
|
boolean |
isPreservePodFraming()
True if UDT framing should be preserved for UDTs in the document.
|
boolean |
isRemoveUnusedFormats()
True to remove all unused formatting information from the template when rendering the report.
|
boolean |
isReportTypeExcel()
True if the output report is an Excel file, including CSV.
|
boolean |
isReportTypeWord()
True if the output report is a Word file, including Rtf.
|
boolean |
isTrackImports()
True if you want to call getImports after processing datasources.
|
boolean |
isUseExternalOutputBuilder()
Returns true if it will use the external output builder.
|
void |
process()
Create a report from the input template & datasource(s), writing it to the output (report) stream.
|
long |
processComplete()
Process the final report and create the output.
|
void |
processData(DataSourceProvider data,
java.lang.String datasource)
Process a set of data for the report.
|
void |
processData(java.util.Map<java.lang.String,DataSourceProvider> dataProviders)
Process multiple sets of data for the report.
|
void |
processSetup()
Process the template and get the report ready to process data files.
|
void |
processSetup(int inputType)
Process the template and get the report ready to process data files.
|
void |
setBaseDirectory(java.lang.String directory)
Set the base directory used for imported files that have a relative path.
|
void |
setCharset(int num)
Html and txt files are generated using a charset (the others use unicode).
|
void |
setCopyEmbeddedObjects(boolean copyEmbeddedObjects)
True if embedded objects are to be copied to output.
|
void |
setCopyMetadata(int copy)
Set if the Windward metadata will be copied to the generated report.
|
void |
setDataMode(int mode)
As the report is run, the data for each tag can also be placed in an associated data.xml file.
|
void |
setDataStream(java.io.OutputStream stream)
As the report is run, the data for each tag can also be placed in an associated data.xml file.
|
void |
setDebugMode(boolean debugOn)
Set debug mode on or off.
|
void |
setDescription(java.lang.String description)
Set the description of the document.
|
void |
setDrillDownInfo(ProcessReport.DrillDownTemplate templateInfo)
Set the info for the template file this is in.
|
void |
setEventHandler(WindwardEventHandler eventHandler)
Assign event handler to the report.
|
void |
setHiddenMode(int mode)
Get the mode for handling hidden objecxts in the template.
|
void |
setHyphenate(int mode)
Set if the generated report will be hyphenated.
|
void |
setKeywords(java.lang.String keywords)
Set the keywords of the document.
|
void |
setLayoutDocument(boolean layoutDocument)
If set to false, then for output we do not have to layout (DOCX, XLSX, PPTX, HTML in non-pages mode), the engine
will not perform layout on the generated report.
|
void |
setLocale(java.util.Locale locale)
This call set's the locale used in creating a report.
|
void |
setOutputBuilderData(java.lang.Object outputBuilderData)
Optional data to pass to the external output builder.
|
void |
setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
Adds a map that is used for ${variable} substitution.
|
void |
setPreservePodFraming(boolean preserve)
True if UDT framing should be preserved for UDTs in the document.
|
void |
setRemoveUnusedFormats(boolean remove)
True to remove all unused formatting information from the template when rendering the report.
|
void |
setRenderExtent(int extent)
How the generated report will be cropped.
|
void |
setRenderPages(java.lang.String pages)
The pages that will be generated.
|
void |
setSubject(java.lang.String subject)
Set the subject of the document.
|
void |
setTemplateVersion(int version)
Set the version of Windward/AutoTag this template was created for.
|
void |
setTimeout(int seconds)
Set the number of seconds to timeout generating a report.
|
void |
setTitle(java.lang.String title)
Set the title of the document.
|
void |
setTrackErrors(int flag)
Enable or disable the error handling and verify features.
|
void |
setTrackImports(boolean trackImports)
True if you want to call getImports after processing datasources.
|
void |
setUseExternalOutputBuilder(boolean useExternalOutputBuilder)
Set to true to use the external output builder.
|
void |
setWriteTags(int tagStyle)
Set the style unprocessed tags are written out as.
|
void |
updatePods(UdtUpdate[] udts)
Update the UDTs.
|
int getRenderExtent()
void setRenderExtent(int extent)
extent
- a ProcessReportAPI.RENDER_EXTENT_* value.java.lang.String getRenderPages()
void setRenderPages(java.lang.String pages)
pages
- The pages that will be generated in the form "0, 4, 6-11, 15". Set to null for all pages. Pages
are 0-based.void setCharset(int num)
num
- The charset to use when generating an html or txt report.int getCharset()
void setLocale(java.util.Locale locale)
locale
- The locale to use when generating a report.java.util.Locale getLocale()
int getReportType()
java.lang.String getReportTypeString()
boolean isPageBasedReport()
boolean isReportTypeExcel()
boolean isReportTypeWord()
void setDescription(java.lang.String description)
description
- The value of the description.java.lang.String getDescription()
void setTitle(java.lang.String title)
title
- The value of the title.java.lang.String getTitle()
void setSubject(java.lang.String subject)
subject
- The value of the subject.java.lang.String getSubject()
void setKeywords(java.lang.String keywords)
keywords
- The value of the keywords.java.lang.String getKeywords()
void setDebugMode(boolean debugOn)
debugOn
- Set to true to set debug mode on.boolean isDebugMode()
void setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
These parameters are shared by all datasources. If one datasource adds, removes, or changes a parameter, all other datasources see this change.
This call sets the map so calling it a second time replaces the map passed in the first time. The map is copied so on return changes to the passed in map will not affect the data source.
The values passed in a map must be a String, Number (Integer, Float, etc), Date, or SelectBase derived class.
parameters
- The map of parameter pairs.java.util.Map<java.lang.String,java.lang.Object> getParameters()
These parameters are shared by all datasources. If one datasource adds, removes, or changes a parameter, all other datasources see this change.
void setDrillDownInfo(ProcessReport.DrillDownTemplate templateInfo)
templateInfo
- The template info.ProcessReport.DrillDownTemplate getDrillDownInfo()
void setBaseDirectory(java.lang.String directory)
directory
- The base directory. Does not need to have a final /.java.lang.String getBaseDirectory()
int getWriteTags()
void setWriteTags(int tagStyle)
tagStyle
- the style unprocessed tags are written out as.void setTemplateVersion(int version)
version
- The major version number the report was created in.int getTemplateVersion()
boolean isPreservePodFraming()
void setPreservePodFraming(boolean preserve)
preserve
- true if UDT framing should be preserved for UDTs in the document.boolean isTrackImports()
void setTrackImports(boolean trackImports)
trackImports
- True if you want to call getImports after processing datasources.boolean isRemoveUnusedFormats()
void setRemoveUnusedFormats(boolean remove)
remove
- true if removing all unused formatting in the generated report.void setTimeout(int seconds)
seconds
- The number of seconds to timeout report generation at. 0 for no timeout.int getTimeout()
int getCopyMetadata()
void setCopyMetadata(int copy)
copy
- one of the COPY_* static ints.int getHyphenate()
void setHyphenate(int mode)
mode
- One of the HYPHENATE_* constants.boolean isCopyEmbeddedObjects()
void setCopyEmbeddedObjects(boolean copyEmbeddedObjects)
copyEmbeddedObjects
- true if embedded objects are to be copied to output.int getHiddenMode()
void setHiddenMode(int mode)
mode
- The mode for handling hidden objecxts in the template.int getDataMode()
void setDataMode(int mode)
mode
- the data setting. Uses flags of DATA_MODE_* constant ints.boolean isLayoutDocument()
void setLayoutDocument(boolean layoutDocument)
layoutDocument
- true if the documenty is laid out, false if that step is skipped. Default is true.boolean isUseExternalOutputBuilder()
void setUseExternalOutputBuilder(boolean useExternalOutputBuilder)
useExternalOutputBuilder
- true if it will use the external output builder.java.lang.Object getOutputBuilderData()
void setOutputBuilderData(java.lang.Object outputBuilderData)
java.io.OutputStream getDataStream() throws java.io.IOException, AlreadyProcessedException
java.io.IOException
AlreadyProcessedException
void setDataStream(java.io.OutputStream stream)
stream
- The stream to write the data.xml file to.int getNumPages()
void process() throws LicenseException, java.io.IOException, TemplateParseException, java.lang.IllegalArgumentException, TagException, AlreadyProcessedException, DataSourceException, OutputLimitationException, TinyException
java.io.IOException
- thrown if have problems accessing the xml, template, or report streams.LicenseException
- thrown if called too often for the license type.java.lang.IllegalArgumentException
- thrown if come across an unknown element type or an illegal reportType value is used.TagException
- thrown if there is an unmatched if/while - end. Not thrown in debug mode.AlreadyProcessedException
- thrown if call process multiple times on an object.DataSourceException
- thrown if there is a problem with the datasource.TemplateParseException
OutputLimitationException
TinyException
void processSetup() throws AlreadyProcessedException, TemplateParseException, java.io.IOException, TagException, DataSourceException, LicenseException, OutputLimitationException
java.io.IOException
- thrown if have problems accessing the xml, template, or report streams.LicenseException
- thrown if called too often for the license type.java.lang.IllegalArgumentException
- thrown if come across an unknown element type or an illegal reportType value is used.TagException
- thrown if there is an unmatched if/while - end. Not thrown in debug mode.AlreadyProcessedException
- thrown if call process multiple times on an object.DataSourceException
- thrown if there is a problem with the datasource.TemplateParseException
OutputLimitationException
void processSetup(int inputType) throws AlreadyProcessedException, TemplateParseException, java.io.IOException, TagException, DataSourceException, LicenseException, OutputLimitationException
inputType
- The format of the input template. Use one of the INPUT_FILE_TYPE_* integers.java.io.IOException
- thrown if have problems accessing the xml, template, or report streams.LicenseException
- thrown if called too often for the license type.TagException
- thrown if there is an unmatched if/while - end. Not thrown in debug mode.AlreadyProcessedException
- thrown if call process multiple times on an object.DataSourceException
- thrown if there is a problem with the datasource.TemplateParseException
OutputLimitationException
void setEventHandler(WindwardEventHandler eventHandler)
eventHandler
- The event handler for this report.WindwardEventHandler getEventHandler()
void buildSchema(java.io.OutputStream xmlSchema) throws java.io.IOException, DataSourceException, TagException, AlreadyProcessedException
xmlSchema
- The schema XML file created.AlreadyProcessedException
- thrown if setup not called or complete called.java.io.IOException
- thrown if have problems accessing the datasource, template, or report streams.TagException
- thrown if there is an unmatched if/while - end. Not thrown in debug mode.DataSourceException
- thrown if there is a problem with the datasource.void processData(DataSourceProvider data, java.lang.String datasource) throws java.io.IOException, TagException, AlreadyProcessedException, DataSourceException, TemplateParseException, OutputLimitationException, TinyException
Do not pass in buffered streams if you have the option. ProcessReport wraps all streams in buffers, generally BufferedReader and BufferedWriter.
data
- The data that will be placed into the report where there are tags.datasource
- The name of the datasource to process. Only tags with this datasource will be processed. A
value of "" is legitimate and signifies the default datasource.java.io.IOException
- thrown if have problems accessing the datasource, template, or report streams.TagException
- thrown if there is an unmatched if/while - end. Not thrown in debug mode.AlreadyProcessedException
- thrown if call the process steps out of order or call ones other than data twice.DataSourceException
- thrown if there is a problem with the datasource.TemplateParseException
OutputLimitationException
TinyException
void processData(java.util.Map<java.lang.String,DataSourceProvider> dataProviders) throws java.io.IOException, TagException, AlreadyProcessedException, DataSourceException, TemplateParseException, OutputLimitationException, TinyException
Do not pass in buffered streams if you have the option. ProcessReport wraps all streams in buffers, generally BufferedReader and BufferedWriter.
dataProviders@throws
- IOException thrown if have problems accessing the datasource, template, or report streams.TagException
- thrown if there is an unmatched if/while - end. Not thrown in debug mode.AlreadyProcessedException
- thrown if call the process steps out of order or call ones other than data twice.DataSourceException
- thrown if there is a problem with the datasource.java.io.IOException
TemplateParseException
OutputLimitationException
TinyException
void updatePods(UdtUpdate[] udts) throws DataSourceException, java.io.IOException, TagException, TemplateParseException, OutputLimitationException, TinyException
udts
- The UDTs to update in the template.java.io.IOException
- thrown if have problems accessing the xml, template, or report streams.TagException
- thrown if there is an unmatched if/while - end. Not thrown in debug mode.DataSourceException
- thrown if there is a problem with the datasource.TemplateParseException
OutputLimitationException
TinyException
java.util.List<java.lang.String> findPodsUsed() throws DataSourceException, java.io.IOException, TagException, TemplateParseException, OutputLimitationException, TinyException
java.io.IOException
- thrown if have problems accessing the xml, template, or report streams.TagException
- thrown if there is an unmatched if/while - end. Not thrown in debug mode.DataSourceException
- thrown if there is a problem with the datasource.TemplateParseException
OutputLimitationException
TinyException
long processComplete() throws java.io.IOException, TagException, AlreadyProcessedException, DataSourceException, LicenseException, OutputLimitationException, TemplateParseException, TinyException
java.io.IOException
- thrown if have problems accessing the datasource, template, or report streams.TagException
- thrown if there is an unmatched if/while - end. Not thrown in debug mode.AlreadyProcessedException
- thrown if call the process steps out of order or call ones other than data twice.DataSourceException
- thrown if there is a problem with the datasource.LicenseException
OutputLimitationException
TemplateParseException
TinyException
void batchSetup(java.util.Map<java.lang.String,DataSourceProvider> dataProviders, java.lang.String batchForEach, java.util.Map<java.lang.String,java.lang.String> batchParameters) throws java.io.IOException, TagException, AlreadyProcessedException, DataSourceException, TemplateParseException, OutputLimitationException
dataProviders
- All of the datasources to process. key = the name of the datasource, value = the datasource.batchForEach
- The text of a forEach tag that is the batch query. The datasource for this tag must be in the
dataProviders.batchParameters
- Parameters that may have ${var} parameters in the value part of the entry. This is returned
in each iteration with the ${var} values substituted with the string value of that var. The
key value is ignored by the engine.java.io.IOException
TagException
AlreadyProcessedException
DataSourceException
TemplateParseException
OutputLimitationException
BatchReport batchNext(java.io.OutputStream report) throws java.io.IOException, TagException, AlreadyProcessedException, DataSourceException, TemplateParseException, OutputLimitationException, TinyException
report
- The stream to write the generated report to. If null the engine will create a ByteArrayOutputStream.java.io.IOException
TagException
AlreadyProcessedException
DataSourceException
TemplateParseException
OutputLimitationException
TinyException
ImportInfo[] getImportInfo()
void setTrackErrors(int flag)
By default these features are turned off (disabled).
flag
- A combination of ERROR_HANDLING_ bits.ErrorInfo getErrorInfo()
java.io.OutputStream getReport() throws AlreadyProcessedException
AlreadyProcessedException
- thrown if call the process steps out of order or call ones other than data twice.void close()
ProcessReportAPIBase duplicate(java.io.OutputStream out) throws AlreadyProcessedException, LicenseException, SetupException
out
- The stream to write the report to. If null will create a ByteArrayOutputStream.AlreadyProcessedException
- thrown if call the process steps out of order or call ones other than data twice.LicenseException
- thrown if called too often for the license type.SetupException
Copyright © 2017 Windward Reports - All Rights Reserved. We are java reporting software