|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.util.EventObject
|
+--com.opencms.flex.CmsEvent
Event class for OpenCms for system wide events that are thrown by various
operations (e.g. publishing) and can be catched and processed by
classes that implement the I_CmsEventListener interface.
I_CmsEventListener,
Serialized Form| Field Summary |
| Fields inherited from class java.util.EventObject |
source |
| Constructor Summary | |
CmsEvent(CmsObject cms,
int type,
Map data)
Construct a new CmsEvent with the specified parameters, this constructor just calls this(cms, type, data, false). |
|
CmsEvent(CmsObject cms,
int type,
Map data,
boolean isClusterEvent)
Construct a new CmsEvent with the specified parameters. |
|
| Method Summary | |
CmsObject |
getCmsObject()
Provides access to the CmsObject that was passed with this event. |
Map |
getData()
Provides access to the event data that was passed with this event. |
int |
getType()
Provides access to the event type that was passed with this event. |
boolean |
isClusterEvent()
Check whether this event should be forwarded to the other servers in the cluster or not. |
void |
setClusterEvent(boolean value)
Set the boolean flag whether this event should be forwarded to the other servers in the cluster. |
String |
toString()
Return a String representation of this CmsEvent. |
| Methods inherited from class java.util.EventObject |
getSource |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public CmsEvent(CmsObject cms,
int type,
Map data)
this(cms, type, data, false).
cms - CmsObject on which this event occurredtype - event typedata - event data
public CmsEvent(CmsObject cms,
int type,
Map data,
boolean isClusterEvent)
The event data Map provides a facility to
pass objects with the event that contain information about
the event environment. For example, if the event is of type
I_CmsEventListener.EVENT_LOGIN_USER the Map contains
a single object with the key "data" and a value
that is the OpenCms user object that represents the user that just logged in.
If isClusterEvent is true,
the event should be forwarded to all servers in the OpenCms cluster.
If it is false, is is important only for server
running this instance of OpenCms.
cms - CmsObject on which this event occurredtype - event typedata - event dataisClusterEvent - must be true if this event should be forwarded
to the other servers in the clusterI_CmsEventListener| Method Detail |
public Map getData()
public CmsObject getCmsObject()
public int getType()
Event types of the core OpenCms classes are defined in I_CmsEventListener.
For your extensions, you should define them in a central class
or interface as public member variables. Make sure the integer values
do not confict with the values from the core classes.
I_CmsEventListenerpublic String toString()
toString in class EventObjectpublic void setClusterEvent(boolean value)
value - true if this event should be forwarded to the other
servers in the cluster, false otherwisepublic boolean isClusterEvent()
true if this event should be forwarded to the other servers
in the cluster, false otherwise
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||