org.openbp.guiclient.model
Class ModelConnectorEvent

java.lang.Object
  extended by org.openbp.guiclient.model.ModelConnectorEvent
All Implemented Interfaces:
java.io.Serializable, ObserverEvent

public class ModelConnectorEvent
extends java.lang.Object
implements ObserverEvent, java.io.Serializable

A model connector event is triggered whenever there is a change to the model model. model connector events can be subscribed by register an observer with the model model using the ModelConnector.registerObserver(org.openbp.common.util.observer.EventObserver, java.lang.String[]) method.

Author:
Heiko Erhardt
See Also:
Serialized Form

Field Summary
protected  java.lang.String eventType
          Event type (see the constants of this class)
static java.lang.String ITEM_ADDED
          An item has been added
static java.lang.String ITEM_BATCH
          Some batch operation has been performed on several items
static java.lang.String ITEM_REMOVED
          An item has been removed
static java.lang.String ITEM_RENAMED
          An item has been renamed
static java.lang.String ITEM_UPDATED
          An item has been updated
static java.lang.String MODEL_ADDED
          A model has been added
static java.lang.String MODEL_BATCH
          Some batch operation has been performed on several models
static java.lang.String MODEL_REMOVED
          A model has been removed
static java.lang.String MODEL_RENAMED
          A model has been renamed
static java.lang.String MODEL_UPDATED
          A model has been updated
static java.lang.String MODELS_LOADED
          The models have been initially loaded; This event is being called at startup and after a reload operation
static java.lang.String[] SUPPORTED_EVENT_TYPES
           
 
Constructor Summary
ModelConnectorEvent()
          Default constructor.
ModelConnectorEvent(java.lang.String eventType)
          Value constructor.
ModelConnectorEvent(java.lang.String eventType, ModelQualifier qualifier)
          Value constructor.
ModelConnectorEvent(java.lang.String eventType, ModelQualifier qualifier, ModelQualifier previousQualifier)
          Value constructor.
 
Method Summary
 java.lang.String getEventType()
          Gets the event type (see the constants of this class).
 ModelQualifier getPreviousQualifier()
          Gets the previous model qualifier of the model or item in case of a rename operation.
 ModelQualifier getQualifier()
          Gets the jOI of the model or item concerned by this event or null for the MODELS_LOADED event.
static java.lang.String[] getSupportedEventTypes()
          Returns a list of supported event types.
 boolean shallSkipSubsequentObservers()
          Template method that signalizes if subsequent observers shall be skipped.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MODELS_LOADED

public static final java.lang.String MODELS_LOADED
The models have been initially loaded; This event is being called at startup and after a reload operation

See Also:
Constant Field Values

MODEL_BATCH

public static final java.lang.String MODEL_BATCH
Some batch operation has been performed on several models

See Also:
Constant Field Values

MODEL_ADDED

public static final java.lang.String MODEL_ADDED
A model has been added

See Also:
Constant Field Values

MODEL_UPDATED

public static final java.lang.String MODEL_UPDATED
A model has been updated

See Also:
Constant Field Values

MODEL_REMOVED

public static final java.lang.String MODEL_REMOVED
A model has been removed

See Also:
Constant Field Values

MODEL_RENAMED

public static final java.lang.String MODEL_RENAMED
A model has been renamed

See Also:
Constant Field Values

ITEM_BATCH

public static final java.lang.String ITEM_BATCH
Some batch operation has been performed on several items

See Also:
Constant Field Values

ITEM_ADDED

public static final java.lang.String ITEM_ADDED
An item has been added

See Also:
Constant Field Values

ITEM_UPDATED

public static final java.lang.String ITEM_UPDATED
An item has been updated

See Also:
Constant Field Values

ITEM_REMOVED

public static final java.lang.String ITEM_REMOVED
An item has been removed

See Also:
Constant Field Values

ITEM_RENAMED

public static final java.lang.String ITEM_RENAMED
An item has been renamed

See Also:
Constant Field Values

SUPPORTED_EVENT_TYPES

public static final java.lang.String[] SUPPORTED_EVENT_TYPES

eventType

protected java.lang.String eventType
Event type (see the constants of this class)

Constructor Detail

ModelConnectorEvent

public ModelConnectorEvent()
Default constructor.


ModelConnectorEvent

public ModelConnectorEvent(java.lang.String eventType)
Value constructor.

Parameters:
eventType - Event type (see the constants of this class)

ModelConnectorEvent

public ModelConnectorEvent(java.lang.String eventType,
                           ModelQualifier qualifier)
Value constructor.

Parameters:
eventType - Event type (see the constants of this class)
qualifier - Model qualifier of the model or item concerned by this event or null for the MODELS_LOADED event

ModelConnectorEvent

public ModelConnectorEvent(java.lang.String eventType,
                           ModelQualifier qualifier,
                           ModelQualifier previousQualifier)
Value constructor.

Parameters:
eventType - Event type (see the constants of this class)
qualifier - Model qualifier of the model or item concerned by this event or null for the MODELS_LOADED event
previousQualifier - Previous model qualifier of the model or item in case of a rename operation
Method Detail

getSupportedEventTypes

public static final java.lang.String[] getSupportedEventTypes()
Returns a list of supported event types.


toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
The multi-line string includes the event type and all information that is present in respect to this type.

getEventType

public java.lang.String getEventType()
Gets the event type (see the constants of this class).

Specified by:
getEventType in interface ObserverEvent

shallSkipSubsequentObservers

public boolean shallSkipSubsequentObservers()
Template method that signalizes if subsequent observers shall be skipped.

Specified by:
shallSkipSubsequentObservers in interface ObserverEvent
Returns:
true to break the observer calling loop for this event

getQualifier

public ModelQualifier getQualifier()
Gets the jOI of the model or item concerned by this event or null for the MODELS_LOADED event.

Returns:
The qualifier will be null for MODELS_LOADED, MODEL_BATCH and ITEM_BATCH events

getPreviousQualifier

public ModelQualifier getPreviousQualifier()
Gets the previous model qualifier of the model or item in case of a rename operation.



Copyright © 2011. All Rights Reserved.