|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jaxfront.core.rule.RuleImpl
public class RuleImpl
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 | |
|---|---|
RuleImpl(long type,
Type source)
A Rule needs sourceType to be checked against with and a type which specifies the event type. |
|
RuleImpl(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. |
|
RuleImpl(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. |
|
RuleImpl(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. |
|
RuleImpl(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)
Applies ECA behaviour for the given sourceType |
void |
apply(Type eventSource,
java.lang.Object event,
boolean isRunningAsServer)
Applies ECA behaviour for the given sourceType. |
void |
apply(Type eventSource,
java.lang.Object event,
boolean isRunningAsServer,
java.util.Stack callStack)
|
java.lang.Object |
clone(Type newSource)
|
boolean |
doesConcern(Type sourceType)
Indicates if the passing type does concern this rule. |
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()
|
int |
getPriority()
|
long |
getRuleType()
Return the rule type. |
java.lang.String |
getScope()
|
Type |
getSource()
Returns the source of this E-C-A rule. |
long |
getType()
Returns the event type of this rule (propertyChange,saveDocument or initialization) |
boolean |
isAboutToPersistRule()
Indicates if this rule is of type on persistent. |
boolean |
isChangeAndInitializationRule()
Indicates if this rule is of type change & initialization. |
boolean |
isChangeRule()
Indicates if this rule is of type change. |
boolean |
isCopyContentRule()
Indicates if this rule is of type on copyContent. |
boolean |
isDomDeletedRule()
Indicates if this rule is of type save document. |
boolean |
isDomInitialized()
Indicates if the DOM is visualized. |
boolean |
isListItemDeselectedRule()
Indicates if this rule is of type listtypedeselected. |
boolean |
isListItemSelectedRule()
Indicates if this rule is of type listtypeselected. |
boolean |
isOnCreationRule()
Indicates if this rule is of type initializisation. |
boolean |
isPasteContentRule()
Indicates if this rule is of type on creation. |
boolean |
isPersistentRule()
Indicates if this rule is of type save document. |
boolean |
isPropertyChangeRule()
Indicates if this rule is of type property change. |
boolean |
isReleased()
|
boolean |
isSaveDocumentRule()
Indicates if this rule is of type save document. |
boolean |
isStructureChangeAddRule()
Indicates if this rule is of type structure change (add). |
boolean |
isStructureChangeRemoveRule()
Indicates if this rule is of type structure change (remove). |
boolean |
isStructureChangeRule()
Indicates if this rule is of type structure change. |
boolean |
isVisualizerInitializationRule()
Indicates if this rule is of type initializisation. |
void |
release()
Release all allocated resources for this rule. |
void |
setCondition(ConditionExpression condition)
Sets the condition of this rule. |
void |
setPriority(int priority)
Sets the priority 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 |
| Constructor Detail |
|---|
public RuleImpl(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 RuleImpl(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 RuleImpl(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 RuleImpl(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 RuleImpl(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)
Rule
apply in interface Ruleevent - TODO
public void apply(Type eventSource,
java.lang.Object event,
boolean isRunningAsServer)
Rule
apply in interface Ruleevent - TODOisRunningAsServer - defines if this rule should be applied in server mode
public void apply(Type eventSource,
java.lang.Object event,
boolean isRunningAsServer,
java.util.Stack callStack)
apply in interface Rulepublic boolean doesConcern(Type sourceType)
Rule
doesConcern in interface RulesourceType - source of an occured changepublic java.util.List getActions()
Rule
getActions in interface Rulepublic ConditionExpression getCondition()
Rule
getCondition in interface Rulepublic Type getSource()
Rule
getSource in interface Rulepublic long getType()
public boolean isVisualizerInitializationRule()
isVisualizerInitializationRule in interface Rulepublic boolean isOnCreationRule()
isOnCreationRule in interface Rulepublic boolean isChangeRule()
isChangeRule in interface Rulepublic boolean isChangeAndInitializationRule()
isChangeAndInitializationRule in interface Rulepublic boolean isPropertyChangeRule()
isPropertyChangeRule in interface Rulepublic boolean isStructureChangeRule()
isStructureChangeRule in interface Rulepublic boolean isStructureChangeAddRule()
isStructureChangeAddRule in interface Rulepublic boolean isStructureChangeRemoveRule()
isStructureChangeRemoveRule in interface Rulepublic boolean isSaveDocumentRule()
isSaveDocumentRule in interface Rulepublic boolean isDomDeletedRule()
isDomDeletedRule in interface Rulepublic boolean isPersistentRule()
isPersistentRule in interface Rulepublic boolean isAboutToPersistRule()
Rule
isAboutToPersistRule in interface Rulepublic boolean isDomInitialized()
isDomInitialized in interface Rulepublic boolean isListItemSelectedRule()
Rule
isListItemSelectedRule in interface Rulepublic boolean isListItemDeselectedRule()
Rule
isListItemDeselectedRule in interface Rulepublic boolean isCopyContentRule()
Rule
isCopyContentRule in interface Rulepublic boolean isPasteContentRule()
Rule
isPasteContentRule in interface Rulepublic void release()
Rule
release in interface Rulepublic void setCondition(ConditionExpression condition)
setCondition in interface Rulecondition - condition for this rulepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone(Type newSource)
clone in interface Rulepublic void setSource(Type type)
public java.lang.String getScope()
public java.lang.String getExecutionMode()
public int getPriority()
getPriority in interface Rulepublic void setPriority(int priority)
Rule
setPriority in interface Rulepublic java.lang.String getId()
getId in interface Rulepublic long getRuleType()
Rule
getRuleType in interface Rulepublic boolean isReleased()
isReleased in interface Rule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||