|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.actf.validation.doc.rulebase.ReflectionDocumentRuleFactory
public class ReflectionDocumentRuleFactory
The IRuleFactory for ACTF rules.
Field Summary | |
---|---|
protected static Map |
ruleMap
|
Constructor Summary | |
---|---|
ReflectionDocumentRuleFactory()
|
Method Summary | |
---|---|
protected List |
createComponentCriteria(Element comp)
|
protected IRule |
createCriteria(Attr criteriaAttr)
|
protected IRule |
createRule(Element ruleElem)
|
protected IRule |
createRule(Element ruleElement,
IRule parent)
|
protected List |
createRulesForComponent(Element comp)
|
protected String |
getAliasValue(String name)
|
ICodeProcessor |
getCodeProcessor()
|
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. |
IRuleMapping |
getRuleMapping(Object rulesetToken)
retreaves a rule mapping that maps a type of object to a set of rules. For a ReflectionDocument ,the mapping will consist of a Java type
mapped to a set of rules to be applied to instances of that type. |
IRuleSet |
getRuleSet()
|
boolean |
isRuleAttribute(String name)
|
IRule |
makeRuleInstance(Object obj)
Makes an instance of the rule using the object. |
IRule |
makeRuleInstance(Object obj,
IRule parent)
Makes an instance of the rule using the object having the specified parent. |
protected void |
processRuleElement(Element ruleElem,
Map componentCriteriaMap)
|
void |
registerRuleClassName(String name,
String ruleClassName)
registers a validation rule class for the given type |
void |
setCodeProcessor(ICodeProcessor codeProc)
|
void |
setRuleBase(IRuleBase ruleBase)
set the rulebase for this factory |
void |
setRuleSet(IRuleSet ruleSet)
set the ruleset for this factory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Map ruleMap
Constructor Detail |
---|
public ReflectionDocumentRuleFactory()
Method Detail |
---|
public ICodeProcessor getCodeProcessor()
public void setCodeProcessor(ICodeProcessor codeProc)
public IRuleBase getRuleBase()
getRuleBase
in interface IRuleFactory
public void setRuleBase(IRuleBase ruleBase)
IRuleFactory
setRuleBase
in interface IRuleFactory
public IRuleSet getRuleSet()
getRuleSet
in interface IRuleFactory
public void setRuleSet(IRuleSet ruleSet)
IRuleFactory
setRuleSet
in interface IRuleFactory
public IRuleMapping getRuleMapping(Object rulesetToken)
For a ReflectionDocument
,the mapping will consist of a Java type
mapped to a set of rules to be applied to instances of that type. The type is typically aliased and is the name
of the element defining a particular set of rules within a ruleset.
Hence, the 'rulesetToken' should be an instance of org.w3c.dom.Element
,
having a name that specifies the type for which rules represented by its child elements are to be applied.
getRuleMapping
in interface IRuleFactory
rulesetToken
- - ruleset (or token of ruleset) associated with this factory
protected void processRuleElement(Element ruleElem, Map componentCriteriaMap)
protected List createRulesForComponent(Element comp)
protected IRule createRule(Element ruleElement, IRule parent)
protected IRule createRule(Element ruleElem)
protected String getAliasValue(String name)
protected List createComponentCriteria(Element comp)
protected IRule createCriteria(Attr criteriaAttr)
public void registerRuleClassName(String name, String ruleClassName)
registerRuleClassName
in interface IRuleFactory
name
- -
name under which the rule is being registeredruleClassName
- -
the class name of the rule implementationpublic IRule getRuleInstance(String name)
registerRuleClassName
method or must be one of the
standard ACTF validation rules.
getRuleInstance
in interface IRuleFactory
name
- -
name of the rule
null
if there was no
rule registered under that nameIRuleFactory.registerRuleClassName(String, String)
public IRule getRuleInstance(String name, IRule parent)
registerRuleClassName
method or must be one of the
standard ACTF validation rules.
getRuleInstance
in interface IRuleFactory
name
- -
name of the ruleparent
- -
parent rule instance
null
if there was no
rule registered under that nameIRuleFactory.registerRuleClassName(String, String)
public IRule makeRuleInstance(Object obj, IRule parent)
makeRuleInstance
in interface IRuleFactory
obj
- -
Object from which the rule is derivedparent
- -
parent rule instance
public IRule makeRuleInstance(Object obj)
makeRuleInstance
in interface IRuleFactory
obj
- -
Object from which the rule is derived
public boolean isRuleAttribute(String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |