|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ICriterionFactory
A factory for criterions. A factory instance, once obtained, can be used to find
criterions for a given type of object using a IRuleMapping
.
Implementations should be specified using the <actf:ruleFactory>
attribute in documents or programatically. In either case, rule factories
should always be attached to a IRuleSet
.
IRuleSet.setCriterionFactory(ICriterionFactory)
,
ICriterionFactory
Method Summary | |
---|---|
ICriterionMapping |
getCriterionMapping(Object rulesetToken)
retrieves a criterion mapping that maps a type of object to a set of rules. |
IRuleBase |
getRuleBase()
|
IRule |
getRuleInstance(String name)
gets an instance of the validation rule for the given name. |
IRule |
getRuleInstance(String name,
IRule parent)
creates and initializes a validation rule for the given name. |
IRuleSet |
getRuleSet()
|
ICriterion |
makeCriterionInstance(Object obj)
Makes an instance of the criterion using the object. |
ICriterion |
makeCriterionInstance(Object obj,
ICriterion parent)
Makes an instance of the criterion using the object having the specified parent. |
void |
registerRuleClassName(String name,
String ruleClassName)
registers a validation rule class for the given type |
void |
setRuleBase(IRuleBase ruleBase)
set the rulebase for this factory |
void |
setRuleSet(IRuleSet ruleSet)
set the ruleset for this factory |
Method Detail |
---|
void setRuleBase(IRuleBase ruleBase)
IRuleBase getRuleBase()
void setRuleSet(IRuleSet ruleSet)
IRuleSet getRuleSet()
void registerRuleClassName(String name, String ruleClassName)
name
- -
name under which the rule is being registeredruleClassName
- -
the class name of the rule implementationIRule getRuleInstance(String name)
registerRuleClassName
method or must be one of the
standard ACTF validation rules.
name
- -
name of the rule
null
if there was no
rule registered under that nameregisterRuleClassName(String, String)
IRule getRuleInstance(String name, IRule parent)
registerRuleClassName
method or must be one of the
standard ACTF validation rules.
name
- -
name of the ruleparent
- -
parent rule instance
null
if there was no
rule registered under that nameregisterRuleClassName(String, String)
ICriterion makeCriterionInstance(Object obj)
obj
- -
Object from which the criterion is derived
ICriterion makeCriterionInstance(Object obj, ICriterion parent)
obj
- -
Object from which the criterion is derivedparent
- -
parent criterion instance
ICriterionMapping getCriterionMapping(Object rulesetToken)
rulesetToken
- - ruleset (or token of ruleset) associated with this factory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |