Class AbstractWidgetController
java.lang.Object
de.hybris.platform.cockpit.widgets.controllers.impl.AbstractWidgetController
- All Implemented Interfaces:
WidgetController
Class intended to be used as a base class when implementing custom
WidgetControllers.
Provides common method implementations for handling CockpitEventAcceptors as well as for dispatching widget
events.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCockpitEventAcceptor(String context, CockpitEventAcceptor acceptor) Registers the event acceptor acceptor so that it receives notifications when an event with the matching context context is dispatched.protected voiddispatchEvent(String context, WidgetEvent event) Convenience method for notifying all event acceptors which are registered for events with the context codecontext.abstract voidNotifies all event acceptors which are registered for events with the context code context.protected Map<String,List<CockpitEventAcceptor>> voidremoveCockpitEventAcceptor(String context, CockpitEventAcceptor acceptor) Unregisters the event acceptor acceptor for events with the specified context code context .voidSets the event acceptors to register with this controller.
-
Constructor Details
-
AbstractWidgetController
public AbstractWidgetController()
-
-
Method Details
-
getAcceptors
-
addCockpitEventAcceptor
Description copied from interface:WidgetControllerRegisters the event acceptor acceptor so that it receives notifications when an event with the matching context context is dispatched.- Specified by:
addCockpitEventAcceptorin interfaceWidgetController- Parameters:
context- event contextacceptor- event acceptor
-
removeCockpitEventAcceptor
Description copied from interface:WidgetControllerUnregisters the event acceptor acceptor for events with the specified context code context .- Specified by:
removeCockpitEventAcceptorin interfaceWidgetController- Parameters:
context- event contextacceptor- event acceptor
-
setCockpitEventAcceptors
Description copied from interface:WidgetControllerSets the event acceptors to register with this controller.- Specified by:
setCockpitEventAcceptorsin interfaceWidgetController- Parameters:
accMap- acceptor map where the key is the controller context code and the value a list of acceptors
-
dispatchEvent
Description copied from interface:WidgetControllerNotifies all event acceptors which are registered for events with the context code context.- Specified by:
dispatchEventin interfaceWidgetController- Parameters:
context- event contextsource- event sourcedata- parameters to be be passed to registered listeners
-
dispatchEvent
Convenience method for notifying all event acceptors which are registered for events with the context codecontext.- Parameters:
context- event contextevent- widget event- See Also:
-