|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.object.PersistentObject
com.waveset.object.Rule
An object representing a rule.
Rules are essentially functions that compute a value. The value may be a static value, or may be calculated by an expression. Rules are run within an environment provided by the application. Rule expressions may reference variables whose values are supplied by the environment.
Rules may also formally declare arguments that are expected to have values in the environment.
Nested Class Summary | |
static class |
Rule.Argument
Class describing a declared rule argument. |
class |
Rule.RuleResolver
An ExResolver implementation we install in the ExState to handle references to rule arguments. |
static class |
Rule.RuleState
An default ExState that serves as the callback handler for resolving external references within the rule expression. |
Nested classes inherited from class com.waveset.object.PersistentObject |
PersistentObject.Comparator, PersistentObject.InitialInstance |
Field Summary | |
static java.lang.String |
ATT_AUTHORIZE
|
static java.lang.String |
ATT_FIXED
|
static java.lang.String |
ATT_LOCAL_SCOPE
|
static java.lang.String |
ATT_NAME
|
static java.lang.String |
code_id
|
static java.lang.String |
EL_ACCESS_LIST
|
static java.lang.String |
EL_COMMENTS
|
static java.lang.String |
EL_DESCRIPTION
|
static java.lang.String |
EL_RUNAS
|
static java.lang.String |
EL_VALUE
|
Fields inherited from class com.waveset.object.PersistentObject |
trace |
Constructor Summary | |
Rule()
Builds an empty Rule eagerly awaiting you to fill it. |
|
Rule(org.w3c.dom.Element e)
Builds a Rule from XML. |
Method Summary | |
static AttributeCondition[] |
accountConfirmationRules()
|
static AttributeCondition[] |
accountCorrelationRules()
|
void |
addArgument(Rule.Argument arg)
|
protected void |
addSubclassAttributes(java.lang.StringBuffer b)
Each concrete subclass may append to the buffer an XML representation of any fields it adds to PersistentObject (if those field values must persist). |
static java.util.Map |
convertRuleArguments(java.util.List arglist)
A static utility method to convert an List of argument values produced by evaluating the children of a |
java.lang.Object |
eval(ExState state)
|
java.lang.Object |
eval(ExState state,
java.util.List args)
|
java.lang.Object |
eval(ExState state,
java.util.Map args)
Evaluate the rule in a given expression environment. |
java.lang.Object |
eval(java.util.Map map)
Evaluates the rule against a Map or GenericObject. |
java.lang.Object |
eval(WSUser user)
Evaluates the rule against a WSUser object. |
java.lang.Object |
eval(WSUser user,
WSUser user2)
Evaluates the rule for a pair of users. |
static AttributeCondition[] |
excludedResourceAccountsRules()
|
static Rule |
findRule(ObjectCache cache,
java.lang.String name)
|
static Rule |
findRule(ObjectCache cache,
java.lang.String name,
Rule parent)
Utility to locate a Rule by name within a cache. |
java.util.List |
getAccessList()
|
java.util.Map |
getArgumentMap()
|
java.util.List |
getArguments()
|
protected WSAttribute |
getAttributeValues(java.lang.String attrName)
|
java.lang.String |
getComments()
|
java.lang.String |
getDescription()
|
ExNode |
getExpression()
Get the rule expression. |
Library |
getLibrary()
Gets the library. |
com.sun.idm.debugger.common.Location |
getLocation()
|
java.util.ArrayList |
getReferences()
Return the list of references within this object. |
ObjectRef |
getRunAsRef()
|
Type |
getType()
Returns the associated Type object. |
java.lang.Object |
getValue()
Get the fixed rule value. |
java.util.List |
listSummaryAttributes()
Returns the complete list of defined attributes
that this type of persistent object exposes as summary attributes
(regardless of whether this particular object has a value for each). |
protected void |
parseSubclassAttributes(org.w3c.dom.Element e)
Each concrete subclass should parse from the XML buffer any persisted subclass-specific fields (generally, the same ones that it writes into the buffer). |
protected void |
parseSubclassElements(org.w3c.dom.Element e)
Each concrete subclass should parse from the XML buffer any persisted subclass-specific elements (generally, the same ones that it writes into the buffer). |
void |
setAccessList(java.util.List l)
|
void |
setArguments(java.util.List args)
|
void |
setComments(java.lang.String s)
|
void |
setDescription(java.lang.String s)
|
void |
setExpression(ExNode exp)
|
void |
setLibrary(Library lib)
Remember the Library that holds this Rule. |
void |
setLocation(com.sun.idm.debugger.common.Location l)
|
void |
setRunAsRef(ObjectRef ref)
|
void |
setTrace(boolean t)
Control debugging trace messages. |
void |
setValue(java.lang.Object o)
|
static AttributeCondition[] |
taskScheduleRepetitionRules()
|
void |
toXml(java.lang.StringBuffer b)
This is what PersistentObject.toXml calls. |
void |
toXml(java.lang.StringBuffer b,
int indent)
This is what XmlObjectFactory calls. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.waveset.object.Library.Member |
getName |
Field Detail |
public static final java.lang.String code_id
public static final java.lang.String ATT_NAME
public static final java.lang.String ATT_FIXED
public static final java.lang.String ATT_LOCAL_SCOPE
public static final java.lang.String ATT_AUTHORIZE
public static final java.lang.String EL_DESCRIPTION
public static final java.lang.String EL_ACCESS_LIST
public static final java.lang.String EL_COMMENTS
public static final java.lang.String EL_VALUE
public static final java.lang.String EL_RUNAS
Constructor Detail |
public Rule()
public Rule(org.w3c.dom.Element e) throws WavesetException
Method Detail |
public void setExpression(ExNode exp)
public void setValue(java.lang.Object o)
public void setDescription(java.lang.String s)
public void setComments(java.lang.String s)
public void setArguments(java.util.List args)
public void addArgument(Rule.Argument arg)
public java.util.List getAccessList()
public void setAccessList(java.util.List l)
public void setTrace(boolean t)
setTrace
in class PersistentObject
public ObjectRef getRunAsRef()
public void setRunAsRef(ObjectRef ref)
public void setLocation(com.sun.idm.debugger.common.Location l)
setLocation
in interface com.sun.idm.debugger.common.Locatable
public com.sun.idm.debugger.common.Location getLocation()
getLocation
in interface com.sun.idm.debugger.common.Locatable
public void setLibrary(Library lib)
setLibrary
in interface Library.Member
public Library getLibrary()
Library.Member
getLibrary
in interface Library.Member
public static Rule findRule(ObjectCache cache, java.lang.String name, Rule parent) throws WavesetException
WavesetException
public static Rule findRule(ObjectCache cache, java.lang.String name) throws WavesetException
WavesetException
public static AttributeCondition[] accountCorrelationRules()
public static AttributeCondition[] accountConfirmationRules()
public static AttributeCondition[] excludedResourceAccountsRules()
public static AttributeCondition[] taskScheduleRepetitionRules()
public Type getType()
getType
in class PersistentObject
public java.util.ArrayList getReferences()
getReferences
in class PersistentObject
public ExNode getExpression()
public java.lang.Object getValue()
public java.lang.String getDescription()
public java.lang.String getComments()
public java.util.List getArguments()
public java.util.Map getArgumentMap()
public static java.util.Map convertRuleArguments(java.util.List arglist)
public java.lang.Object eval(ExState state, java.util.Map args) throws WavesetException
WavesetException
public java.lang.Object eval(ExState state) throws WavesetException
WavesetException
public java.lang.Object eval(ExState state, java.util.List args) throws WavesetException
WavesetException
public java.lang.Object eval(java.util.Map map) throws WavesetException
WavesetException
public java.lang.Object eval(WSUser user) throws WavesetException
WavesetException
public java.lang.Object eval(WSUser user, WSUser user2) throws WavesetException
WavesetException
public void toXml(java.lang.StringBuffer b)
toXml
in class PersistentObject
public void toXml(java.lang.StringBuffer b, int indent)
toXml
in interface XmlObject
toXml
in class PersistentObject
protected void addSubclassAttributes(java.lang.StringBuffer b)
PersistentObject
NOTE: Any subclass that overrides this method must similarly override parseSubclassAttributes() so that the subclass attributes are restored.
addSubclassAttributes
in class PersistentObject
protected void parseSubclassAttributes(org.w3c.dom.Element e) throws WavesetException
PersistentObject
parseSubclassAttributes
in class PersistentObject
WavesetException
PersistentObject's default implementation is a no-op.
,
PersistentObject.parseXml(Element)
protected void parseSubclassElements(org.w3c.dom.Element e) throws WavesetException
PersistentObject
parseSubclassElements
in class PersistentObject
WavesetException
PersistentObject's default implementation is a no-op.
,
PersistentObject.parseXml(Element)
public java.util.List listSummaryAttributes()
PersistentObject
defined attributes
that this type of persistent object exposes as summary attributes
(regardless of whether this particular object has a value for each).
Any subclass of PersistentObject that overrides this method
should first invoke super.listSummaryAttributes()
to ensure that the subclass includes summary attributes
that are common to all PersistentObjects.
Any subclass that overrides this implementation must also consider the length of the summary string that will be generated from these attributes.
listSummaryAttributes
in class PersistentObject
defined attributes
that this type of PersistentObject exposes as summary attributes
(regardless of whether this object has a value for each).
Any subclass of PersistentObject that overrides this method
should first invoke super.getSummaryAttributes()
to ensure that the subclass includes summary attributes
that are common to all PersistentObjects.
Constants.MAX_SUMMARY_STRING_LENGTH
,
PersistentObject.getSummaryString()
protected WSAttribute getAttributeValues(java.lang.String attrName)
getAttributeValues
in class PersistentObject
attrName
- - the (name of the) attribute for which to return values.
WSAttribute
that represents the value (or values)
that this object contains for the specified attribute
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |