Package com.inet.problemfinder
Interface ProblemFinderWarning
- All Superinterfaces:
Comparable<ProblemFinderWarning>
Represents a Warning/Error/Info detected by
Every
The Method
For example :
An
With
ProblemFinder
.Every
ProblemFinderWarning
has a source object, which causes the Warning. Possible sources can be
Element
/Section
/Field
or a specific ProblemFinderWarning.Sources
object.The Method
getTriggeringRule()
returns the ProblemFinderRule
that causes this
Warning.canAutoFix()
returns true
if it is possible that this Warning can
be 'auto-fixed'. That means you can get via getAutoFixActions()
a list of one or more
Actions, that manipulates the Engine
to correct the problem by performing the Action.For example :
An
Engine
that has a Text
-Element with a height less than 30 Twips causes a
ProblemFinderWarning
with Type ProblemFinderWarning.Type.WARNING
.getTriggeringRule()
returns
the RuleElementToSmall
and getSource()
returns the Text
-Element itself.With
getAutoFixActions()
you get a list with two Action
s. The first Action
resizes the Element to a minimum of 300 Twips and the second Action sets the Element-Property
Element.setCanGrow(boolean)
to true
.
Attention: The ProblemFinderWarning
AutoFix-Actions manipulate the Engine
, use it carefully or back up your reports
if you plan on replacing your report files.
- Since:
- 11.0
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
The source object exceptions that can be returned bygetSource()
.static enum
TheProblemFinderWarning
types -
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether this warning can be auto-fixedint
compareTo
(ProblemFinderWarning warning) Compares this ProblemFinderWarning with the specified ProblemFinderWarning for order.Returns the Actions which autofix this problem.
Each Action has a description about what it does.Returns the message which describes this problem.Returns the message which describes the problem source.Returns theProblemFinderRule
that causes the Warning.Returns the type of this problem, that can be error, warning or info.
-
Method Details
-
canAutoFix
boolean canAutoFix()Whether this warning can be auto-fixed- Returns:
true
if can be auto-fixed, otherwisefalse
.- Since:
- 11.0
-
getAutoFixActions
List<AbstractAction> getAutoFixActions()Returns the Actions which autofix this problem.
Each Action has a description about what it does. You can get it viaAction.getValue(Action.NAME)
- Returns:
- the proposed actions to fix this problem.
- Since:
- 11.0
-
getWarningType
ProblemFinderWarning.Type getWarningType()Returns the type of this problem, that can be error, warning or info.- Returns:
- the type of this problem
- Since:
- 11.0
- See Also:
-
getMessage
String getMessage()Returns the message which describes this problem.- Returns:
- the message describing the problem
- Since:
- 11.0
-
getTriggeringRule
ProblemFinderRule getTriggeringRule()Returns theProblemFinderRule
that causes the Warning.- Returns:
- the
ProblemFinderRule
that initiate the Check that causes the Warning. - Since:
- 11.0
-
getSource
Object getSource()- Returns:
- the source Object that was found by the ProblemFinderRule
- Since:
- 11.0
-
getSourceMessage
String getSourceMessage()Returns the message which describes the problem source.- Returns:
- the message describing the problem source object.
- Since:
- 11.0
-
compareTo
Compares this ProblemFinderWarning with the specified ProblemFinderWarning for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
The Sort carried out in three steps:- If the
getWarningType()
are not equal, it compares the enumProblemFinderWarning.Type
. - If the
getTriggeringRule()
are not equal, it compares the class name of theProblemFinderRule
- Else it compares the
getMessage()
lexicographically.
- Specified by:
compareTo
in interfaceComparable<ProblemFinderWarning>
- Parameters:
warning
- the ProblemFinderWarning to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
- Since:
- 11.0
- If the
-