Class AbstractRulesModule
java.lang.Object
org.apache.commons.digester3.binder.AbstractRulesModule
- All Implemented Interfaces:
RulesModule
- Direct Known Subclasses:
AbstractNamespaceURIBasedRulesModule
,FromAnnotationsRuleModule
,FromXmlRulesModule
A support class for RulesModule which reduces repetition and results in a more readable configuration.
- Since:
- 3.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Records an error message which will be presented to the user at a later time.protected void
Records an exception, the full details of which will be logged, and the message of which will be presented to the user at a later time.protected abstract void
Configures aRulesBinder
via the exposed methods.final void
configure
(RulesBinder rulesBinder) Configure the Digester rules binding via the given rules binder.protected LinkedRuleBuilder
forPattern
(String pattern) Allows user binding one or more Digester rules to the input pattern.protected void
install
(RulesModule rulesModule) Uses the given module to configure more bindings.protected RulesBinder
Return the wrappedRulesBinder
.
-
Field Details
-
rulesBinder
-
-
Constructor Details
-
AbstractRulesModule
public AbstractRulesModule()
-
-
Method Details
-
configure
Configure the Digester rules binding via the given rules binder.- Specified by:
configure
in interfaceRulesModule
- Parameters:
rulesBinder
- The binder instance used to configure rules bindings.
-
configure
protected abstract void configure()Configures aRulesBinder
via the exposed methods. -
addError
Records an error message which will be presented to the user at a later time. UsesString.format(String, Object...)
to insert the arguments into the message.- Parameters:
messagePattern
- A format stringarguments
- Arguments referenced by the format specifiers in the format string- See Also:
-
addError
Records an exception, the full details of which will be logged, and the message of which will be presented to the user at a later time.- Parameters:
t
- The exception has to be recorded- See Also:
-
install
Uses the given module to configure more bindings.- Parameters:
rulesModule
- The module used to configure more bindings- See Also:
-
forPattern
Allows user binding one or more Digester rules to the input pattern.- Parameters:
pattern
- The pattern used to bind rules- Returns:
- The Digester rules builder
- See Also:
-
rulesBinder
Return the wrappedRulesBinder
.- Returns:
- The wrapped
RulesBinder
-