|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jaxfront.core.rule.GlobalRule
public class GlobalRule
The Rule class extends the xml schema definition for more interactive behaviour! This is necessary because of the limitations of the XML Schema Specifiation. The rule class is implementation of the ECA (Event - Condition - Action) paradigma known from active database theory. Rules can only be definied in the xui specification.A rule will allways triggered by an event. Following events are possible: saveDocument -> fired calling serialization() on the Document class initialisation -> fired on initial document load or if a new Element will be added to the Document propertyChange -> fired on valueChanges A rule gets evaluated after the occurance of an event. If all conditions (in this version the relation between conditions are always a boolean AND) are evaluated as true, all defined actions get performed.
Condition
,
AbstractAction
,
Serialized FormField Summary | |
---|---|
static java.lang.String |
UNDEFINED_EVENT
|
Constructor Summary | |
---|---|
GlobalRule(java.lang.String id,
Type source,
java.lang.String executionMode)
|
Method Summary | |
---|---|
void |
apply(Type eventSource)
Applies ECA behaviour for the given sourceType |
void |
apply(Type eventSource,
boolean isRunningAsServer)
Applies ECA behaviour for the given sourceType. |
java.lang.Object |
clone(Type newSource)
|
java.util.List |
getActions()
Returns the actions for this rule. |
ConditionExpression |
getCondition()
Returns the defined condition for this rule. |
java.lang.String |
getExecutionMode()
|
java.lang.String |
getId()
|
Type |
getSource()
Returns the source of this E-C-A rule. |
void |
release()
Release all allocated resources for this rule. |
void |
setCondition(ConditionExpression condition)
Sets the condition of this rule. |
void |
setSource(Type type)
|
java.lang.String |
toString()
Returns a short description of the sourceType, eventType and all registered Conditions and Events |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String UNDEFINED_EVENT
Constructor Detail |
---|
public GlobalRule(java.lang.String id, Type source, java.lang.String executionMode)
Method Detail |
---|
public void apply(Type eventSource)
public void apply(Type eventSource, boolean isRunningAsServer)
isRunningAsServer
- defines if this rule should be applied in server modepublic java.util.List getActions()
public ConditionExpression getCondition()
public Type getSource()
public void release()
public void setCondition(ConditionExpression condition)
condition
- condition for this rulepublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone(Type newSource)
public void setSource(Type type)
public java.lang.String getExecutionMode()
public java.lang.String getId()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |