Package com.hybris.cockpitng.core.events
Interface CockpitEvent
-
- All Known Implementing Classes:
ClearNotificationsEvent,ClearNotificationsEvent,CurrentlyActiveLocalesChangedEvent,DefaultCockpitEvent,ItemsChangedEvent,NotificationEvent,NotificationEvent
public interface CockpitEventInterface representing a cockpit event.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAPPLICATIONThe application event scope is the most global event scope which events are propagated to all other scopes.static java.lang.StringDESKTOPThe desktop event scope is the narrowest available scope.static java.lang.StringSESSIONThe session event scope which events are propagated to the current user on all active desktops within the same session.static java.lang.StringUSERThe user event scope which events are propagated to all sessions of a user.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.ObjectgetData()default java.util.Collection<java.lang.Object>getDataAsCollection()If the object is an instance of Collection then the collection is returned as unmodifiable, when the object is not a Collection then a unmodifiable Collection with the single object is returned, when object is null then empty unmodifiable Collection is returned.java.lang.StringgetName()java.lang.ObjectgetSource()
-
-
-
Field Detail
-
DESKTOP
static final java.lang.String DESKTOP
The desktop event scope is the narrowest available scope. Its events are only defined for a specific desktop. (Scope: 4) e.g. propagation of an event to a single browser tab or just a part of a tab- See Also:
- Constant Field Values
-
USER
static final java.lang.String USER
The user event scope which events are propagated to all sessions of a user. (Scope: 2) e.g. propagation of an event to different machines w/ different tabs of a specific user- See Also:
- Constant Field Values
-
SESSION
static final java.lang.String SESSION
The session event scope which events are propagated to the current user on all active desktops within the same session. (Scope: 3) e.g. propagation of an event to different tabs within the same browser- See Also:
- Constant Field Values
-
APPLICATION
static final java.lang.String APPLICATION
The application event scope is the most global event scope which events are propagated to all other scopes. (Scope: 1)- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
java.lang.String getName()
- Returns:
- The name of the event.
-
getData
java.lang.Object getData()
- Returns:
- The data attached to the event. Can be null.
-
getSource
java.lang.Object getSource()
- Returns:
- The event source, i.e. the object which has fired the event. Can be null.
-
getDataAsCollection
default java.util.Collection<java.lang.Object> getDataAsCollection()
If the object is an instance of Collection then the collection is returned as unmodifiable, when the object is not a Collection then a unmodifiable Collection with the single object is returned, when object is null then empty unmodifiable Collection is returned.
-
-