public class ReportDriver extends java.lang.Object implements DebugLevels, XmlConstants, ReportConstants
main(java.lang.String[])
for the syntax.
The report definitions are stored in an XML file with the following structure:
Report definition files have a .rpt
filename suffix and must
reside in the pattern path.
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
APP_ADMIN_PASS
Default admin password system property key
|
private static boolean |
database
Database mode flag.
|
private static java.lang.String |
ruleset
Reporting rule-set.
|
MSG_DEBUG, MSG_NONE, MSG_STATUS, MSG_TRACE
ATTR_ADMIN, ATTR_COND, ATTR_DB, ATTR_DUMPEXPR, ATTR_DUMPLVL, ATTR_DUMPTYPE, ATTR_ID, ATTR_MULTIPLEX, ATTR_NAME, ATTR_PASS_CHANGED, ATTR_PASSWORD, ATTR_SALT, ATTR_SORT, ATTR_SPEC, ATTR_SUPPORT, ATTR_TAG, ATTR_TITLE, ATTR_USER, ATTR_WILD, AUTO_EXPORT_FILTER_PATH, AUTO_EXPORT_RPT_SPEC, AUTO_EXPORT_SRCH_PATH, AUTO_EXPORT_USER_PATH, ELEM_FILTER, ELEM_LIST, ELEM_PROFILE, ELEM_RPT, ELEM_SEARCH, ELEM_USER, RPT_PATH, RPT_SUFFIX
CVT_LVL_BASIC, CVT_LVL_FULL, CVT_LVL_FULL_RESTR, CVT_LVL_MASK, CVT_LVL_NONE, CVT_LVL_PARTIAL, LVL_UNKNOWN, RT_LVL_BASIC, RT_LVL_FULL, RT_LVL_FULL_RESTR, RT_LVL_MASK, RT_LVL_NONE, RT_LVL_PARTIAL, RT_LVL_STUB, RT_LVL_UNTESTED, SORT_ALL, SORT_NONE, SORT_NOT_LAST, SRC_CODE_BASE, SRC_CODE_CACHE, SRC_SCHEMA, SRC_UNKNOWN
Constructor and Description |
---|
ReportDriver() |
Modifier and Type | Method and Description |
---|---|
private static java.util.List<ReportDefinition> |
loadReports(java.lang.String rptdef)
Read the given report definitions and store the list of reports for subsequent processing.
|
static void |
main(java.lang.String[] args)
Provides a command line interface for generating a list of reports
using a list of ASTs and a report definition.
|
static void |
patternEngine(FileList[] files,
int dbg,
java.util.Map<java.lang.String,java.lang.Object> init)
Run the pattern engine with the given input.
|
private static void |
syntax(java.lang.String msg,
int rc)
Emit a syntax statement and optional error message to
stderr , then exit the process with the specified return
code. |
private static final java.lang.String APP_ADMIN_PASS
private static final java.lang.String ruleset
private static boolean database
public static void patternEngine(FileList[] files, int dbg, java.util.Map<java.lang.String,java.lang.Object> init) throws java.lang.Exception
files
- List of ASTs to process.dbg
- Debug level.init
- Variable initializers to enable.java.lang.Exception
private static java.util.List<ReportDefinition> loadReports(java.lang.String rptdef) throws ConfigurationException, javax.xml.parsers.ParserConfigurationException, java.io.IOException, org.xml.sax.SAXException
rptdef
- File name root of the XML file storing the list of report definitions.ConfigurationException
- if there is an error loading the project configuration.javax.xml.parsers.ParserConfigurationException
- if there is an error configuring the XML parser.org.xml.sax.SAXException
- if the XML SAX parser encounters an error.java.io.IOException
- if there is an error accessing the file.private static void syntax(java.lang.String msg, int rc)
stderr
, then exit the process with the specified return
code. This method is called from main(java.lang.String[])
when the user passes
command line parameters which are not viable.msg
- Optional error message; may be null
.rc
- Process return code used with System.exit()
.public static void main(java.lang.String[] args)
Syntax:
java -DP2J_HOME=<home> ReportDriver [options] <rptdef> <filelist> java -DP2J_HOME=<home> ReportDriver -S[options] <rptdef> <directory> <filespec> java -DP2J_HOME=<home> ReportDriver -T[options] <rptdef> <directory> <filespec> <filelist>Where:
rptdef
is the name of a report definition file
found via the pattern path
args
- List of command line arguments.