public class ReflectValidationRuleActionFactory extends java.lang.Object implements ActionFactory<ValidationRuleAction>
ValidationRuleAction
object.
This factory has one configuration parameter field
which is
the fully qualified name for the field. Failure to access or use the class and/or
field disabled the action and is reported to the log only.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
fullFieldName |
private ValidationRuleAction |
rule |
Constructor and Description |
---|
ReflectValidationRuleActionFactory() |
Modifier and Type | Method and Description |
---|---|
ValidationRuleAction[] |
getActions(InvokationContext<? super ValidationRuleAction> context)
This method may be called one or several times for each request.
|
private ValidationRuleAction |
getValidationRule(InvokationContext<? super ValidationRuleAction> context) |
boolean |
prepareContext(InvokationContext<? super ValidationRuleAction> context)
This method is called once for each request/use of an
extension and have two purposes:
The factory should decide if the extension should be enabled or
not.
|
void |
setField(java.lang.String fullFieldName) |
private java.lang.String fullFieldName
private ValidationRuleAction rule
public boolean prepareContext(InvokationContext<? super ValidationRuleAction> context)
ActionFactory
JspContext
.
prepareContext
in interface ActionFactory<ValidationRuleAction>
context
- The current invokation contextpublic ValidationRuleAction[] getActions(InvokationContext<? super ValidationRuleAction> context)
ActionFactory
getActions
in interface ActionFactory<ValidationRuleAction>
context
- The current invokation contextpublic void setField(java.lang.String fullFieldName)
private ValidationRuleAction getValidationRule(InvokationContext<? super ValidationRuleAction> context)