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 |
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
Parse the template to determine what format it is.
|
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_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, RENDER_EXTENT_ALL, RENDER_EXTENT_CROP_CONTENT, RENDER_EXTENT_CROP_MARGINS, TAG_STYLE_CONTROL_2007, 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)
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.
|
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.
|
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()
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()
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.
|
static 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()
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.
|
static int |
getMaxReportPages() |
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.
|
java.lang.String |
getSubject()
Get the subject of the document.
|
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) |
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.
|
static void |
init()
This method should be called before any other code anywhere in Windward Reports.
|
boolean |
isCopyEmbeddedObjects()
True if embedded objects are to be copied to output.
|
boolean |
isDebugMode()
Get if debug mode is on or off.
|
boolean |
isIgnoreTags() |
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 Pod framing should be preserved for Pods in the document.
|
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, including CSV.
|
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 |
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)
This is not part of the official API.
|
byte[] |
mergePodItemStyles(byte[] podItemData,
boolean usePodStyles)
This is not part of the official API.
|
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.
|
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)
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 rest 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)
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)
Set debug mode on or off.
|
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) |
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 |
setLocale(java.util.Locale locale)
This call set's the locale used in creating a report.
|
static 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)
Adds a map that is used for ${variable} substitution.
|
void |
setPreservePodFraming(boolean preserve)
True if Pod framing should be preserved for Pods 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 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)
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.
|
static void |
shutdown()
Releases all resources held by Windward Reports.
|
static void |
statLine(java.lang.String msg,
boolean logIt) |
void |
updatePods(UdtUpdate[] pods)
Deprecated.
Use the import tag instead for content that needs to be updated.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitduplicate, getReportType, getReportTypeStringpublic 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.SetupExceptionpublic 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.SetupExceptionpublic 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.SetupExceptionpublic 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.SetupExceptionpublic 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.SetupExceptionpublic ProcessReport(ProcessReport src) throws AlreadyProcessedException, LicenseException, SetupException
src - The ProcessReport object to copy.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.SetupExceptionpublic static int getVersionMajor()
public static int getVersionMinor()
public static int getVersionRelease()
public static java.lang.String getVersion()
public static java.lang.String getCompany()
public static int getMaxReportPages()
public int getWriteTags()
getWriteTags in interface ProcessReportAPIBasepublic void setWriteTags(int tagStyle)
setWriteTags in interface ProcessReportAPIBasetagStyle - the style unprocessed tags are written out as.public void setTemplateVersion(int version)
setTemplateVersion in interface ProcessReportAPIBaseversion - The major version number the report was created in.public int getTemplateVersion()
getTemplateVersion in interface ProcessReportAPIBasepublic boolean isPreservePodFraming()
isPreservePodFraming in interface ProcessReportAPIBasepublic void setPreservePodFraming(boolean preserve)
setPreservePodFraming in interface ProcessReportAPIBasepreserve - true if Pod framing should be preserved for Pods in the document.public boolean isTrackImports()
isTrackImports in interface ProcessReportAPIBasepublic void setTrackImports(boolean trackImports)
setTrackImports in interface ProcessReportAPIBasetrackImports - True if you want to call getImports after processing datasources.public void setRemoveUnusedFormats(boolean remove)
setRemoveUnusedFormats in interface ProcessReportAPIBaseremove - true if removing all unused formatting in the generated report.public boolean isRemoveUnusedFormats()
isRemoveUnusedFormats in interface ProcessReportAPIBasepublic void setTimeout(int seconds)
setTimeout in interface ProcessReportAPIBaseseconds - The number of seconds to timeout report generation at. 0 for no timeout.public int getTimeout()
getTimeout in interface ProcessReportAPIBasepublic void abort()
public int getCopyMetadata()
getCopyMetadata in interface ProcessReportAPIBasepublic void setCopyMetadata(int copy)
setCopyMetadata in interface ProcessReportAPIBasecopy - one of the COPY_* static ints.public int getHyphenate()
getHyphenate in interface ProcessReportAPIBasepublic void setHyphenate(int mode)
setHyphenate in interface ProcessReportAPIBasemode - One of the ProcessReportAPI.HYPHENATE_* constants.public boolean isCopyEmbeddedObjects()
isCopyEmbeddedObjects in interface ProcessReportAPIBasepublic void setCopyEmbeddedObjects(boolean copyEmbeddedObjects)
setCopyEmbeddedObjects in interface ProcessReportAPIBasecopyEmbeddedObjects - true if embedded objects are to be copied to output.public boolean performLayout()
public boolean isLayoutDocument()
isLayoutDocument in interface ProcessReportAPIBasepublic void setLayoutDocument(boolean layoutDocument)
setLayoutDocument in interface ProcessReportAPIBaselayoutDocument - true if the document is laid out, false if that step is skipped. Default is true.public int getHiddenMode()
getHiddenMode in interface ProcessReportAPIBasepublic void setHiddenMode(int mode)
setHiddenMode in interface ProcessReportAPIBasemode - The mode for handling hidden objecxts in the template.public boolean isUseExternalOutputBuilder()
isUseExternalOutputBuilder in interface ProcessReportAPIBasepublic void setUseExternalOutputBuilder(boolean useExternalOutputBuilder)
setUseExternalOutputBuilder in interface ProcessReportAPIBaseuseExternalOutputBuilder - true if it will use the external output builder.public java.lang.Object getOutputBuilderData()
getOutputBuilderData in interface ProcessReportAPIBasepublic void setOutputBuilderData(java.lang.Object outputBuilderData)
setOutputBuilderData in interface ProcessReportAPIBasepublic int getDataMode()
getDataMode in interface ProcessReportAPIBasepublic void setDataMode(int mode)
setDataMode in interface ProcessReportAPIBasemode - the embed data setting. Uses flags of EMBED_* constant ints.public java.io.OutputStream getDataStream()
throws java.io.IOException,
AlreadyProcessedException
getDataStream in interface ProcessReportAPIBasejava.io.IOExceptionAlreadyProcessedExceptionpublic void setDataStream(java.io.OutputStream stream)
setDataStream in interface ProcessReportAPIBasestream - 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.SetupExceptionpublic static void statLine(java.lang.String msg,
boolean logIt)
public static void setOutputBuilder(IOutputBuilderEngine outputBuilder)
throws SetupException
outputBuilder - The output builder to use.SetupExceptionpublic boolean isReportTypeExcel()
isReportTypeExcel in interface ProcessReportAPIBasepublic boolean isReportTypeWord()
isReportTypeWord in interface ProcessReportAPIBasepublic boolean isReportTypeDocx()
public boolean isReportTypePpt()
public boolean isReportTypeOpenXml()
public boolean isSameOpenXml()
public boolean isTemplateTypeOpenXml()
public boolean isTemplateTypeDOCX()
public boolean isTemplateTypePPTX()
public boolean isTemplateTypeXLSX()
public java.lang.String getTemplateTypeString()
public int getChartRenderType()
public int getRenderExtent()
ProcessReportAPIBasegetRenderExtent in interface ProcessReportAPIBasepublic void setRenderExtent(int extent)
ProcessReportAPIBasesetRenderExtent in interface ProcessReportAPIBaseextent - a ProcessReportAPI.RENDER_EXTENT_* value.public java.lang.String getRenderPages()
ProcessReportAPIBasegetRenderPages in interface ProcessReportAPIBasepublic void setRenderPages(java.lang.String pages)
ProcessReportAPIBasesetRenderPages in interface ProcessReportAPIBasepages - 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 ProcessReportAPIBasenum - The charset to use when generating an html or txt report.public int getCharset()
getCharset in interface ProcessReportAPIBasepublic void setLocale(java.util.Locale locale)
setLocale in interface ProcessReportAPIBaselocale - The locale to use when generating a report.public java.util.Locale getLocale()
getLocale in interface ProcessReportAPIBasepublic void setDescription(java.lang.String description)
setDescription in interface ProcessReportAPIBasedescription - The value of the description.public java.lang.String getDescription()
getDescription in interface ProcessReportAPIBasepublic void setTitle(java.lang.String docTitle)
setTitle in interface ProcessReportAPIBasedocTitle - The value of the title.public java.lang.String getTitle()
getTitle in interface ProcessReportAPIBasepublic void setSubject(java.lang.String docSubject)
setSubject in interface ProcessReportAPIBasedocSubject - The value of the subject.public java.lang.String getSubject()
getSubject in interface ProcessReportAPIBasepublic void setKeywords(java.lang.String docKeywords)
setKeywords in interface ProcessReportAPIBasedocKeywords - The value of the keywords.public java.lang.String getKeywords()
getKeywords in interface ProcessReportAPIBasepublic boolean isPageBasedReport()
isPageBasedReport in interface ProcessReportAPIBasepublic void setDebugMode(boolean debugOn)
setDebugMode in interface ProcessReportAPIBasedebugOn - Set to true to set debug mode on.public boolean isDebugMode()
isDebugMode in interface ProcessReportAPIBasepublic void setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
ProcessReportAPIBaseThese 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.
setParameters in interface ProcessReportAPIBaseparameters - The map of parameter pairs.public java.util.Map<java.lang.String,java.lang.Object> getParameters()
ProcessReportAPIBaseThese parameters are shared by all datasources. If one datasource adds, removes, or changes a parameter, all other datasources see this change.
getParameters in interface ProcessReportAPIBasepublic void setBaseDirectory(java.lang.String directory)
setBaseDirectory in interface ProcessReportAPIBasedirectory - The base directory. Does not need to have a final /.public java.lang.String getBaseDirectory()
getBaseDirectory in interface ProcessReportAPIBasepublic void setDrillDownInfo(ProcessReport.DrillDownTemplate drillDownInfo)
setDrillDownInfo in interface ProcessReportAPIBasedrillDownInfo - The template info.public ProcessReport.DrillDownTemplate getDrillDownInfo()
getDrillDownInfo in interface ProcessReportAPIBasepublic int getNumPages()
getNumPages in interface ProcessReportAPIBasepublic boolean hasDatasourcesApplied()
public void processSetup()
throws AlreadyProcessedException,
TemplateParseException,
java.io.IOException,
TagException,
DataSourceException,
LicenseException,
OutputLimitationException
processSetup in interface ProcessReportAPIBasejava.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.TemplateParseExceptionOutputLimitationExceptionpublic void processSetup(int inputType)
throws AlreadyProcessedException,
TemplateParseException,
java.io.IOException,
TagException,
DataSourceException,
LicenseException,
OutputLimitationException
processSetup in interface ProcessReportAPIBaseinputType - 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.TemplateParseExceptionOutputLimitationExceptionpublic 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)
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.TemplateParseExceptionOutputLimitationExceptionpublic 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.SetupExceptionTemplateParseExceptionOutputLimitationExceptionTinyExceptionpublic static TemplateInfo getTemplateMetrics(java.io.InputStream file, boolean quiet, boolean ignoreTags) throws SetupException, TemplateParseException, DataSourceException, java.io.IOException, TagException, AlreadyProcessedException, OutputLimitationException, TinyException
SetupExceptionTemplateParseExceptionDataSourceExceptionjava.io.IOExceptionTagExceptionAlreadyProcessedExceptionOutputLimitationExceptionTinyExceptionpublic 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.SetupExceptionTemplateParseExceptionOutputLimitationExceptionTinyExceptionpublic 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.SetupExceptionTemplateParseExceptionDataSourceExceptionjava.io.IOExceptionTagExceptionAlreadyProcessedExceptionOutputLimitationExceptionTinyExceptionpublic 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.SetupExceptionTemplateParseExceptionDataSourceExceptionjava.io.IOExceptionTagExceptionAlreadyProcessedExceptionOutputLimitationExceptionTinyExceptionpublic void buildSchema(java.io.OutputStream xmlSchema)
throws java.io.IOException,
DataSourceException,
TagException,
AlreadyProcessedException
buildSchema in interface ProcessReportAPIBasexmlSchema - 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.DataSourceException - thrown if there is a problem with the datasource.public void setEventHandler(WindwardEventHandler eventHandler)
setEventHandler in interface ProcessReportAPIBaseeventHandler - The event handler for this report.public WindwardEventHandler getEventHandler()
getEventHandler in interface ProcessReportAPIBasepublic 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.AlreadyProcessedExceptionpublic 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.AlreadyProcessedExceptionpublic 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 ProcessReportAPIBasedatasourceProvider - 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.TemplateParseExceptionOutputLimitationExceptionTinyExceptionpublic 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 ProcessReportAPIBasedataProviders - 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.TemplateParseExceptionOutputLimitationExceptionTinyExceptionpublic 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 ProcessReportAPIBasedataProviders - 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.TagExceptionAlreadyProcessedExceptionDataSourceExceptionpublic BatchReport batchNext(java.io.OutputStream report)
throws java.io.IOException,
TagException,
AlreadyProcessedException,
DataSourceException,
TemplateParseException,
OutputLimitationException,
TinyException
batchNext in interface ProcessReportAPIBasereport - The stream to write the generated report to. If null the engine will create a ByteArrayOutputStream.java.io.IOExceptionTagExceptionAlreadyProcessedExceptionDataSourceExceptionTemplateParseExceptionOutputLimitationExceptionTinyExceptionpublic void updatePods(UdtUpdate[] pods)
throws DataSourceException,
java.io.IOException,
TagException,
TemplateParseException,
OutputLimitationException,
TinyException
updatePods in interface ProcessReportAPIBasepods - The Pods 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.TemplateParseExceptionOutputLimitationExceptionTinyExceptionpublic byte[] mergePodItemStyles(byte[] podItemData,
boolean usePodStyles)
throws java.lang.Exception
java.lang.Exceptionpublic java.util.List<java.lang.String> findPodsUsed()
throws DataSourceException,
java.io.IOException,
TagException,
TemplateParseException,
OutputLimitationException,
TinyException
findPodsUsed in interface ProcessReportAPIBasejava.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.TemplateParseExceptionOutputLimitationExceptionTinyExceptionpublic long processComplete()
throws java.io.IOException,
TagException,
AlreadyProcessedException,
DataSourceException,
LicenseException,
OutputLimitationException,
TemplateParseException,
TinyException
processComplete in interface ProcessReportAPIBasejava.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.OutputLimitationExceptionTemplateParseExceptionTinyExceptionpublic ImportInfo[] getImportInfo()
getImportInfo in interface ProcessReportAPIBasepublic void addImportInfo(java.util.List importInfo)
public void setTrackErrors(int flag)
ProcessReportAPIBaseBy default these features are turned off (disabled).
setTrackErrors in interface ProcessReportAPIBaseflag - A combination of ERROR_HANDLING_ bits.public ErrorInfo getErrorInfo()
ProcessReportAPIBasegetErrorInfo in interface ProcessReportAPIBasepublic java.io.OutputStream getReport()
throws AlreadyProcessedException
getReport in interface ProcessReportAPIBaseAlreadyProcessedException - 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 ProcessReportAPIBasejava.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.TemplateParseExceptionOutputLimitationExceptionTinyExceptionpublic 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 ProcessReportAPIBaseCopyright © 2017 Windward Reports - All Rights Reserved. We are java reporting software