com.bea.p13n.rules.model
Class RuleModel.ActionsModel

java.lang.Object
  extended by com.bea.p13n.model.Model
      extended by com.bea.p13n.model.XmlObjectModel
          extended by com.bea.p13n.rules.model.ClauseModel
              extended by com.bea.p13n.rules.model.RuleModel.ActionsModel
All Implemented Interfaces
Serializable, Cloneable
Enclosing class:
RuleModel

public static class RuleModel.ActionsModel
extends ClauseModel

A clause model to hold the action clauses of the rule.

See Also
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.bea.p13n.model.Model
Model.ChangeEvent, Model.ChangeListener, Model.ChangeSupport, Model.Debug
 
Field Summary
 
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.ActionsModel()
           
 
Method Summary
 void addClauseModel(ClauseModel cm)
          Add a clause model to the rule's actions.
 void clearCachedData()
          Subclasses need to override this to clear out any cached data.
 boolean containsClauseType(String clauseType)
          Tell if the actions contain at least one clause of the specified type.
 org.apache.xmlbeans.XmlObject createNewXmlObject(String clauseType)
          Create a new, empty root object for the specified clauseType.
protected  boolean determineIsComplete()
          Determine if this is complete.
 com.bea.p13n.rules.schema.ActionsDocument.Actions getActions()
           
 ClauseModel[] getClauseModels()
          Get our ClauseModels, in order, as an array.
 boolean removeClauseModel(ClauseModel cm)
          Remove the specified clause from the rule's actions.
 boolean removeClauseModel(int index)
          Remove the index'th ClausModel from the rule's actions.
protected  void resetRootXmlObject(org.apache.xmlbeans.XmlObject o)
          Expose to things in this package.
 void setIsComplete()
          Override to have our children update their incomplete state.
 void setXmlObject(String clauseType, org.apache.xmlbeans.XmlObject clause)
          Initialize this clause model with a type and a root object.
 
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
 

Constructor Detail

RuleModel.ActionsModel

public RuleModel.ActionsModel()
Method Detail

setXmlObject

public void setXmlObject(String clauseType,
                         org.apache.xmlbeans.XmlObject clause)
Description copied from class: ClauseModel
Initialize this clause model with a type and a root object.

This will fire ChangeEvents for clauseType and rootXmlObject.

Subclasses should override to call super.setXmlObject() and do any type checking and verification.

It is not expected that ClauseModel's are valid after an call to this method which throws an exception, although the caller could recall this method with valid data.

Overrides:
setXmlObject in class ClauseModel
Parameters
clauseType - the clause type of the clause.
clause - the root xml object of the clause.

resetRootXmlObject

protected void resetRootXmlObject(org.apache.xmlbeans.XmlObject o)
Description copied from class: ClauseModel
Expose to things in this package.


createNewXmlObject

public org.apache.xmlbeans.XmlObject createNewXmlObject(String clauseType)
Description copied from class: ClauseModel
Create a new, empty root object for the specified clauseType.

Subclasses need to implement this to create an appropriately typed and filled root XmlObject which represents the ClauseModel. The return value from this needs to be accepted from ClauseModel.setXmlObject(java.lang.String, org.apache.xmlbeans.XmlObject) for the specified clauseType.

Specified by:
createNewXmlObject in class ClauseModel
Parameters
clauseType - the clause type of the clause.
Returns
a new, empty initialize root object.

clearCachedData

public void clearCachedData()
Description copied from class: XmlObjectModel
Subclasses need to override this to clear out any cached data. This will be automatically called when the root XmlObject or clauseType changes.

Specified by:
clearCachedData in class XmlObjectModel

getActions

public com.bea.p13n.rules.schema.ActionsDocument.Actions getActions()

getClauseModels

public ClauseModel[] getClauseModels()
Get our ClauseModels, in order, as an array.

See Also
Model.getChildren()

containsClauseType

public boolean containsClauseType(String clauseType)
Tell if the actions contain at least one clause of the specified type.


addClauseModel

public void addClauseModel(ClauseModel cm)
Add a clause model to the rule's actions. This will not add the same child instance twice, but does not prevent adding multiple of the same type of clause.


removeClauseModel

public boolean removeClauseModel(ClauseModel cm)
Remove the specified clause from the rule's actions.


removeClauseModel

public boolean removeClauseModel(int index)
Remove the index'th ClausModel from the rule's actions.


setIsComplete

public void setIsComplete()
Override to have our children update their incomplete state.

Overrides:
setIsComplete in class XmlObjectModel
See Also
XmlObjectModel.determineIsComplete()

determineIsComplete

protected boolean determineIsComplete()
Determine if this is complete.

Overrides:
determineIsComplete in class XmlObjectModel


Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.