public class DefaultCockpitWidgetEngine extends Object implements CockpitWidgetEngine
| Modifier and Type | Field and Description |
|---|---|
static String |
CP_FWD_EL |
protected org.zkoss.idom.Document |
documentNoView |
protected org.zkoss.idom.Document |
documentWithWidgetSlot |
static String |
FULL_WIDTH |
static String |
HEIGHT |
static String |
MONITOR_WIDGET_COUNTER_ATTRIB |
static String |
ON_CP_FWD_EL |
static String |
SCLASS_WIDGET_BODY |
static String |
SETTING_WIDGET_MOLD |
static String |
SLOT_ID |
static org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> |
STOP_PROPAGATION_LISTENER |
static String |
VIEW_ZUL
Deprecated.
since 1808, use
DefaultCockpitComponentDefinitionService.DEFAULT_VIEW_ZUL instead |
static String |
WIDGET |
static String |
WIDGETSLOT |
static String |
WIDTH |
static String |
Y_TESTID_PATH |
COMPONENT_RESOURCE_PATH_PARAM, COMPONENT_ROOT_PARAM, LABELS_PARAM, WIDGET_RESOURCE_PATH_PARAM, WIDGET_ROOT_PARAM, WR_PARAM| Constructor and Description |
|---|
DefaultCockpitWidgetEngine() |
@Deprecated public static final String VIEW_ZUL
DefaultCockpitComponentDefinitionService.DEFAULT_VIEW_ZUL insteadpublic static final String MONITOR_WIDGET_COUNTER_ATTRIB
public static final String ON_CP_FWD_EL
public static final org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> STOP_PROPAGATION_LISTENER
public static final String WIDGET
public static final String WIDTH
public static final String HEIGHT
public static final String SLOT_ID
public static final String WIDGETSLOT
public static final String FULL_WIDTH
public static final String SCLASS_WIDGET_BODY
public static final String CP_FWD_EL
public static final String SETTING_WIDGET_MOLD
public static final String Y_TESTID_PATH
protected org.zkoss.idom.Document documentWithWidgetSlot
protected org.zkoss.idom.Document documentNoView
public void setNotificationStack(NotificationStack notificationStack)
public void createWidgetView(Widgetslot widgetslot)
CockpitWidgetEnginecreateWidgetView in interface CockpitWidgetEngineprotected boolean checkVisibility(Widget widget)
widget - The widget to check, can be null.protected String getWidgetBodySclass(WidgetInstance widgetInstance)
protected String getWidgetMoldSclass(WidgetInstance widgetInstance, WidgetDefinition definition)
protected void injectWidgetVariables(Object widgetController, WidgetInstanceManager widgetInstanceManager) throws IllegalAccessException
IllegalAccessExceptionprotected void createComponents(Widgetslot widgetslot)
protected void adjustWidgetSclass(WidgetInstance widgetInstance, WidgetDefinition definition, org.zkoss.zk.ui.Component component)
protected org.zkoss.idom.Document getDocumentNoViewWidget()
protected org.zkoss.idom.Document getDocumentWithWidgetSlot()
public Map<String,Object> createLabelMap(WidgetDefinition definition, Widget widget)
protected void renderUnattachedChildren(Widgetslot widgetslot, List<Widget> unattachedChildren)
protected WidgetDefinition getWidgetDefinition(Widget widget)
protected <T> T getComponentDefinition(String widgetId)
protected WidgetInstance getSessionWidgetInstance(String slotId)
protected void setSessionWidgetInstance(WidgetInstance instance, String slotId)
public void sendOutput(Widgetslot widgetslot, String outputID)
CockpitWidgetEnginesendOutput in interface CockpitWidgetEnginepublic void sendOutput(Widgetslot widgetslot, String outputID, Object data)
CockpitWidgetEnginesendOutput in interface CockpitWidgetEnginepublic void sendOutput(Widgetslot widgetslot, String outputId, Object data, boolean ignoreSockets)
CockpitWidgetEngineDefaultWidgetController.sendOutput(String, Object).sendOutput in interface CockpitWidgetEnginewidgetslot - 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.protected boolean isSocketDataTypeValid(Object object, Widget currentWidget, WidgetSocket outputWidgetSocket)
protected boolean isSocketTypeMatching(String socketDataType, WidgetSocket.Multiplicity socketMultiplicity, Object object)
protected WidgetSocket.Multiplicity resolveObjectMultiplicity(Object object)
protected String getOutputSocketTypeMessage(WidgetSocket outputWidgetSocket, String outputSocketType)
protected WidgetInstance lookupGroupTemplateInstance(Widget groupContainerWidget, WidgetInstance currentWidgetInstance)
protected void sendEventToTargetWidget(String eventName, Widget target, Object data, String sourceSocketId, WidgetInstance source)
protected void sendEventToTargetWidgetInternal(String eventName, Object data, String sourceSocketId, WidgetInstance source, List<WidgetInstance> widgetInstances)
protected WidgetInstance resolveSingleTargetInstance(WidgetInstance source, Widget target)
source - The WidgetInstance which has sent the event.target - The target Widget.WidgetInstance that should receive the event or null, if none could be resolved.protected void sendSocketEvent(Widgetslot widgetContainer, String eventName, Object data, String sourceSocketId, WidgetInstance sourceWidgetInstance)
protected void logSocketEvent(Widgetslot widgetContainer, String targetSocketId, Object data, String sourceSocketId, WidgetInstance sourceWidgetInstance)
protected org.zkoss.zk.ui.Desktop getDesktop()
public void createWidgetView(Widgetchildren widgetChildrenComponent)
CockpitWidgetEngineCockpitWidgetEngine.createWidgetView(Widgetchildren, Map) with empty map as second arg.createWidgetView in interface CockpitWidgetEnginepublic void createWidgetView(Widgetchildren widgetChildrenComponent, Map<String,Object> ctx)
CockpitWidgetEnginecreateWidgetView in interface CockpitWidgetEnginepublic Map<String,WidgetChildrenContainerRenderer> getChildrenContainerRenderer()
public void setChildrenContainerRenderer(Map<String,WidgetChildrenContainerRenderer> childrenContainerRenderer)
public boolean isIndependentView(WidgetDefinition widget, String url)
CockpitWidgetEngineisIndependentView in interface CockpitWidgetEnginewidget - widget definition to be checkedurl - requested URLtrue if a URL points to view that is defined as independentpublic WidgetService getWidgetService()
public void setWidgetService(WidgetService widgetService)
protected CockpitComponentDefinitionService getWidgetDefinitionService()
public void setComponentDefinitionService(CockpitComponentDefinitionService componentDefinitionService)
protected WidgetUtils getWidgetUtils()
public void setWidgetUtils(WidgetUtils widgetUtils)
protected WidgetTemplateRulesEngine getRulesEngine()
public void setRulesEngine(WidgetTemplateRulesEngine rulesEngine)
protected WidgetPersistenceService getWidgetPersistenceService()
public void setWidgetPersistenceService(WidgetPersistenceService widgetPersistenceService)
public void setSessionWidgetInstanceRegistry(SessionWidgetInstanceRegistry sessionWidgetInstanceRegistry)
protected WidgetInstanceFacade getWidgetInstanceFacade()
public void setWidgetInstanceFacade(WidgetInstanceFacade widgetInstanceFacade)
protected CockpitThreadContextCreator getCockpitThreadContextCreator()
public void setCockpitThreadContextCreator(CockpitThreadContextCreator cockpitThreadContextCreator)
protected WidgetLibUtils getWidgetLibUtils()
public void setWidgetLibUtils(WidgetLibUtils widgetLibUtils)
public void setModelValueHandlerFactory(ModelValueHandlerFactory modelValueHandlerFactory)
public List<WidgetConfigurationContextDecorator> getWidgetConfigurationContextDecoratorList()
public void setWidgetConfigurationContextDecoratorList(List<WidgetConfigurationContextDecorator> contextDecoratorList)
public CockpitConfigurationService getCockpitConfigurationService()
public void setCockpitConfigurationService(CockpitConfigurationService cockpitConfigurationService)
protected WidgetAuthorizationService getWidgetAuthorizationService()
public void setWidgetAuthorizationService(WidgetAuthorizationService widgetAuthorizationService)
protected CockpitProperties getCockpitProperties()
public void setCockpitProperties(CockpitProperties cockpitProperties)
public void setCockpitResourceLoader(CockpitResourceLoader cockpitResourceLoader)
public CockpitTypeUtils getCockpitTypeUtils()
public void setCockpitTypeUtils(CockpitTypeUtils cockpitTypeUtils)
public SocketConnectionService getSocketConnectionService()
public void setSocketConnectionService(SocketConnectionService socketConnectionService)
public LabelService getLabelService()
public void setLabelService(LabelService labelService)
Copyright © 2018. All rights reserved.