public class ReportRunner
extends java.lang.Object
StandaloneReportEngine
class. This application allows running
a report to output in one or multiple formats.
Report parameters are handled as command line parameters. Currently, only scalar parameters are handled.
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
args
the input paramters
|
protected java.lang.String |
encoding
the output encoding, used in html format in Render and RunAndRender
modes.
|
protected java.lang.String |
format
the output format, used in Render and RunAndRender.
|
protected java.lang.String |
htmlType
used to decorate the HTML output, used in Render and RunAndRender mode.
|
protected java.lang.String |
locale
the output locale, used in Run and RunAndRender modes.
|
protected static java.util.logging.Logger |
logger |
protected java.lang.String |
mode
execution mode, one of the Run, RunAndRender and Render.
|
protected long |
pageNumber
output page number, used in Render mode.
|
protected java.util.HashMap |
params
paramters used to execute the report, used in Run and RunAndRender modes.
|
protected java.lang.String |
source
the source input ,can be designName or reportArchive name
|
protected java.lang.String |
targetFile
The target file name
|
Constructor and Description |
---|
ReportRunner(java.lang.String[] args)
Constructor of ReportRunner
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkTargetFileName()
If -o (targetFile) is not specified, assume same directory as inputfile,
and inputfile.*** as output file name (where *** is the output format.
|
protected EngineConfig |
createEngineConfig()
new a EngineConfig and config it with user's setting
|
int |
execute()
Check if the arguments are valid.
|
static void |
main(java.lang.String[] args)
Main function.
|
protected void |
parseConfigurationOptions()
paraser the config/paramter/renderoption command line inputs.
|
protected int |
parseHelpOptions() |
protected void |
parseNormalOptions()
parse the arguments.
|
protected void |
parseRenderOptions()
Parse render options.
|
protected void |
parseRunAndRenderOptions()
Parse run and render options.
|
protected void |
parseRunOptions()
Parse running options.
|
protected void |
printConfigUsage() |
protected void |
printFileUsage() |
protected void |
printGeneralUsage()
print out the command line usage.
|
protected void |
printRenderOptionUsage() |
protected void |
printRenderUsage() |
protected void |
printRunRenderUsage() |
protected void |
printRunUsage() |
protected void |
readConfigurationFile(java.lang.String fileName,
java.util.HashMap params)
read Config-Parameter-Render file
|
protected void |
readParamString(java.lang.String param,
java.util.HashMap params)
read paramters from the param and add it into the params.
|
protected int |
renderReport()
render the report.
|
protected int |
runAndRenderReport()
Execute the report design which includes:
1. |
protected int |
runReport()
running the report to create the report document
|
protected java.lang.Object |
stringToObject(int type,
java.lang.String value) |
protected static java.util.logging.Logger logger
protected java.lang.String[] args
protected java.lang.String source
protected java.lang.String targetFile
protected java.lang.String mode
protected java.lang.String locale
protected java.lang.String format
protected java.lang.String htmlType
protected java.lang.String encoding
protected java.util.HashMap params
protected long pageNumber
public ReportRunner(java.lang.String[] args)
args
- -
application argumentspublic static void main(java.lang.String[] args)
args
- -
application argumetns.public int execute()
protected int runAndRenderReport()
protected int runReport()
protected int renderReport()
protected void printGeneralUsage()
protected void printRunUsage()
protected void printRenderUsage()
protected void printRunRenderUsage()
protected void printConfigUsage()
protected void printRenderOptionUsage()
protected void printFileUsage()
protected void parseRunOptions() throws java.lang.Exception
java.lang.Exception
protected void parseRenderOptions() throws java.lang.Exception
java.lang.Exception
protected void parseRunAndRenderOptions() throws java.lang.Exception
java.lang.Exception
protected int parseHelpOptions()
protected void parseNormalOptions()
args
- -
argumentsprotected void readParamString(java.lang.String param, java.util.HashMap params)
param
- parameter string line. use '=' to separate the name and value.params
- maps contains all the paramter name and value.protected void parseConfigurationOptions()
protected void readConfigurationFile(java.lang.String fileName, java.util.HashMap params)
protected java.lang.Object stringToObject(int type, java.lang.String value) throws BirtException
p
- the scalar parameterexpr
- the default value expressionBirtException
protected void checkTargetFileName()
protected EngineConfig createEngineConfig()
Copyright © 2014 OpenText Corp. All rights reserved.