Package org.opencms.main
Class CmsEvent
java.lang.Object
org.opencms.main.CmsEvent
Event class for OpenCms for system wide events that are thrown by various
operations (e.g. publishing) and can be caught and processed by
classes that implement the
I_CmsEventListener interface.- Since:
- 6.0.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetData()Provides access to the event data that was passed with this event.intgetType()Provides access to the event type that was passed with this event.Provides access to the event type as Integer.inthashCode()Converts the event to a more informative string representation.toString()Return a String representation of this CmsEvent.
-
Constructor Details
-
CmsEvent
Construct a new CmsEvent with the specified parameters.The event data
Mapprovides a facility to pass objects with the event that contain information about the event environment. For example, if the event is of typeI_CmsEventListener.EVENT_LOGIN_USERthe 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.- Parameters:
type- event typedata- event data- See Also:
-
-
Method Details
-
equals
-
getData
Provides access to the event data that was passed with this event.- Returns:
- the event data of this event
-
getType
Provides access to the event type that was passed with this event.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 conflict with the values from the core classes.- Returns:
- the event type of this event
- See Also:
-
getTypeInteger
Provides access to the event type as Integer.- Returns:
- the event type of this event as Integer
-
hashCode
-
toNiceString
Converts the event to a more informative string representation.For logging/debugging.
- Returns:
- the detailed string representation
-
toString
Return a String representation of this CmsEvent.
-