public abstract class ProcessReport extends java.lang.Object implements ProcessReportAPI
Modifier and Type | Class and Description |
---|---|
static class |
ProcessReport.CleanDatasource
This is not part of the public interface.
|
static class |
ProcessReport.DrillDownTemplate
This is not part of the public interface.
|
static class |
ProcessReport.PhoneHomeStats |
Modifier and Type | Field and Description |
---|---|
static int |
NUM_HOURS_BETWEEN_LICENSE_CHECK_INS
This is how many hours to wait before renewing a license by querying the license server.
|
static int |
NUM_HOURS_BETWEEN_LICENSE_CHECK_INS_PREV_FAILED
This is how many hours to wait before renewing a license by querying the license server if the previous check
failed.
|
static int |
TEMPLATE_TYPE_DOCM
The template is a Word 2007 DOCM file.
|
static int |
TEMPLATE_TYPE_DOCX
The template is a Word 2007 DOCX file.
|
static int |
TEMPLATE_TYPE_HTML
The template is an HTML fragment...
|
static int |
TEMPLATE_TYPE_PPTM
The template is a Powerpoint Presentation PPTM file.
|
static int |
TEMPLATE_TYPE_PPTX
The template is a Powerpoint Presentation PPTX file.
|
static int |
TEMPLATE_TYPE_UNKNOWN |
static int |
TEMPLATE_TYPE_XLSM
The template is an Excel 2007 Macro enabled XLSM file.
|
static int |
TEMPLATE_TYPE_XLSX
The template is an Excel 2007 XLSX file.
|
CHARSET_DEFAULT, CHARSET_RTF, CHARSET_UNICODE, COPY_METADATA_ALWAYS, COPY_METADATA_IF_NO_DATASOURCE, COPY_METADATA_NEVER, DATA_MODE_ALL_ATTRIBUTES, DATA_MODE_DATA, DATA_MODE_EMBED, DATA_MODE_INCLUDE_BITMAPS, DATA_MODE_SELECT, ERROR_HANDLING_ALL, ERROR_HANDLING_NONE, ERROR_HANDLING_ONLY, ERROR_HANDLING_TRACK_ERRORS, ERROR_HANDLING_VERIFY, HIDDEN_IGNORE_PRINT_RANGE, HIDDEN_SHOW_ALL_ROWS_COLUMNS, HIDDEN_SHOW_HIDDEN_SHEETS, HIDDEN_SHOW_NO_PRINT, HYPHENATE_OFF, HYPHENATE_ON, HYPHENATE_TEMPLATE, LOCALE_DEFAULT, LOCALE_SYSTEM, MODE_PROCESS_EMBEDDED_ALWAYS, MODE_PROCESS_EMBEDDED_COPY, MODE_PROCESS_EMBEDDED_DROP, MODE_PROCESS_EMBEDDED_IF_DATA_APPLIED, MODE_PROCESS_EMBEDDED_KEEP_ORIGINAL_SCREENSHOT, RENDER_EXTENT_ALL, RENDER_EXTENT_CROP_EVERYTHING, RENDER_EXTENT_CROP_HEADER_AND_FOOTER, RENDER_EXTENT_CROP_MARGINS, RENDER_EXTENT_CROP_TO_CONTENT, TAG_STYLE_FIELD, TAG_STYLE_FIELD_2007, TAG_STYLE_TEXT, TYP_CSV, TYP_DOCX, TYP_HTML, TYP_IMAGE, TYP_PDF, TYP_PPTX, TYP_PRINTER, TYP_PS, TYP_RTF, TYP_TXT, TYP_XLSX
Constructor and Description |
---|
ProcessReport(DataSourceProvider data,
java.io.InputStream template,
java.io.OutputStream report)
Create a ProcessReport object with the passed in template & data streams, writing it to
the passed in report stream.
|
ProcessReport(java.io.InputStream templateStream)
Create a ProcessReport object with the passed in template.
|
ProcessReport(java.io.InputStream xmlData,
java.io.InputStream templateStream,
java.io.OutputStream report)
Create a ProcessReport object with the passed in template & data streams, writing it to
the passed in report stream.
|
ProcessReport(java.io.InputStream templateStream,
java.io.OutputStream report)
Create a ProcessReport object with the passed in template, writing it to the passed in report stream.
|
ProcessReport(ProcessReport src)
Do not use!!! Not part of the public API.
|
ProcessReport(ProcessReport src,
java.io.OutputStream out)
Creates and returns a copy of this object.
|
Modifier and Type | Method and Description |
---|---|
void |
abort()
Call to abort the report processing.
|
void |
addImportInfo(java.util.List<ImportInfo> importInfo)
This is not part of the public API - do not use.
|
java.lang.String |
adjustFontName(DocHeader hdr,
java.lang.String font)
Return the font name.
|
int |
adjustFontSize(int size)
Return the font size.
|
static void |
applyLicenseKey(java.lang.String key)
Set the license key in the properties file.
|
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> parameters)
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 |
checkTimeout()
This is NOT part of the public API.
|
static void |
clean(java.io.InputStream template,
java.io.OutputStream cleanedStream,
int cleanedType,
boolean removeUnused,
int tagStyle,
ProcessReport.CleanDatasource[] datasources,
int paramMode,
int templateVersion)
Clean the requested template.
|
static void |
clean(java.io.InputStream template,
java.io.OutputStream cleanedStream,
int cleanedType,
boolean removeUnused,
int tagStyle,
ProcessReport.CleanDatasource[] datasources,
int paramMode,
int templateVersion,
boolean fixExpressions)
Clean the requested template.
|
static void |
clean(java.io.InputStream template,
java.io.OutputStream cleanedStream,
int cleanedType,
boolean removeUnused,
int tagStyle,
ProcessReport.CleanDatasource[] datasources,
int paramMode,
int templateVersion,
boolean fixExpressions,
java.lang.String license)
Clean the requested template.
|
void |
cleanSelects(ProcessReport.CleanDatasource[] arrDatasources,
int mode)
This is not part of the official API - do not use this.
|
void |
cleanSelects(ProcessReport.CleanDatasource[] arrDatasources,
int mode,
boolean fixExpressions)
This is not part of the official API - do not use this.
|
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.
|
java.util.List<java.lang.String> |
findPodsUsed()
Deprecated.
POD update is being replaced by template PODs.
|
java.lang.String |
getBaseDirectory()
Get the base directory used for imported files that have a relative path.
|
int |
getCharset()
Html and txt files are generated using a charset (the rest use unicode).
|
ChartProvider |
getChartProvider()
Returns the chart provider used for this process.
|
int |
getChartRenderType()
What HtmlImage.BITMAP_* type to render charts at for this ReportType.
|
java.lang.String |
getCompany()
The company this copy is licensed to.
|
int |
getCopyMetadata()
Get if the Windward metadata will be copied to the generated report.
|
int |
getDataMode()
Get the embed data setting.
|
java.io.OutputStream |
getDataStream()
As the report is run, the data for each tag can also be placed in an associated data.xml file.
|
net.windward.xmlreport.ProcessReport.DataWriter |
getDataWriter()
This is not part of the official API.
|
IDebugHandler |
getDebugHandler()
The debug handler assigned to this report if debugging.
|
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()
If the error handling is on, call this to obtain information on issues that were encountered during a 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 |
getMaxReportPages() |
int |
getModeProcessEmbedded()
What to do processing embedded objects (only if embedded object is a DOCX, XLSX, or PPTX).
|
int |
getNumPages()
Returns how many pages long a report is.
|
IOutputBuilderEngine |
getOutputBuilder()
Get the output builder in use.
|
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 parameters used when processing the datasource.
|
ReportProperties |
getProperties()
This is required for the .NET engine as its properties object is
a reference to underlying Java's one.
|
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.
|
java.lang.String |
getSubject()
Get the subject of the document.
|
static void |
getTagTree(java.io.InputStream file,
java.io.OutputStream tagTree,
java.lang.String license)
Create an XML file of the tags in the template.
|
static TemplateInfo |
getTemplateMetrics(java.io.InputStream file)
Returns information about all vars, datasources, and tags referenced in the template.
|
static TemplateInfo |
getTemplateMetrics(java.io.InputStream file,
boolean quiet)
Returns information about all vars, datasources, and tags referenced in the template.
|
static TemplateInfo |
getTemplateMetrics(java.io.InputStream file,
boolean quiet,
boolean ignoreTags) |
static TemplateInfo |
getTemplateMetrics(java.io.InputStream file,
boolean quiet,
boolean ignoreTags,
java.lang.String license)
Get the metrics embedded in the passed in template.
|
java.lang.String |
getTemplateTypeString()
The extension of the template.
|
int |
getTemplateVersion()
Set the verion 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.
|
static java.lang.String |
getVersion()
The version of Windward Reports.
|
static int |
getVersionMajor()
The major version number of Windward Reports.
|
static int |
getVersionMinor()
The minor version number of Windward Reports.
|
static int |
getVersionRelease()
The release version number of Windward Reports.
|
int |
getWriteTags()
Get the style unprocessed tags are written out as.
|
boolean |
hasDatasourcesApplied()
true if datasources have been applied to this report.
|
boolean |
hasProcessedTags()
true if tags were processed generating the report.
|
static void |
init()
This method should be called before any other code anywhere in Windward Reports.
|
boolean |
isDebugMode()
Deprecated.
Use TrackErrors instead.
|
boolean |
isIgnoreTags()
Deprecated.
This is being removed in the next version.
|
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()
Deprecated.
Use the import tag or new Template PODs instead of POD framing.
|
boolean |
isRemoveUnusedFormats()
True to remove all unused formatting information from the template when rendering the report.
|
boolean |
isReportTypeDocx()
True if the output report is a Word DOCX or DOCM file.
|
boolean |
isReportTypeExcel()
True if the output report is an Excel file.
|
boolean |
isReportTypeOpenXml()
true if the report type is DOCX, PPTX, or XLSX.
|
boolean |
isReportTypePpt()
True if the output report is a PowerPoint file.
|
boolean |
isReportTypeWord()
True if the output report is a Word file, including Rtf.
|
boolean |
isSameOpenXml()
true if the template and report output are the same OpenXML format.
|
boolean |
isTemplateTypeDOCX()
true if the template is a DOCX.
|
boolean |
isTemplateTypeEqualsReportType()
true if the template type and output type are the same and both are OpenXML.
|
boolean |
isTemplateTypeOpenXml()
true if the template is a DOCX, XLSX, or PPTX.
|
boolean |
isTemplateTypePPTX()
true if the template is a PPTX.
|
boolean |
isTemplateTypeXLSX()
true if the template is a XLSX.
|
boolean |
isTrackImports()
True if you want to call getImports after processing datasources.
|
boolean |
isUseExternalOutputBuilder()
Returns true if it will use the external output builder.
|
Document |
loadTemplate(java.io.InputStream file,
int type,
DocHeader hdr,
DocBody parentDoc,
boolean removeUnusedFormats,
java.lang.String encoding,
java.lang.String[] importStack,
boolean fromTag)
This is not part of the official API.
|
byte[] |
mergePodItemStyles(byte[] podItemData,
boolean usePodStyles)
Deprecated.
POD update is being replaced by template PODs.
|
boolean |
performLayout()
Returns true if the report will be laid out in processComplete().
|
void |
process()
Create a report from the input streams, writing it to the output (report) stream.
|
long |
processComplete()
Process the final report and create the output.
|
long |
processComplete(boolean batchMode)
Process the final report and create the output.
|
void |
processData(DataSourceProvider datasourceProvider,
java.lang.String datasourceName)
Process a set of data for the report.
|
void |
processData(java.util.Map<java.lang.String,DataSourceProvider> dataProviders)
Processes 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)
This method exists for unit tests only - do not call!
|
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 rest use unicode).
|
void |
setCopyMetadata(int copy)
Set if the Windward metadata will be copied to the generated report.
|
void |
setDataMode(int mode)
Set the embed data setting.
|
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 |
setDebugHandler(IDebugHandler debugHandler)
The debug handler assigned to this report if debugging.
|
void |
setDebugMode(boolean debugOn)
Deprecated.
Use TrackErrors instead.
|
void |
setDescription(java.lang.String description)
Set the description of the document.
|
void |
setDrillDownInfo(ProcessReport.DrillDownTemplate drillDownInfo)
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 |
setIgnoreTags(boolean ignore)
Deprecated.
This is being removed in the next version.
|
void |
setKeywords(java.lang.String docKeywords)
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 |
setLicense(java.lang.String license)
Sets the license key for windward to use for this report.
|
void |
setLocale(java.util.Locale locale)
This call set's the locale used in creating a report.
|
void |
setModeProcessEmbedded(int modeProcessEmbedded)
What to do processing embedded objects (only if embedded object is a DOCX, XLSX, or PPTX).
|
void |
setOutputBuilder(IOutputBuilderEngine outputBuilder)
Set the output builder.
|
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)
Set the parameters used when processing the datasources.
|
void |
setPreservePodFraming(boolean preserve)
Deprecated.
Use the import tag or new Template PODs instead of POD framing.
|
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 docSubject)
Set the subject of the document.
|
void |
setTemplateVersion(int version)
Set the verion 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 docTitle)
Set the title of the document.
|
void |
setTrackErrors(int flag)
Turn on/off the error handling functionality.
|
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.
|
static void |
shutdown()
Releases all resources held by Windward Reports.
|
static void |
statBanner() |
static void |
statLine(java.lang.String msg,
boolean logIt) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
duplicate, getReportType, getReportTypeString
public static final int NUM_HOURS_BETWEEN_LICENSE_CHECK_INS
public static final int NUM_HOURS_BETWEEN_LICENSE_CHECK_INS_PREV_FAILED
public static final int TEMPLATE_TYPE_UNKNOWN
public static final int TEMPLATE_TYPE_HTML
public static final int TEMPLATE_TYPE_DOCX
public static final int TEMPLATE_TYPE_XLSX
public static final int TEMPLATE_TYPE_PPTX
public static final int TEMPLATE_TYPE_XLSM
public static final int TEMPLATE_TYPE_DOCM
public static final int TEMPLATE_TYPE_PPTM
public ProcessReport(java.io.InputStream templateStream) throws LicenseException, SetupException
Do not pass in buffered streams if you have the option. ProcessReport wraps all streams in buffers, generally BufferedReader and BufferedWriter.
templateStream
- The report template.LicenseException
- thrown if the license check fails. The message will list the license check that failed.SetupException
public ProcessReport(java.io.InputStream templateStream, java.io.OutputStream report) throws LicenseException, SetupException
Do not pass in buffered streams if you have the option. ProcessReport wraps all streams in buffers, generally BufferedReader and BufferedWriter.
templateStream
- The report template.report
- The stream to write the report to.LicenseException
- thrown if the license check fails. The message will list the license check that failed.SetupException
public ProcessReport(java.io.InputStream xmlData, java.io.InputStream templateStream, java.io.OutputStream report) throws DataConnectionException, LicenseException, SetupException
Do not pass in buffered streams if you have the option. ProcessReport wraps all streams in buffers, generally BufferedReader and BufferedWriter.
xmlData
- The xml data that will be placed into the report where there are xml elements.templateStream
- The report template.report
- The stream to write the report to.DataConnectionException
- thrown if there is a problem with the datasource.LicenseException
- thrown if the license check fails. The message will list the license check that failed.SetupException
public ProcessReport(DataSourceProvider data, java.io.InputStream template, java.io.OutputStream report) throws LicenseException, SetupException
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.template
- The report template.report
- The stream to write the report to.LicenseException
- thrown if the license check fails. The message will list the license check that failed.SetupException
public ProcessReport(ProcessReport src, java.io.OutputStream out) throws AlreadyProcessedException, LicenseException, SetupException
src
- The ProcessReport object to copy.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 the license check fails. The message will list the license check that failed.SetupException
public ProcessReport(ProcessReport src) throws LicenseException
src
- The ProcessReport object to copy.LicenseException
- thrown if the license check fails. The message will list the license check that failed.public static int getVersionMajor()
public static int getVersionMinor()
public static int getVersionRelease()
public static java.lang.String getVersion()
public java.lang.String getCompany()
public int getMaxReportPages()
public int getWriteTags()
getWriteTags
in interface ProcessReportAPIBase
public void setWriteTags(int tagStyle)
setWriteTags
in interface ProcessReportAPIBase
tagStyle
- the style unprocessed tags are written out as.public void setTemplateVersion(int version)
setTemplateVersion
in interface ProcessReportAPIBase
version
- The major version number the report was created in.public int getTemplateVersion()
getTemplateVersion
in interface ProcessReportAPIBase
public boolean isPreservePodFraming()
isPreservePodFraming
in interface ProcessReportAPIBase
public void setPreservePodFraming(boolean preserve)
setPreservePodFraming
in interface ProcessReportAPIBase
preserve
- true if Pod framing should be preserved for Pods in the document.public boolean isTrackImports()
isTrackImports
in interface ProcessReportAPIBase
public void setTrackImports(boolean trackImports)
setTrackImports
in interface ProcessReportAPIBase
trackImports
- True if you want to call getImports after processing datasources.public void setRemoveUnusedFormats(boolean remove)
setRemoveUnusedFormats
in interface ProcessReportAPIBase
remove
- true if removing all unused formatting in the generated report.public boolean isRemoveUnusedFormats()
isRemoveUnusedFormats
in interface ProcessReportAPIBase
public void setTimeout(int seconds)
setTimeout
in interface ProcessReportAPIBase
seconds
- The number of seconds to timeout report generation at. 0 for no timeout.public int getTimeout()
getTimeout
in interface ProcessReportAPIBase
public void abort()
public int getCopyMetadata()
getCopyMetadata
in interface ProcessReportAPIBase
public void setCopyMetadata(int copy)
setCopyMetadata
in interface ProcessReportAPIBase
copy
- one of the COPY_* static ints.public int getHyphenate()
getHyphenate
in interface ProcessReportAPIBase
public void setHyphenate(int mode)
setHyphenate
in interface ProcessReportAPIBase
mode
- One of the ProcessReportAPI.HYPHENATE_* constants.public boolean performLayout()
public boolean isLayoutDocument()
isLayoutDocument
in interface ProcessReportAPIBase
public void setLayoutDocument(boolean layoutDocument)
setLayoutDocument
in interface ProcessReportAPIBase
layoutDocument
- true if the document is laid out, false if that step is skipped. Default is true.public int getHiddenMode()
getHiddenMode
in interface ProcessReportAPIBase
public void setHiddenMode(int mode)
setHiddenMode
in interface ProcessReportAPIBase
mode
- The mode for handling hidden objecxts in the template.public boolean isUseExternalOutputBuilder()
isUseExternalOutputBuilder
in interface ProcessReportAPIBase
public void setUseExternalOutputBuilder(boolean useExternalOutputBuilder)
setUseExternalOutputBuilder
in interface ProcessReportAPIBase
useExternalOutputBuilder
- true if it will use the external output builder.public java.lang.Object getOutputBuilderData()
getOutputBuilderData
in interface ProcessReportAPIBase
public void setOutputBuilderData(java.lang.Object outputBuilderData)
setOutputBuilderData
in interface ProcessReportAPIBase
public int getDataMode()
getDataMode
in interface ProcessReportAPIBase
public void setDataMode(int mode)
setDataMode
in interface ProcessReportAPIBase
mode
- the embed data setting. Uses flags of EMBED_* constant ints.public java.io.OutputStream getDataStream() throws java.io.IOException, AlreadyProcessedException
getDataStream
in interface ProcessReportAPIBase
java.io.IOException
AlreadyProcessedException
public void setDataStream(java.io.OutputStream stream)
setDataStream
in interface ProcessReportAPIBase
stream
- The stream to write the data.xml file to.public net.windward.xmlreport.ProcessReport.DataWriter getDataWriter()
public boolean isIgnoreTags()
public void setIgnoreTags(boolean ignore)
ignore
- True if Windward tags should be ignored and treated as a normal part of the document.public static void shutdown()
public static void init() throws LicenseException, SetupException
LicenseException
- thrown if the license check fails. The message will list the license check that failed.SetupException
public static void statLine(java.lang.String msg, boolean logIt)
public static void statBanner()
public static void applyLicenseKey(java.lang.String key)
key
- base-64 license keypublic void setLicense(java.lang.String license)
setLicense
in interface ProcessReportAPIBase
public void setOutputBuilder(IOutputBuilderEngine outputBuilder)
ProcessReportAPIBase
setOutputBuilder
in interface ProcessReportAPIBase
outputBuilder
- The output builder to use.public IOutputBuilderEngine getOutputBuilder()
ProcessReportAPIBase
getOutputBuilder
in interface ProcessReportAPIBase
public boolean isReportTypeExcel()
isReportTypeExcel
in interface ProcessReportAPIBase
public boolean isReportTypeWord()
isReportTypeWord
in interface ProcessReportAPIBase
public boolean isReportTypeDocx()
public boolean isReportTypePpt()
public boolean isReportTypeOpenXml()
public boolean isSameOpenXml()
public boolean isTemplateTypeOpenXml()
public boolean isTemplateTypeDOCX()
public boolean isTemplateTypePPTX()
public boolean isTemplateTypeXLSX()
public boolean isTemplateTypeEqualsReportType()
public java.lang.String getTemplateTypeString()
public int getChartRenderType()
public int getRenderExtent()
getRenderExtent
in interface ProcessReportAPIBase
public void setRenderExtent(int extent)
setRenderExtent
in interface ProcessReportAPIBase
extent
- a (combination of) ProcessReportAPI.RENDER_EXTENT_* flags.public java.lang.String getRenderPages()
getRenderPages
in interface ProcessReportAPIBase
public void setRenderPages(java.lang.String pages)
setRenderPages
in interface ProcessReportAPIBase
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.public void setCharset(int num)
setCharset
in interface ProcessReportAPIBase
num
- The charset to use when generating an html or txt report.public int getCharset()
getCharset
in interface ProcessReportAPIBase
public void setLocale(java.util.Locale locale)
setLocale
in interface ProcessReportAPIBase
locale
- The locale to use when generating a report.public java.util.Locale getLocale()
getLocale
in interface ProcessReportAPIBase
public void setDescription(java.lang.String description)
setDescription
in interface ProcessReportAPIBase
description
- The value of the description.public java.lang.String getDescription()
getDescription
in interface ProcessReportAPIBase
public void setTitle(java.lang.String docTitle)
setTitle
in interface ProcessReportAPIBase
docTitle
- The value of the title.public java.lang.String getTitle()
getTitle
in interface ProcessReportAPIBase
public void setSubject(java.lang.String docSubject)
setSubject
in interface ProcessReportAPIBase
docSubject
- The value of the subject.public java.lang.String getSubject()
getSubject
in interface ProcessReportAPIBase
public void setKeywords(java.lang.String docKeywords)
setKeywords
in interface ProcessReportAPIBase
docKeywords
- The value of the keywords.public java.lang.String getKeywords()
getKeywords
in interface ProcessReportAPIBase
public boolean isPageBasedReport()
isPageBasedReport
in interface ProcessReportAPIBase
public void setDebugMode(boolean debugOn)
setDebugMode
in interface ProcessReportAPIBase
debugOn
- Set to true to set debug mode on.public boolean isDebugMode()
isDebugMode
in interface ProcessReportAPIBase
public void setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
setParameters
in interface ProcessReportAPIBase
parameters
- The map of parameter pairs.public java.util.Map<java.lang.String,java.lang.Object> getParameters()
getParameters
in interface ProcessReportAPIBase
public void setBaseDirectory(java.lang.String directory)
setBaseDirectory
in interface ProcessReportAPIBase
directory
- The base directory. Does not need to have a final /.public java.lang.String getBaseDirectory()
getBaseDirectory
in interface ProcessReportAPIBase
public void setDrillDownInfo(ProcessReport.DrillDownTemplate drillDownInfo)
setDrillDownInfo
in interface ProcessReportAPIBase
drillDownInfo
- The template info.public ProcessReport.DrillDownTemplate getDrillDownInfo()
getDrillDownInfo
in interface ProcessReportAPIBase
public int getNumPages()
getNumPages
in interface ProcessReportAPIBase
public boolean hasProcessedTags()
hasProcessedTags
in interface ProcessReportAPIBase
public int getModeProcessEmbedded()
getModeProcessEmbedded
in interface ProcessReportAPIBase
public void setModeProcessEmbedded(int modeProcessEmbedded)
setModeProcessEmbedded
in interface ProcessReportAPIBase
modeProcessEmbedded
- One of the MODE_PROCESS_EMBEDED_* constants.public boolean hasDatasourcesApplied()
public void processSetup() throws AlreadyProcessedException, TemplateParseException, java.io.IOException, TagException, DataSourceException, LicenseException, OutputLimitationException
processSetup
in interface ProcessReportAPIBase
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
public void processSetup(int inputType) throws AlreadyProcessedException, TemplateParseException, java.io.IOException, TagException, DataSourceException, LicenseException, OutputLimitationException
processSetup
in interface ProcessReportAPIBase
inputType
- The format of the input template. Use one of the INPUT_FILE_TYPE_* integers.AlreadyProcessedException
- thrown if call process multiple times on an object.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.LicenseException
- thrown if called too often for the license type.TemplateParseException
OutputLimitationException
public void checkTimeout()
public ChartProvider getChartProvider()
public Document loadTemplate(java.io.InputStream file, int type, DocHeader hdr, DocBody parentDoc, boolean removeUnusedFormats, java.lang.String encoding, java.lang.String[] importStack, boolean fromTag) throws java.io.IOException, TemplateParseException, TagException, DataSourceException, OutputLimitationException
file
- The stream to read the template from.type
- Use one of the INPUT_FILE_TYPE_* static ints.hdr
- The header of the body this is being inserted into. Null if the main template.parentDoc
- The body this is being inserted into. Null if the main template.removeUnusedFormats
- true to remove unused formats from the returned template.encoding
- The encoding in palce for this template.importStack
- The import stack if this is for an importjava.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.DataSourceException
- thrown if there is a problem with the datasource.TemplateParseException
OutputLimitationException
public static TemplateInfo getTemplateMetrics(java.io.InputStream file) throws SetupException, TemplateParseException, DataSourceException, java.io.IOException, TagException, AlreadyProcessedException, OutputLimitationException, TinyException
file
- The stream to read the template from.AlreadyProcessedException
- thrown if setup not called or complete called.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.SetupException
TemplateParseException
OutputLimitationException
TinyException
public static TemplateInfo getTemplateMetrics(java.io.InputStream file, boolean quiet, boolean ignoreTags) throws SetupException, TemplateParseException, DataSourceException, java.io.IOException, TagException, AlreadyProcessedException, OutputLimitationException, TinyException
SetupException
TemplateParseException
DataSourceException
java.io.IOException
TagException
AlreadyProcessedException
OutputLimitationException
TinyException
public static TemplateInfo getTemplateMetrics(java.io.InputStream file, boolean quiet, boolean ignoreTags, java.lang.String license) throws SetupException, TemplateParseException, DataSourceException, java.io.IOException, TagException, AlreadyProcessedException, OutputLimitationException, TinyException
file
- The template to scan.ignoreTags
- true to not look at tags for needed ${vars}.license
- Optionally pass in a license to use for this call.SetupException
TemplateParseException
DataSourceException
java.io.IOException
TagException
AlreadyProcessedException
OutputLimitationException
TinyException
public static void getTagTree(java.io.InputStream file, java.io.OutputStream tagTree, java.lang.String license) throws SetupException, TemplateParseException, DataSourceException, java.io.IOException, TagException, AlreadyProcessedException, OutputLimitationException, TinyException
file
- The template to scan.tagTree
- Write the xml file to this stream.license
- Optionally pass in a license to use.SetupException
TemplateParseException
DataSourceException
java.io.IOException
TagException
AlreadyProcessedException
OutputLimitationException
TinyException
public static TemplateInfo getTemplateMetrics(java.io.InputStream file, boolean quiet) throws SetupException, TemplateParseException, DataSourceException, java.io.IOException, TagException, AlreadyProcessedException, OutputLimitationException, TinyException
file
- The stream to read the template from.AlreadyProcessedException
- thrown if setup not called or complete called.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.SetupException
TemplateParseException
OutputLimitationException
TinyException
public static void clean(java.io.InputStream template, java.io.OutputStream cleanedStream, int cleanedType, boolean removeUnused, int tagStyle, ProcessReport.CleanDatasource[] datasources, int paramMode, int templateVersion) throws SetupException, TemplateParseException, DataSourceException, java.io.IOException, TagException, AlreadyProcessedException, OutputLimitationException, TinyException
template
- The input template stream.cleanedStream
- The stream to write the cleaned template to.cleanedType
- The ProcessReport.TEMPLATE_TYPE_* type for the cleaned template.removeUnused
- true to remove unused styles, fonts, etc.tagStyle
- The style tags are written out as. Is one of the ProcessReport.TAG_STYLE_* values.datasources
- The type of each datasource to be cleaned.paramMode
- The BaseTag.PARAM_MODE_* to convert tags to.templateVersion
- The version the template was created under. -1 for unknown.SetupException
TemplateParseException
DataSourceException
java.io.IOException
TagException
AlreadyProcessedException
OutputLimitationException
TinyException
public static void clean(java.io.InputStream template, java.io.OutputStream cleanedStream, int cleanedType, boolean removeUnused, int tagStyle, ProcessReport.CleanDatasource[] datasources, int paramMode, int templateVersion, boolean fixExpressions) throws SetupException, TemplateParseException, DataSourceException, java.io.IOException, TagException, AlreadyProcessedException, OutputLimitationException, TinyException
template
- The input template stream.cleanedStream
- The stream to write the cleaned template to.cleanedType
- The ProcessReport.TEMPLATE_TYPE_* type for the cleaned template.removeUnused
- true to remove unused styles, fonts, etc.tagStyle
- The style tags are written out as. Is one of the ProcessReport.TAG_STYLE_* values.datasources
- The type of each datasource to be cleaned.paramMode
- The BaseTag.PARAM_MODE_* to convert tags to.templateVersion
- The version the template was created under. -1 for unknown.fixExpressions
- Attempt to fix evaluable expressions.SetupException
TemplateParseException
DataSourceException
java.io.IOException
TagException
AlreadyProcessedException
OutputLimitationException
TinyException
public static void clean(java.io.InputStream template, java.io.OutputStream cleanedStream, int cleanedType, boolean removeUnused, int tagStyle, ProcessReport.CleanDatasource[] datasources, int paramMode, int templateVersion, boolean fixExpressions, java.lang.String license) throws SetupException, TemplateParseException, DataSourceException, java.io.IOException, TagException, AlreadyProcessedException, OutputLimitationException, TinyException
template
- The input template stream.cleanedStream
- The stream to write the cleaned template to.cleanedType
- The ProcessReport.TEMPLATE_TYPE_* type for the cleaned template.removeUnused
- true to remove unused styles, fonts, etc.tagStyle
- The style tags are written out as. Is one of the ProcessReport.TAG_STYLE_* values.datasources
- The type of each datasource to be cleaned.paramMode
- The BaseTag.PARAM_MODE_* to convert tags to.templateVersion
- The version the template was created under. -1 for unknown.fixExpressions
- Attempt to fix evaluable expressions.license
- The license to use for this operation. If null, use the system license.SetupException
TemplateParseException
DataSourceException
java.io.IOException
TagException
AlreadyProcessedException
OutputLimitationException
TinyException
public void buildSchema(java.io.OutputStream xmlSchema) throws java.io.IOException, TagException, AlreadyProcessedException
buildSchema
in interface ProcessReportAPIBase
xmlSchema
- The schema XML file created.AlreadyProcessedException
- thrown if setup not called or complete called.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.public void setEventHandler(WindwardEventHandler eventHandler)
setEventHandler
in interface ProcessReportAPIBase
eventHandler
- The event handler for this report.public WindwardEventHandler getEventHandler()
getEventHandler
in interface ProcessReportAPIBase
public IDebugHandler getDebugHandler()
public void setDebugHandler(IDebugHandler debugHandler)
debugHandler
- The debug handler assigned to this report.public void cleanSelects(ProcessReport.CleanDatasource[] arrDatasources, int mode) throws AlreadyProcessedException
arrDatasources
- The names of the datasources to convert.mode
- The BaseTag.PARAM_MODE_* to convert to.AlreadyProcessedException
public void cleanSelects(ProcessReport.CleanDatasource[] arrDatasources, int mode, boolean fixExpressions) throws AlreadyProcessedException
arrDatasources
- The names of the datasources to convert.mode
- The BaseTag.PARAM_MODE_* to convert to.fixExpressions
- Attempt to fix evaluable expressions.AlreadyProcessedException
public void processData(DataSourceProvider datasourceProvider, java.lang.String datasourceName) 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.
processData
in interface ProcessReportAPIBase
datasourceProvider
- The data that will be placed into the report where there are tags.datasourceName
- 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 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
TinyException
public 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.
processData
in interface ProcessReportAPIBase
dataProviders
- the datasource providers.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
TinyException
public void batchSetup(java.util.Map<java.lang.String,DataSourceProvider> dataProviders, java.lang.String batchForEach, java.util.Map<java.lang.String,java.lang.String> parameters) throws TagException, AlreadyProcessedException, DataSourceException
batchSetup
in interface ProcessReportAPIBase
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.parameters
- 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.TagException
AlreadyProcessedException
DataSourceException
public BatchReport batchNext(java.io.OutputStream report) throws java.io.IOException, TagException, AlreadyProcessedException, DataSourceException, TemplateParseException, OutputLimitationException, TinyException
batchNext
in interface ProcessReportAPIBase
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
public byte[] mergePodItemStyles(byte[] podItemData, boolean usePodStyles) throws java.lang.Exception
java.lang.Exception
public java.util.List<java.lang.String> findPodsUsed() throws DataSourceException, java.io.IOException, TagException, TemplateParseException, OutputLimitationException, TinyException
findPodsUsed
in interface ProcessReportAPIBase
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
public long processComplete() throws java.io.IOException, TagException, AlreadyProcessedException, DataSourceException, LicenseException, OutputLimitationException, TemplateParseException, TinyException
processComplete
in interface ProcessReportAPIBase
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.OutputLimitationException
TemplateParseException
TinyException
public long processComplete(boolean batchMode) throws java.io.IOException, TagException, AlreadyProcessedException, DataSourceException, LicenseException, OutputLimitationException, TemplateParseException, 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.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.OutputLimitationException
TemplateParseException
TinyException
public ImportInfo[] getImportInfo()
getImportInfo
in interface ProcessReportAPIBase
public void addImportInfo(java.util.List<ImportInfo> importInfo)
public void setTrackErrors(int flag)
ProcessReportAPIBase
setTrackErrors
in interface ProcessReportAPIBase
flag
- A flag indicating how the error handling should bahve. It's one of ERROR_HANDLING_* constants
defined in ProcessReportAPI.public ErrorInfo getErrorInfo()
ProcessReportAPIBase
getErrorInfo
in interface ProcessReportAPIBase
public java.io.OutputStream getReport() throws AlreadyProcessedException
getReport
in interface ProcessReportAPIBase
AlreadyProcessedException
- thrown if call the process steps out of order or call ones other than data twice.public void process() throws LicenseException, java.io.IOException, TemplateParseException, java.lang.IllegalArgumentException, TagException, AlreadyProcessedException, DataSourceException, OutputLimitationException, TinyException
process
in interface ProcessReportAPIBase
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.java.lang.IllegalArgumentException
- thrown if come across an unknown element type or an illegal reportType value is used.TemplateParseException
OutputLimitationException
TinyException
public java.lang.String adjustFontName(DocHeader hdr, java.lang.String font)
hdr
- The header holding the font table.font
- The index into the header font table for this font.public int adjustFontSize(int size)
size
- The size of the font in half points.public void close()
close
in interface ProcessReportAPIBase
public ReportProperties getProperties()
ProcessReportAPIBase
getProperties
in interface ProcessReportAPIBase
Copyright © 2002-2021 Windward Studios, LLC. - All Rights Reserved. We are Java document generation software