|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
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
public abstract class ClauseModel
Base class for all models that can be clauses in xml.
This provides support for initializing the model from an XmlObject and for maintain state about clause completeness.
After constructing an instance of a ClauseModel, one of the initializing methods setXmlObject(java.lang.String, org.apache.xmlbeans.XmlObject)
or initializeNew(java.lang.String)
must be called before the ClauseModel will be usefull.
A single ClauseModel subclass may support multiple clause types via the clauseType
parameter passed to the initializing methods setXmlObject(java.lang.String, org.apache.xmlbeans.XmlObject)
and initializeNew(java.lang.String)
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.bea.p13n.model.Model |
---|
Model.ChangeEvent, Model.ChangeListener, Model.ChangeSupport, Model.Debug |
Field Summary | |
---|---|
protected String |
clauseType The clause type. |
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 | |
---|---|
ClauseModel() |
Method Summary | |
---|---|
static com.bea.p13n.expression.schema.Branch |
addBranch(com.bea.p13n.expression.schema.support.OpenAttributeType operator, com.bea.p13n.expression.schema.Branch o) Add a operator object to the Binary, Conditional, Equality, MultiArg, MultiConditional, or MethodArgumentList. |
static org.apache.xmlbeans.XmlObject |
addLiteral(com.bea.p13n.expression.schema.support.OpenAttributeType operator, org.apache.xmlbeans.XmlObject l) Add a literal object to the Binary, Conditional, Equality, MultiArg, MultiConditional, RelationalOperator, or MethodArgumentList. |
static com.bea.p13n.expression.schema.Method |
addMethod(com.bea.p13n.expression.schema.support.OpenAttributeType operator, com.bea.p13n.expression.schema.Method m) Add a method object to the Binary, Conditional, Equality, MultiArg, MultiConditional, RelationalOperator, or MethodArgumentList. |
static com.bea.p13n.expression.schema.support.OpenAttributeType |
addMethodOrOperator(com.bea.p13n.expression.schema.support.OpenAttributeType operator, com.bea.p13n.expression.schema.support.OpenAttributeType o) Add the specified operator or method to the specified operator-type object. |
static com.bea.p13n.expression.schema.Operator |
addOperator(com.bea.p13n.expression.schema.support.OpenAttributeType operator, com.bea.p13n.expression.schema.Operator o) Add a operator object to the Binary, Conditional, Equality, MultiArg, MultiConditional, or MethodArgumentList. |
static com.bea.p13n.expression.schema.VariableDocument.Variable |
addVariable(com.bea.p13n.expression.schema.support.OpenAttributeType operator, com.bea.p13n.expression.schema.VariableDocument.Variable v) Add a variable object to the Binary, Conditional, Equality, MultiArg, MultiConditional, RelationalOperator, or MethodArgumentList. |
static com.bea.p13n.expression.schema.VariableBindingDocument.VariableBinding |
addVariableBinding(com.bea.p13n.expression.schema.support.OpenAttributeType operator, com.bea.p13n.expression.schema.VariableBindingDocument.VariableBinding v) Add a variable binding object to the Binary, Conditional, Equality, MultiArg, MultiConditional, or MethodArgumentList. |
Model |
copy() Make a new copy of this model, initialized with a copy of our root xml object . |
abstract org.apache.xmlbeans.XmlObject |
createNewXmlObject(String clauseType) Create a new, empty root object for the specified clauseType. |
String |
getClauseType() Get the clause type of this clause. |
RuleModel |
getContainingRuleModel() Return the RuleModel which contains this clause. |
protected org.apache.xmlbeans.XmlObject |
getCopyXmlObject() Get a copy of our root xml object. |
void |
initializeNew(String clauseType) Initialize this object with a new, empty root object. |
boolean |
isInActions() Is this clause under a rule's actions. |
boolean |
isInConditions() Is this clause under a rule's conditions. |
static boolean |
isValidTypeAlias(String str) Check if the specified str is a valid type-alias value. |
static boolean |
isValidVariableName(String str) Check if the specified str is a valid variable name value. |
static org.apache.xmlbeans.XmlObject |
makeSafeCopy(org.apache.xmlbeans.XmlObject root) Get a copy of a root xml object. |
void |
setXmlObject(String clauseType, org.apache.xmlbeans.XmlObject clause) Initialize this clause model with a type and a root object. |
String |
toString() |
Methods inherited from class com.bea.p13n.model.XmlObjectModel |
---|
checkElement, childAdded, childRemoved, clearCachedData, determineIsComplete, 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 |
---|
protected String clauseType
Constructor Detail |
---|
public ClauseModel()
Method Detail |
---|
public void setXmlObject(String clauseType, org.apache.xmlbeans.XmlObject clause) throws IllegalArgumentException
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 ClauseModels are valid after a call to this method which throws an exception, although the caller could recall this method with valid data.
clauseType
- the clause type of the clause.clause
- the root xml object of the clause.IllegalArgumentException
- thrown if the clause is not valid for the ClauseModel or clauseType.public void initializeNew(String clauseType) throws IllegalArgumentException
This will call setXmlObject(java.lang.String, org.apache.xmlbeans.XmlObject)
with the value from #createXmlObject
. Subclasses generally shouldn't need to override this.
clauseType
- the clause type of the clause.IllegalArgumentException
- thrown on an unsupported clauseType.setXmlObject(java.lang.String, org.apache.xmlbeans.XmlObject)
, createNewXmlObject(java.lang.String)
public abstract org.apache.xmlbeans.XmlObject createNewXmlObject(String clauseType) throws IllegalArgumentException
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 setXmlObject(java.lang.String, org.apache.xmlbeans.XmlObject)
for the specified clauseType.
clauseType
- the clause type of the clause.IllegalArgumentException
- thrown on an unsupproted clauseType.public Model copy()
root xml object
.copy
in class Model
protected org.apache.xmlbeans.XmlObject getCopyXmlObject()
getCopyXmlObject
in class XmlObjectModel
makeSafeCopy(XmlObject)
public static final org.apache.xmlbeans.XmlObject makeSafeCopy(org.apache.xmlbeans.XmlObject root)
public String getClauseType()
public String toString()
toString
in class Object
public boolean isInConditions()
public boolean isInActions()
public RuleModel getContainingRuleModel()
public static boolean isValidTypeAlias(String str)
public static boolean isValidVariableName(String str)
public static com.bea.p13n.expression.schema.Method addMethod(com.bea.p13n.expression.schema.support.OpenAttributeType operator, com.bea.p13n.expression.schema.Method m)
public static com.bea.p13n.expression.schema.VariableDocument.Variable addVariable(com.bea.p13n.expression.schema.support.OpenAttributeType operator, com.bea.p13n.expression.schema.VariableDocument.Variable v)
public static com.bea.p13n.expression.schema.VariableBindingDocument.VariableBinding addVariableBinding(com.bea.p13n.expression.schema.support.OpenAttributeType operator, com.bea.p13n.expression.schema.VariableBindingDocument.VariableBinding v)
public static com.bea.p13n.expression.schema.Operator addOperator(com.bea.p13n.expression.schema.support.OpenAttributeType operator, com.bea.p13n.expression.schema.Operator o)
public static com.bea.p13n.expression.schema.Branch addBranch(com.bea.p13n.expression.schema.support.OpenAttributeType operator, com.bea.p13n.expression.schema.Branch o)
public static org.apache.xmlbeans.XmlObject addLiteral(com.bea.p13n.expression.schema.support.OpenAttributeType operator, org.apache.xmlbeans.XmlObject l)
public static com.bea.p13n.expression.schema.support.OpenAttributeType addMethodOrOperator(com.bea.p13n.expression.schema.support.OpenAttributeType operator, com.bea.p13n.expression.schema.support.OpenAttributeType o)
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010, Oracle. All rights reserved.