|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jaxfront.core.rule.RuleImpl
com.jaxfront.core.rule.SimpleRuleImpl
public class SimpleRuleImpl
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 Form| Field Summary |
|---|
| Fields inherited from interface com.jaxfront.core.rule.Rule |
|---|
ABOUT_TO_PERSIST, CHANGE, CHANGE_AND_INITIALIZATION, COPYCONTENT, DOM_DELETED, DOM_INITIALIZED, LIST_ITEM_DESELECTED, LIST_ITEM_SELECTED, NONE, ONCREATE, PASTECONTENT, PERSISTENT, PROPERTYCHANGE, SAVEDOCUMENT, STRUCTURE_CHANGE, STRUCTURE_CHANGE_ADD, STRUCTURE_CHANGE_REMOVE, VISUALIZED |
| Constructor Summary | |
|---|---|
SimpleRuleImpl(long type,
Type source)
A Rule needs sourceType to be checked against with and a type which specifies the event type. |
|
SimpleRuleImpl(long type,
Type source,
java.lang.String scope)
A Rule needs sourceType to be checked against with and a type which specifies the event type. |
|
SimpleRuleImpl(long type,
Type source,
java.lang.String scope,
boolean doesConcernNoneSerializableSource)
A Rule needs sourceType to be checked against with and a type which specifies the event type. |
|
SimpleRuleImpl(long type,
Type source,
java.lang.String executionMode,
java.lang.String scope,
boolean doesConcernNoneSerializableSource,
boolean doesConcernOnlyVisible)
A Rule needs sourceType to be checked against with and a type which specifies the event type. |
|
SimpleRuleImpl(java.lang.String id,
long type,
Type source,
java.lang.String executionMode,
java.lang.String scope,
boolean doesConcernNoneSerializableSource,
boolean doesConcernOnlyVisible)
|
|
| Method Summary | |
|---|---|
void |
apply(Type eventSource,
java.lang.Object event,
boolean isRunningAsServer)
Applies ECA behaviour for the given sourceType. |
boolean |
doesConcern(Type sourceType)
Indicates if the passing type does concern this rule. |
static Rule |
initializeRule(int counter,
Type ruleDefinition)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleRuleImpl(long type,
Type source)
String - type type of event 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 valueChangessource - source base for the ECA behaviour
public SimpleRuleImpl(long type,
Type source,
java.lang.String scope)
type - type of event save -> 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 valueChangessource - source base for the ECA behaviourscope - defines the scope of this rule in case of an occured event
public SimpleRuleImpl(long type,
Type source,
java.lang.String scope,
boolean doesConcernNoneSerializableSource)
type - type of event save -> 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 valueChangessource - source base for the ECA behaviourscope - defines the scope of this rule in case of an occured eventdoesConcernNoneSerializableSource - apply the rule if the source is not serializable
public SimpleRuleImpl(long type,
Type source,
java.lang.String executionMode,
java.lang.String scope,
boolean doesConcernNoneSerializableSource,
boolean doesConcernOnlyVisible)
type - type of event save -> 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 valueChangessource - source base for the ECA behaviourexecutionMode - place where the rule needs to be executed (client,server or
both)scope - defines the scope of this rule in case of an occured eventdoesConcernNoneSerializableSource - apply the rule if the source is not serializable
public SimpleRuleImpl(java.lang.String id,
long type,
Type source,
java.lang.String executionMode,
java.lang.String scope,
boolean doesConcernNoneSerializableSource,
boolean doesConcernOnlyVisible)
| Method Detail |
|---|
public void apply(Type eventSource,
java.lang.Object event,
boolean isRunningAsServer)
Rule
apply in interface Ruleapply in class RuleImplevent - TODOisRunningAsServer - defines if this rule should be applied in server mode
public static Rule initializeRule(int counter,
Type ruleDefinition)
public boolean doesConcern(Type sourceType)
Rule
doesConcern in interface RuledoesConcern in class RuleImplsourceType - source of an occured change
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||