com.bea.p13n.rules.model
Class EventTypeModel

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.EventTypeModel
All Implemented Interfaces
Serializable, Cloneable

public class EventTypeModel
extends ClauseModel

A model representing a rule condition clause which checks for a set of event types. This model code doesn't check the clauseType since it only supports a single structure.

See Also
Serialized Form

Nested Class Summary
static class EventTypeModel.Recognizer
          An object which can recognize EventTypeModels from xml.
 
Nested classes/interfaces inherited from class com.bea.p13n.model.Model
Model.ChangeEvent, Model.ChangeListener, Model.ChangeSupport, Model.Debug
 
Field Summary
static String CLAUSE_TYPE
          The standard clauseType for a EventTypeModel.
 
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
EventTypeModel()
           
 
Method Summary
 void clearCachedData()
          Clear any cached data.
 org.apache.xmlbeans.XmlObject createNewXmlObject(String clauseType)
          Create a new, empty xml structure of this model.
protected  boolean determineIsComplete()
          Determine if this model is complete.
 String[] getEventTypes()
          Get the event types names this clause checks.
protected  String[] getEventTypesNoCache()
           
 com.bea.p13n.expression.schema.MultiConditionalOperator getMultiConditionalOperator()
          Get the top-most multi-conditional-operator (should be <multi-and> or <multi-or>).
 PropertyContainer.JoinType getOuterJoin()
          Get the outer join logic (AND to require matching all event types, OR to require any event type).
 void setEventTypes(String... eventTypes)
          Set the event types this clause checks.
protected  void setEventTypes(String[] eventTypes, boolean forceSet)
          Set the event types this clause checks.
 void setXmlObject(String clauseType, org.apache.xmlbeans.XmlObject clause)
          Set the root xml object for this model.
 
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, 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

CLAUSE_TYPE

public static final String CLAUSE_TYPE
The standard clauseType for a EventTypeModel.

See Also
Constants Summary
Constructor Detail

EventTypeModel

public EventTypeModel()
Method Detail

setXmlObject

public void setXmlObject(String clauseType,
                         org.apache.xmlbeans.XmlObject clause)
                  throws IllegalArgumentException
Set the root xml object for this model.

Overrides:
setXmlObject in class ClauseModel
Parameters
clauseType - the clause type of the clause.
clause - the root xml object of the clause.
Throws
IllegalArgumentException - if clause doesn't match our expected structure.

createNewXmlObject

public org.apache.xmlbeans.XmlObject createNewXmlObject(String clauseType)
Create a new, empty xml structure of this model.

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()
Clear any cached data.

Specified by:
clearCachedData in class XmlObjectModel

getMultiConditionalOperator

public com.bea.p13n.expression.schema.MultiConditionalOperator getMultiConditionalOperator()
Get the top-most multi-conditional-operator (should be <multi-and> or <multi-or>).


getOuterJoin

public PropertyContainer.JoinType getOuterJoin()
Get the outer join logic (AND to require matching all event types, OR to require any event type).


getEventTypes

public String[] getEventTypes()
Get the event types names this clause checks.


getEventTypesNoCache

protected String[] getEventTypesNoCache()

setEventTypes

protected void setEventTypes(String[] eventTypes,
                             boolean forceSet)
Set the event types this clause checks.

Parameters
segments - the list of event types.
forceSet - true to force setting the segments in the xml structure (and no property change event will be fired this case), false to not do if new segments same as old (regular behavior).

setEventTypes

public void setEventTypes(String... eventTypes)
Set the event types this clause checks.


determineIsComplete

protected boolean determineIsComplete()
Determine if this model is complete. EventTypeModels are complete is they have at least 1 segment name specified.

Overrides:
determineIsComplete in class XmlObjectModel


Copyright © 2011, Oracle. All rights reserved.