|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bea.p13n.model.Model com.bea.p13n.model.XmlObjectModel com.bea.p13n.rules.model.ClauseModel com.bea.p13n.rules.model.RuleModel
public class RuleModel
The model representing an rule.
This will always have 2 children, in order, a
ConditionsModel
and a
ActionsModel
. Those will contain the various
ClauseModels of the rule.
The clauseType of a RuleModel will be its ruleType identifier. It will kept uptodate with the actions. Therefore, adding and removing clauses from the conditions and actions will possibly fire 'clauseType' change events.
Nested Class Summary | |
---|---|
static class |
RuleModel.ActionsModel
A clause model to hold the action clauses of the rule. |
static class |
RuleModel.ConditionsModel
A clause model to hold the condition clauses of the rule. |
static class |
RuleModel.Recongizer
An object which recognizes Xmlobjects that can be loaded into a RuleModel. |
Nested classes/interfaces inherited from class com.bea.p13n.model.Model |
---|
Model.ChangeEvent, Model.ChangeListener, Model.ChangeSupport, Model.Debug |
Field Summary | |
---|---|
static String |
GENERIC_RULE_TYPE
|
Fields inherited from class com.bea.p13n.rules.model.ClauseModel |
---|
clauseType |
Fields inherited from class com.bea.p13n.model.XmlObjectModel |
---|
copyRootXmlObject, instanceUri, isComplete |
Fields inherited from class com.bea.p13n.model.Model |
---|
childrenModels, docModel, parentModel, roChildrenModels |
Constructor Summary | |
---|---|
RuleModel()
|
Method Summary | |
---|---|
void |
clearCachedData()
Clear out any cached data where holding so we'll get it from the Rule next time. |
org.apache.xmlbeans.XmlObject |
createNewXmlObject(String clauseType)
Return a new, empty Rule object with no conditions or actions. |
protected void |
determineClauseType()
Update our clauseType to be the ruleType. |
protected boolean |
determineIsComplete()
Determine if the RuleModel is currently complete. |
RuleModel.ActionsModel |
getActionsModel()
Get the actions. |
Collection<MethodCallModel.VariableArgument> |
getBoundVariables()
Return the name/type pairs of all variables bound into the rule conditions. |
RuleModel.ConditionsModel |
getConditionsModel()
Get the conditions. |
String |
getDescription()
Get the rule description. |
String |
getName()
Get the rule name. |
com.bea.p13n.rules.schema.RuleDocument.Rule |
getRule()
Get the underlying Rule object. |
void |
setDescription(String desc)
Set the rule description. |
protected void |
setIsComplete(boolean isComplete)
Override to set on our rule object also. |
void |
setName(String name)
Set the rule name. |
void |
setXmlObject(String clauseType,
org.apache.xmlbeans.XmlObject clause)
Initialize this model from the specified clause structure. |
Methods inherited from class com.bea.p13n.rules.model.ClauseModel |
---|
addBranch, addLiteral, addMethod, addMethodOrOperator, addOperator, addVariable, addVariableBinding, copy, getClauseType, getContainingRuleModel, getCopyXmlObject, initializeNew, isInActions, isInConditions, isValidTypeAlias, isValidVariableName, makeSafeCopy, toString |
Methods inherited from class com.bea.p13n.model.XmlObjectModel |
---|
checkElement, childAdded, childRemoved, fixQName, getApplicationInstanceUri, getChild, getDocument, getLocalName, getParent, getQName, getRootXmlObject, isComplete, isNil, preRemove, propertyChanged, removeAllChildren, removeChild, setApplicationInstanceUri, setIsComplete, setParent, setRootXmlObject |
Methods inherited from class com.bea.p13n.model.Model |
---|
addChangeListener, addChild, addChild, clone, doubleEquals, equals, getChildren, getDebug, getDebug, getDocument, getParent, longEquals, removeChangeListener, removeChild, removeChild, removeEmpties, setDocument |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String GENERIC_RULE_TYPE
Constructor Detail |
---|
public RuleModel()
Method Detail |
---|
public void setXmlObject(String clauseType, org.apache.xmlbeans.XmlObject clause) throws IllegalArgumentException
setXmlObject
in class ClauseModel
clauseType
- the clause type of the clause.clause
- the root xml object of the clause.
IllegalArgumentException
- if clause is not a RuleDocument.Rule
instance.protected void determineClauseType()
public org.apache.xmlbeans.XmlObject createNewXmlObject(String clauseType)
createNewXmlObject
in class ClauseModel
clauseType
- the clause type of the clause.
public void clearCachedData()
Rule
next time.
clearCachedData
in class XmlObjectModel
public com.bea.p13n.rules.schema.RuleDocument.Rule getRule()
protected void setIsComplete(boolean isComplete)
rule
object also.
setIsComplete
in class XmlObjectModel
protected boolean determineIsComplete()
determineIsComplete
in class XmlObjectModel
public String getName()
public void setName(String name)
public String getDescription()
public void setDescription(String desc)
public Collection<MethodCallModel.VariableArgument> getBoundVariables()
getBoundVariables
in interface BoundVariableProvider
public RuleModel.ConditionsModel getConditionsModel()
public RuleModel.ActionsModel getActionsModel()
|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |