Package com.hybris.cockpitng.engine
Interface CockpitWidgetEngine
-
- All Known Implementing Classes:
AdminmodeWidgetEngine,DefaultCockpitWidgetEngine
public interface CockpitWidgetEngineThe cockpit widget engine is responsible for injecting the view definitions into the zul page as well as sending socket events between the widgets.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCOMPONENT_RESOURCE_PATH_PARAMstatic java.lang.StringCOMPONENT_ROOT_PARAMstatic java.lang.StringLABELS_PARAMstatic java.lang.StringWIDGET_RESOURCE_PATH_PARAMstatic java.lang.StringWIDGET_ROOT_PARAMAttribute name for the absolute web path (widget root) of the widget definition file and other widget resources, cf.static java.lang.StringWR_PARAMUsed as an alias for WIDGET_ROOT_PARAM
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidcreateWidgetView(Widgetchildren widgetChildren)Same ascreateWidgetView(Widgetchildren, Map)with empty map as second arg.voidcreateWidgetView(Widgetchildren widgetChildrenComponent, java.util.Map<java.lang.String,java.lang.Object> ctx)Creates the view components for the specified widgetchildren slot.voidcreateWidgetView(Widgetslot widgetslot)Creates the view components for the specified widgetslot.default booleanisIndependentView(WidgetDefinition widget, java.lang.String uri)Checks whether provided URL points to widget's view, which is defined as not dependent from ZK framework (i.e.voidsendOutput(Widgetslot widgetslot, java.lang.String outputID)Calls sendOutput(widgetslot, outputID, null)}.voidsendOutput(Widgetslot widgetslot, java.lang.String outputID, java.lang.Object data)Calls sendOutput(widgetslot, outputID, data, false)}.voidsendOutput(Widgetslot widgetslot, java.lang.String outputID, java.lang.Object data, boolean ignoreSockets)Sends an output event from the widget attached to the widgetslot parameter with the given outputID.
-
-
-
Field Detail
-
WR_PARAM
static final java.lang.String WR_PARAM
Used as an alias for WIDGET_ROOT_PARAM- See Also:
- Constant Field Values
-
WIDGET_ROOT_PARAM
static final java.lang.String WIDGET_ROOT_PARAM
Attribute name for the absolute web path (widget root) of the widget definition file and other widget resources, cf.AbstractCockpitComponentDefinition.getLocationPath().- See Also:
- Constant Field Values
-
COMPONENT_ROOT_PARAM
static final java.lang.String COMPONENT_ROOT_PARAM
- See Also:
- Constant Field Values
-
WIDGET_RESOURCE_PATH_PARAM
static final java.lang.String WIDGET_RESOURCE_PATH_PARAM
- See Also:
- Constant Field Values
-
COMPONENT_RESOURCE_PATH_PARAM
static final java.lang.String COMPONENT_RESOURCE_PATH_PARAM
- See Also:
- Constant Field Values
-
LABELS_PARAM
static final java.lang.String LABELS_PARAM
- See Also:
- Constant Field Values
-
-
Method Detail
-
isIndependentView
default boolean isIndependentView(WidgetDefinition widget, java.lang.String uri)
Checks whether provided URL points to widget's view, which is defined as not dependent from ZK framework (i.e. uses pure html or some third party javascript library)- Parameters:
widget- widget definition to be checkeduri- requested URL- Returns:
trueif a URL points to view that is defined as independent
-
createWidgetView
void createWidgetView(Widgetslot widgetslot)
Creates the view components for the specified widgetslot. If no widget is attached to the slot, an error is displayed, otherwise the view representation of the attached widget is injected.
-
createWidgetView
void createWidgetView(Widgetchildren widgetChildrenComponent, java.util.Map<java.lang.String,java.lang.Object> ctx)
Creates the view components for the specified widgetchildren slot. For each matching child widget it creates a container, according to the type of the widgetchildren.
-
createWidgetView
void createWidgetView(Widgetchildren widgetChildren)
Same ascreateWidgetView(Widgetchildren, Map)with empty map as second arg.
-
sendOutput
void sendOutput(Widgetslot widgetslot, java.lang.String outputID)
Calls sendOutput(widgetslot, outputID, null)}.
-
sendOutput
void sendOutput(Widgetslot widgetslot, java.lang.String outputID, java.lang.Object data)
Calls sendOutput(widgetslot, outputID, data, false)}.
-
sendOutput
void sendOutput(Widgetslot widgetslot, java.lang.String outputID, java.lang.Object data, boolean ignoreSockets)
Sends an output event from the widget attached to the widgetslot parameter with the given outputID. This method is finally called fromDefaultWidgetController.sendOutput(String, Object).- Parameters:
widgetslot- The source widget slotoutputID- The output socket iddata- The event dataignoreSockets- If false, the event is only sent if the output socket with outputID exists. Otherwise no check is done and the event is sent. This is only needed for internal use, especially for composed widget internal event handling.
-
-