Package com.hybris.cockpitng.engine.impl
Interface ComponentWidgetAdapter
-
- All Known Implementing Classes:
DefaultComponentWidgetAdapter
public interface ComponentWidgetAdapterRepresents an adapter that is responsible for communication with widgets. Allows you to send data to output sockets, as well reacts on registered input sockets. Should be used in 'non-widget' aware components (e.g. actions, editors) to provide a widget related functionality.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringWIDGET_STUB_PREFIX
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddSocketInputEventListener(java.lang.String socketId, org.zkoss.zk.ui.event.EventListener<SocketEvent> eventListener)Registers an eventListener for input socket with the given ID.voidhandleSocketInputEvent(SocketEvent socketInputEvent)Handles a socket input event sent to thisComponentWidgetAdapterAwareinstance from outside.voidregisterStubInstance(java.lang.String componentId, ComponentWidgetAdapterAware parent)Registers a particular stub widget instance for given 'non-widget' aware componentvoidsendOutput(java.lang.String socketId, java.lang.Object data, ComponentWidgetAdapterAware parent)Sends data to the output socked with the given ID.voidunregisterStubInstance()Unregisters a particular stub widget instance associated with current instance ofComponentWidgetAdapter
-
-
-
Field Detail
-
WIDGET_STUB_PREFIX
static final java.lang.String WIDGET_STUB_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
sendOutput
void sendOutput(java.lang.String socketId, java.lang.Object data, ComponentWidgetAdapterAware parent)Sends data to the output socked with the given ID.- Parameters:
socketId- output socket ID to sent the data todata- the data to be sent
-
addSocketInputEventListener
void addSocketInputEventListener(java.lang.String socketId, org.zkoss.zk.ui.event.EventListener<SocketEvent> eventListener)Registers an eventListener for input socket with the given ID.- Parameters:
socketId- output socket ID to sent the data toeventListener- event listener that is invoked when socket input event comes
-
registerStubInstance
void registerStubInstance(java.lang.String componentId, ComponentWidgetAdapterAware parent)Registers a particular stub widget instance for given 'non-widget' aware component- Parameters:
componentId- given component id e.g. editor id, action idparent- the parent for registered stub widget instance
-
unregisterStubInstance
void unregisterStubInstance()
Unregisters a particular stub widget instance associated with current instance ofComponentWidgetAdapter
-
handleSocketInputEvent
void handleSocketInputEvent(SocketEvent socketInputEvent)
Handles a socket input event sent to thisComponentWidgetAdapterAwareinstance from outside.- Parameters:
socketInputEvent- a socket input event
-
-