|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.inet.problemfinder.ProblemFinder
public class ProblemFinder
This is the i-net Clear Reports Problem Finder.
The Problem Finder is a debug tool. It checks i-net Clear Reports reports for design flaws.
Use getInstance() to get ProblemFinder instance for checking reports.
To check an Engine, use the Method check(Engine, int).
This Method needs the Engine to check and a specific type which defines the kind of checks that will be run.
For a complete check the type should be CHECK_ALL.
The ProblemFinder provides two Methods to get the result.
The getWarningList() returns a list of ProblemFinderWarnings found in the given main Engine.
The getSubreportWarningMap() returns a Map over all Subreport-Engines with their own list of ProblemFinderWarnings.
With clearAll() the list and the map will be empty.
Attention: The ProblemFinderWarning AutoFix-Actions manipulate the Engine, use it carefully or back up your reports
if you plan on replacing your report files.
ProblemFinder problemFinder = ProblemFinder.getInstance();
Engine mainEngine = new Engine();
URL source = this.getClass().getResource( "myReport.rpt" );
mainEngine.setReportFile( source );
problemFinder.check( mainEngine, ProblemFinder.CHECK_ALL );
List<ProblemFinderWarning> warningListMain = problemFinder.getWarningList();
for( ProblemFinderWarning warning : warningListMain ) {
System.out.println(warning.getMessage());
// ..do something else
}
HashMap<Engine, List<ProblemFinderWarning>> warningMap = problemFinder.getSubreportWarningMap();
for( Engine subEngine : warningMap.keySet() ) {
List<ProblemFinderWarning> warningListSub = warningMap.get( subEngine );
for( ProblemFinderWarning warning : warningListSub ) {
System.out.println(warning.getMessage());
// ..do something else
}
}
ProblemFinderWarning| Field Summary | |
|---|---|
static int |
CHECK_ALL
CHECK_ALL type to check all |
static int |
CHECK_ELEMENT
CHECK_ELEMENT type to check Elements |
static int |
CHECK_FIELDS
CHECK_FIELDS type to check all Fields |
static int |
CHECK_FIELD_FORMULA
CHECK_FIELD_FORMULA type to check FormulaFields |
static int |
CHECK_FIELD_PROMPT
CHECK_FIELD_PROMPT type to check PromptFields |
static int |
CHECK_FIELD_SQL
CHECK_FIELD_SQL type to check SQLFields |
static int |
CHECK_FIELD_SUMMARY
CHECK_FIELD_SUMMARY type to check SummaryFields |
static int |
CHECK_PROPERTYFORMULA
CHECK_PROPERTYFORMULA type to check property FormulaFields |
static int |
CHECK_SECTION
CHECK_SECTION type to check Sections |
| Method Summary | |
|---|---|
boolean |
check(Engine engine,
int type)
Start a Engine-check by a given type. |
void |
clearAll()
Removes all of the ProblemFinderWarnings from the warnings list and the subreport warnings map. |
static ProblemFinder |
getInstance()
Returns the ProblemFinder singleton instance. |
java.util.HashMap |
getSubreportWarningMap()
Returns a map over all Subreport engines with their own list of ProblemFinderWarnings. |
java.util.List |
getWarningList()
Returns a list of ProblemFinderWarnings found in the given main Engine. |
| Field Detail |
|---|
public static final int CHECK_FIELD_FORMULA
CHECK_FIELD_FORMULA type to check FormulaFields
public static final int CHECK_FIELD_SQL
CHECK_FIELD_SQL type to check SQLFields
public static final int CHECK_FIELD_SUMMARY
CHECK_FIELD_SUMMARY type to check SummaryFields
public static final int CHECK_FIELD_PROMPT
CHECK_FIELD_PROMPT type to check PromptFields
public static final int CHECK_FIELDS
CHECK_FIELDS type to check all Fields
public static final int CHECK_ELEMENT
CHECK_ELEMENT type to check Elements
public static final int CHECK_SECTION
CHECK_SECTION type to check Sections
public static final int CHECK_PROPERTYFORMULA
CHECK_PROPERTYFORMULA type to check property FormulaFields
public static final int CHECK_ALL
CHECK_ALL type to check all
| Method Detail |
|---|
public static ProblemFinder getInstance()
ProblemFinder singleton instance.
public void clearAll()
ProblemFinderWarnings from the warnings list and the subreport warnings map.
The list and the map will be empty after this call returns.
public boolean check(Engine engine,
int type)
Engine-check by a given type.
engine - given Engine that has to be checked.type - the type that says what to be checked.
true if the check was succeed, false if the check-thread was interruptedCHECK_ALL,
CHECK_ELEMENT,
CHECK_FIELD_FORMULA,
CHECK_FIELD_PROMPT,
CHECK_FIELD_SQL,
CHECK_FIELD_SUMMARY,
CHECK_FIELDS,
CHECK_PROPERTYFORMULA,
CHECK_SECTIONpublic java.util.List getWarningList()
ProblemFinderWarnings found in the given main Engine.
ProblemFinderWarning list with the current warnings.public java.util.HashMap getSubreportWarningMap()
Subreport engines with their own list of ProblemFinderWarnings.
ProblemFinderWarning list of the current warnings for each Subreport-Engine.
|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||