Package com.inet.problemfinder
Class ProblemFinder
java.lang.Object
com.inet.problemfinder.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
To check an Engine, use the Method
This Method needs the
For a complete check the type should be
The
The
The
With
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 ProblemFinderWarning
s found in the given main Engine.The
getSubreportWarningMap()
returns a Map over all Subreport
-Engines with their own list of ProblemFinderWarning
s.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( Engine.NO_EXPORT ); 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 } }
- Since:
- 11.0
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
CHECK_ALL
type to check allstatic final int
CHECK_ELEMENT
type to checkElement
sstatic final int
CHECK_FIELD_FORMULA
type to checkFormulaField
sstatic final int
CHECK_FIELD_PROMPT
type to checkPromptField
sstatic final int
CHECK_FIELD_SQL
type to checkSQLField
sstatic final int
CHECK_FIELD_SUMMARY
type to checkSummaryField
sstatic final int
CHECK_FIELDS
type to check allField
sstatic final int
CHECK_PROPERTYFORMULA
type to check propertyFormulaField
sstatic final int
CHECK_REPORT
type to check property executed reportsstatic final int
CHECK_SECTION
type to checkSection
s -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRules
(ProblemFinderRule rule) Add a new rules to the problem finder from a plugin.boolean
Start aEngine
-check by a given type.void
clearAll()
Removes all of theProblemFinderWarning
s from the warnings list and the subreport warnings map.static ProblemFinder
Returns theProblemFinder
singleton instance.Returns a list ofProblemFinderWarning
s found in the given main Engine.void
setUserProperties
(Properties userProperties) Sets user properties for the engine to check.
-
Field Details
-
CHECK_FIELD_FORMULA
public static final int CHECK_FIELD_FORMULACHECK_FIELD_FORMULA
type to checkFormulaField
s- See Also:
-
CHECK_FIELD_SQL
public static final int CHECK_FIELD_SQLCHECK_FIELD_SQL
type to checkSQLField
s- See Also:
-
CHECK_FIELD_SUMMARY
public static final int CHECK_FIELD_SUMMARYCHECK_FIELD_SUMMARY
type to checkSummaryField
s- See Also:
-
CHECK_FIELD_PROMPT
public static final int CHECK_FIELD_PROMPTCHECK_FIELD_PROMPT
type to checkPromptField
s- See Also:
-
CHECK_FIELDS
public static final int CHECK_FIELDSCHECK_FIELDS
type to check allField
s- See Also:
-
CHECK_ELEMENT
public static final int CHECK_ELEMENTCHECK_ELEMENT
type to checkElement
s- See Also:
-
CHECK_SECTION
public static final int CHECK_SECTIONCHECK_SECTION
type to checkSection
s- See Also:
-
CHECK_PROPERTYFORMULA
public static final int CHECK_PROPERTYFORMULACHECK_PROPERTYFORMULA
type to check propertyFormulaField
s- See Also:
-
CHECK_REPORT
public static final int CHECK_REPORTCHECK_REPORT
type to check property executed reports- See Also:
-
CHECK_ALL
public static final int CHECK_ALLCHECK_ALL
type to check all- See Also:
-
-
Method Details
-
getInstance
Returns theProblemFinder
singleton instance.- Returns:
- the static ProblemFinder instance.
- Since:
- 11.0
-
addRules
Add a new rules to the problem finder from a plugin.- Parameters:
rule
- the new rules to be add- Since:
- 20.10
-
setUserProperties
Sets user properties for the engine to check. The properties could have for example prompt values that the engine needs to render.- Parameters:
userProperties
- the properties for the engine to set- Since:
- 20.10
-
clearAll
public void clearAll()Removes all of theProblemFinderWarning
s from the warnings list and the subreport warnings map. The list and the map will be empty after this call returns.- Since:
- 11.0
-
check
Start aEngine
-check by a given type.- Parameters:
engine
- givenEngine
that has to be checked.type
- the type that says what to be checked.- Returns:
true
if the check was succeed,false
if the check-thread was interrupted- Since:
- 11.0
- See Also:
-
getWarningList
Returns a list ofProblemFinderWarning
s found in the given main Engine.- Returns:
- The main
ProblemFinderWarning
list with the current warnings. - Since:
- 11.0
-
getSubreportWarningMap
- Returns:
- The
ProblemFinderWarning
list of the current warnings for each Subreport-Engine. - Since:
- 11.0
-