com.jaxfront.core.rule
Interface Rule

All Known Implementing Classes:
RuleImpl, SimpleRuleImpl

public interface Rule


Field Summary
static long ABOUT_TO_PERSIST
           
static long CHANGE
          Indicates if this rule is of type change.
static long CHANGE_AND_INITIALIZATION
          Indicates if this rule is of type change & initialization.
static long COPYCONTENT
           
static long DOM_DELETED
           
static long DOM_INITIALIZED
           
static long LIST_ITEM_DESELECTED
           
static long LIST_ITEM_SELECTED
           
static long NONE
           
static long ONCREATE
          Indicates if this rule is of type on creation time of visualizer.
static long PASTECONTENT
           
static long PERSISTENT
           
static long PROPERTYCHANGE
          Indicates if this rule is of type property change.
static long SAVEDOCUMENT
          Indicates if this rule is of type save document.
static long STRUCTURE_CHANGE
          Indicates if this rule is of type structure change.
static long STRUCTURE_CHANGE_ADD
          Indicates if this rule is of type structure change (add).
static long STRUCTURE_CHANGE_REMOVE
          Indicates if this rule is of type structure change (remove).
static long VISUALIZED
          Indicates if this rule is of type initializisation.
 
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 getId()
           
 int getPriority()
           
 long getRuleType()
          Return the rule type.
 Type getSource()
          Returns the source of this E-C-A rule.
 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()
           
 boolean isDomInitialized()
           
 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 on creation.
 boolean isPasteContentRule()
          Indicates if this rule is of type on creation.
 boolean isPersistentRule()
          Indicates if this rule is of type on persistent.
 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.
 

Field Detail

NONE

static final long NONE
See Also:
Constant Field Values

VISUALIZED

static final long VISUALIZED
Indicates if this rule is of type initializisation.

See Also:
Constant Field Values

CHANGE

static final long CHANGE
Indicates if this rule is of type change.

See Also:
Constant Field Values

CHANGE_AND_INITIALIZATION

static final long CHANGE_AND_INITIALIZATION
Indicates if this rule is of type change & initialization.

See Also:
Constant Field Values

PROPERTYCHANGE

static final long PROPERTYCHANGE
Indicates if this rule is of type property change.

See Also:
Constant Field Values

STRUCTURE_CHANGE_ADD

static final long STRUCTURE_CHANGE_ADD
Indicates if this rule is of type structure change (add).

See Also:
Constant Field Values

STRUCTURE_CHANGE_REMOVE

static final long STRUCTURE_CHANGE_REMOVE
Indicates if this rule is of type structure change (remove).

See Also:
Constant Field Values

STRUCTURE_CHANGE

static final long STRUCTURE_CHANGE
Indicates if this rule is of type structure change.

See Also:
Constant Field Values

DOM_INITIALIZED

static final long DOM_INITIALIZED
See Also:
Constant Field Values

LIST_ITEM_SELECTED

static final long LIST_ITEM_SELECTED
See Also:
Constant Field Values

LIST_ITEM_DESELECTED

static final long LIST_ITEM_DESELECTED
See Also:
Constant Field Values

SAVEDOCUMENT

static final long SAVEDOCUMENT
Indicates if this rule is of type save document.

See Also:
Constant Field Values

ONCREATE

static final long ONCREATE
Indicates if this rule is of type on creation time of visualizer.

See Also:
Constant Field Values

COPYCONTENT

static final long COPYCONTENT
See Also:
Constant Field Values

PASTECONTENT

static final long PASTECONTENT
See Also:
Constant Field Values

PERSISTENT

static final long PERSISTENT
See Also:
Constant Field Values

ABOUT_TO_PERSIST

static final long ABOUT_TO_PERSIST
See Also:
Constant Field Values

DOM_DELETED

static final long DOM_DELETED
See Also:
Constant Field Values
Method Detail

apply

void apply(Type eventSource,
           java.lang.Object event)
Applies ECA behaviour for the given sourceType

Parameters:
event - TODO

apply

void apply(Type eventSource,
           java.lang.Object event,
           boolean isRunningAsServer)
Applies ECA behaviour for the given sourceType. In some circumstances its necessary to apply the rule as temporary (e.g. if a component is displayed as dialog and not committed yet)

Parameters:
event - TODO
isRunningAsServer - defines if this rule should be applied in server mode

doesConcern

boolean doesConcern(Type sourceType)
Indicates if the passing type does concern this rule.

Parameters:
sourceType - source of an occured change
indicates - if the change was a simple property change

getActions

java.util.List getActions()
Returns the actions for this rule.


getCondition

ConditionExpression getCondition()
Returns the defined condition for this rule.


getSource

Type getSource()
Returns the source of this E-C-A rule.


release

void release()
Release all allocated resources for this rule.


getPriority

int getPriority()

getId

java.lang.String getId()

isVisualizerInitializationRule

boolean isVisualizerInitializationRule()
Indicates if this rule is of type initializisation.


isOnCreationRule

boolean isOnCreationRule()
Indicates if this rule is of type on creation.


isCopyContentRule

boolean isCopyContentRule()
Indicates if this rule is of type on copyContent.


isPasteContentRule

boolean isPasteContentRule()
Indicates if this rule is of type on creation.


isPersistentRule

boolean isPersistentRule()
Indicates if this rule is of type on persistent.


isAboutToPersistRule

boolean isAboutToPersistRule()
Indicates if this rule is of type on persistent.


isListItemSelectedRule

boolean isListItemSelectedRule()
Indicates if this rule is of type listtypeselected.


isListItemDeselectedRule

boolean isListItemDeselectedRule()
Indicates if this rule is of type listtypedeselected.


isChangeRule

boolean isChangeRule()
Indicates if this rule is of type change.


isChangeAndInitializationRule

boolean isChangeAndInitializationRule()
Indicates if this rule is of type change & initialization.


isPropertyChangeRule

boolean isPropertyChangeRule()
Indicates if this rule is of type property change.


isStructureChangeRule

boolean isStructureChangeRule()
Indicates if this rule is of type structure change.


isStructureChangeAddRule

boolean isStructureChangeAddRule()
Indicates if this rule is of type structure change (add).


isStructureChangeRemoveRule

boolean isStructureChangeRemoveRule()
Indicates if this rule is of type structure change (remove).


isSaveDocumentRule

boolean isSaveDocumentRule()
Indicates if this rule is of type save document.


isDomDeletedRule

boolean isDomDeletedRule()

isDomInitialized

boolean isDomInitialized()

getRuleType

long getRuleType()
Return the rule type.


clone

java.lang.Object clone(Type newSource)

setCondition

void setCondition(ConditionExpression condition)
Sets the condition of this rule.

Parameters:
condition - condition for this rule

setPriority

void setPriority(int priority)
Sets the priority of this rule.

Parameters:
priority -

isReleased

boolean isReleased()

apply

void apply(Type eventSource,
           java.lang.Object event,
           boolean isRunningAsServer,
           java.util.Stack callStack)