public abstract class AbstractRule extends java.util.AbstractList<AbstractRule>
Modifier and Type | Field and Description |
---|---|
protected AoSession |
aoSession |
protected RuleEngine |
engine |
Constructor and Description |
---|
AbstractRule(RuleEngine ruleEngine,
AoSession aoSession)
Create an abstract rule.
|
AbstractRule(RuleEngine engine,
AoSession aoSession,
java.util.Collection<AbstractRule> collection)
Create an abstract rule and initialize the child list with the given collection elements.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
AbstractRule element)
Add a child rule.
|
int |
executePostMethods()
Execute post methods.
|
int |
executePreMethods()
Execute pre methods.
|
AbstractRule |
get(int index)
Get a child from specific index position.
|
RuleEngine |
getEngine()
Get the engine.
|
java.lang.String |
getId()
Get the id of the rule.
|
java.util.logging.Logger |
getMessenger(java.lang.String name)
Get the logger of the rule.
|
java.lang.String |
getPointTo()
Get the reference string of the rule.
|
AoSession |
getSession()
Get the session that belongs to that rule.
|
Transformer |
getTransformer()
Get the transformer.
|
abstract NameValueUnit |
getValue()
Get the named value from rule.
|
boolean |
isPedantic()
Get the gather mode.
|
AbstractRule |
remove(int index)
Remove a chid from specifiy index position.
|
AbstractRule |
set(int index,
AbstractRule element)
Set the child at a specific index position.
|
void |
setId(java.lang.String id)
Set the id of the rule.
|
void |
setMethods(RulePostMethod[] arr)
Set the rule pre methods.
|
void |
setMethods(RulePreMethod[] arr)
Set the rule pre methods.
|
void |
setPedantic(boolean flag)
Set the gather mode.
|
void |
setPointTo(java.lang.String pointTo)
Set the ref of the rule.
|
abstract void |
setValue(NameValueUnit nvu)
Set the named value from rule.
|
int |
size()
Get the total number of children.
|
java.lang.String |
toString()
Get the strin gpresentation of the rule.
|
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
protected RuleEngine engine
protected AoSession aoSession
public AbstractRule(RuleEngine ruleEngine, AoSession aoSession)
engine
- the rule engine that handles this rule.aoSession
- the ASAM ODS session.public AbstractRule(RuleEngine engine, AoSession aoSession, java.util.Collection<AbstractRule> collection)
engine
- the rule engine that handles this rule.aoSession
- teh ASAM ODS session.collection
- the initial child list.public AoSession getSession()
public RuleEngine getEngine()
public Transformer getTransformer()
public void add(int index, AbstractRule element)
add
in interface java.util.List<AbstractRule>
add
in class java.util.AbstractList<AbstractRule>
index
- The index of the new child.element
- the new child.public AbstractRule get(int index)
get
in interface java.util.List<AbstractRule>
get
in class java.util.AbstractList<AbstractRule>
index
- the child index.public AbstractRule remove(int index)
remove
in interface java.util.List<AbstractRule>
remove
in class java.util.AbstractList<AbstractRule>
index
- the child index.public AbstractRule set(int index, AbstractRule element)
set
in interface java.util.List<AbstractRule>
set
in class java.util.AbstractList<AbstractRule>
index
- the positionelement
- the childpublic void setMethods(RulePreMethod[] arr)
public void setMethods(RulePostMethod[] arr)
public int size()
size
in interface java.util.Collection<AbstractRule>
size
in interface java.util.List<AbstractRule>
size
in class java.util.AbstractCollection<AbstractRule>
public java.lang.String getId()
public void setPointTo(java.lang.String pointTo)
public java.lang.String getPointTo()
public void setId(java.lang.String id)
public void setPedantic(boolean flag)
public boolean isPedantic()
public int executePreMethods()
executePostMethods()
public int executePostMethods()
executePreMethods()
public java.util.logging.Logger getMessenger(java.lang.String name)
name
- the name of the logger.public abstract void setValue(NameValueUnit nvu)
nvu
- The name value of the rule.public abstract NameValueUnit getValue()
public java.lang.String toString()
toString
in class java.util.AbstractCollection<AbstractRule>