public class NotificationController extends DefaultWidgetController
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ATTRIBUTE_NOTIFICATION_EVENT |
protected static String |
MESSAGE_COMPONENT |
static String |
MODEL_DYNAMIC_NOTIFICATION_ID |
static String |
NOTIFICATION_MESSAGE_YTESTID_PREFIX |
static String |
RENDERER_PARAMETER_WIDGET_INSTANCE_MANAGER |
static String |
SELECTED_ELEMENT_OUT_SOCKET |
protected static String |
SETTING_DEBUG_LOG |
protected static String |
SETTING_NOTIFICATION_ID |
protected static String |
SETTING_STACK_SIZE |
protected static String |
SETTING_USE_DYNAMIC_NOTIFICATION_ID |
| Constructor and Description |
|---|
NotificationController() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addMessageComponent(org.zkoss.zul.Div container,
NotificationEvent notificationEvent,
Notification notificationConfig,
NotificationDefaults notificationDefaults) |
protected void |
addNotification(NotificationEvent notificationEvent,
Notification notificationConfig,
NotificationDefaults notificationDefaults) |
protected org.zkoss.zk.ui.Component |
createLink(NotificationEvent notificationEvent,
NotificationReference referenceConfig,
ExpressionResolver resolver) |
protected org.zkoss.zk.ui.Component |
createNotificationComponent(NotificationEvent notificationEvent,
Notification notificationConfig,
NotificationDefaults notificationDefaults) |
protected Notification |
extractNotificationConfig(NotificationEvent notificationEvent,
NotificationArea notificationArea) |
protected NotificationDefaults |
extractNotificationDefaults(NotificationArea notificationArea) |
protected ExpressionResolverFactory |
getExpressionResolverFactory() |
protected NotificationReference |
getFallbackReferenceConfig(int placeHolder,
boolean linksEnabledByDefaults) |
protected int |
getIndexOrPlaceholder(NotificationReference reference) |
protected LabelService |
getLabelService() |
protected NotificationArea |
getNotificationAreaConfig(NotificationEvent notificationEvent) |
org.zkoss.zul.Div |
getNotificationContainer() |
protected Destination |
getNotificationDestination(NotificationEvent notificationEvent,
Notification notificationConfig,
NotificationDefaults notificationDefaults) |
protected Deque<org.zkoss.zk.ui.Component> |
getNotificationEventsStack() |
protected String |
getNotificationId() |
protected NotificationReference |
getNotificationReference(int index,
Notification notificationConfig) |
protected NotificationRenderer |
getNotificationRenderer(String rendererBean) |
protected org.zkoss.zk.ui.Component |
getNotificationRendererComponent(NotificationEvent notificationEvent,
String rendererBean,
List<NotificationParameter> parameters) |
protected BigInteger |
getNotificationTimeout(NotificationEvent notificationEvent,
Notification notificationConfig,
NotificationDefaults notificationDefaults) |
protected Object |
getReferencedObject(NotificationEvent event,
NotificationReference ref) |
protected String |
getReferenceLabel(NotificationEvent notificationEvent,
NotificationReference referenceConfig,
ExpressionResolver resolver) |
void |
initialize(org.zkoss.zk.ui.Component comp)
Override this method to do initialization stuff for your widget, like initialize widget settings, restore view
state from viewmodel, etc.
|
protected boolean |
isAlreadyNotified(NotificationEvent notificationEvent) |
protected boolean |
isDebugLog() |
protected boolean |
isGlobalNotification(String notificationId) |
protected boolean |
isLinkEnabled(NotificationEvent event,
Notification notificationConfig,
NotificationDefaults notificationDefaults) |
protected boolean |
isLinkEnabled(NotificationEvent notificationEvent,
NotificationReference reference,
ExpressionResolver resolver) |
protected boolean |
isMatchingNotification(NotificationEvent notificationEvent,
Notification notificationConfig,
NotificationDefaults notificationDefaults) |
protected boolean |
notificationsMatches(Destination expected,
String current) |
protected boolean |
notificationsMatches(String expectedId,
String currentId) |
void |
onClearNotifications(ClearNotificationsEvent clearEvent)
Processes clearEvent which removes notifications of specified source and type (if specified in clearEvent
ClearNotificationsEvent.getLevel()). |
void |
onNotification(NotificationEvent notificationEvent)
Starting point of notification processing.
|
protected void |
refreshView()
Calls invalidate on
DefaultWidgetController.getWidgetslot(). |
protected void |
removeNotification(org.zkoss.zk.ui.Component notificationComponent) |
void |
setExpressionResolverFactory(ExpressionResolverFactory expressionResolverFactory) |
void |
setLabelService(LabelService labelService) |
void |
setNotificationStack(NotificationStack notificationStack) |
protected boolean |
validateMessage(Notification notification,
NotificationEvent notificationEvent) |
protected boolean |
validateReferenceIndex(NotificationReference ref,
NotificationEvent event) |
doAfterCompose, doBeforeCompose, doBeforeComposeChildren, executeOperation, getDragAndDropStrategy, getLabel, getLabel, getModel, getValue, getWidgetDragAndDropStrategyRepository, getWidgetInstanceManager, getWidgetRoot, getWidgetSettings, getWidgetslot, getWidgetTitle, getWidgetUtils, initDragAndDropAwareness, initWidgetSetting, initWidgetSetting, initWidgetSetting, initWidgetSetting, initWidgetSetting, invokeListenerMethod, onSocketInput, preInitialize, sendOutput, sendOutputAfterOperation, sendOutputAfterOperation, sendOutputAfterOperation, setValue, setWidgetInstanceManager, setWidgetTitlescanEventListenersalert, didActivate, getPage, willClone, willPassivatepublic static final String RENDERER_PARAMETER_WIDGET_INSTANCE_MANAGER
public static final String SELECTED_ELEMENT_OUT_SOCKET
public static final String NOTIFICATION_MESSAGE_YTESTID_PREFIX
public static final String MODEL_DYNAMIC_NOTIFICATION_ID
protected static final String SETTING_DEBUG_LOG
protected static final String MESSAGE_COMPONENT
protected static final String SETTING_NOTIFICATION_ID
protected static final String SETTING_STACK_SIZE
protected static final String SETTING_USE_DYNAMIC_NOTIFICATION_ID
protected static final String ATTRIBUTE_NOTIFICATION_EVENT
public void initialize(org.zkoss.zk.ui.Component comp)
DefaultWidgetControllerDefaultWidgetController.doAfterCompose(Component) everytime your widget
view is created. See GenericForwardComposer.doAfterCompose(Component) for more details.initialize in class DefaultWidgetControllerpublic void onNotification(NotificationEvent notificationEvent)
notificationEvent - contains all data necessary for a notification to be shown or discarded.public void onClearNotifications(ClearNotificationsEvent clearEvent)
ClearNotificationsEvent.getLevel()).clearEvent - contains an id and notification type to remove (not mandatory).protected NotificationArea getNotificationAreaConfig(NotificationEvent notificationEvent) throws CockpitConfigurationException
CockpitConfigurationExceptionprotected Notification extractNotificationConfig(NotificationEvent notificationEvent, NotificationArea notificationArea)
protected NotificationDefaults extractNotificationDefaults(NotificationArea notificationArea)
protected BigInteger getNotificationTimeout(NotificationEvent notificationEvent, Notification notificationConfig, NotificationDefaults notificationDefaults)
protected Destination getNotificationDestination(NotificationEvent notificationEvent, Notification notificationConfig, NotificationDefaults notificationDefaults)
protected void addNotification(NotificationEvent notificationEvent, Notification notificationConfig, NotificationDefaults notificationDefaults)
protected boolean isAlreadyNotified(NotificationEvent notificationEvent)
protected boolean isGlobalNotification(String notificationId)
protected boolean notificationsMatches(Destination expected, String current)
protected String getNotificationId()
protected boolean isMatchingNotification(NotificationEvent notificationEvent, Notification notificationConfig, NotificationDefaults notificationDefaults)
protected void removeNotification(org.zkoss.zk.ui.Component notificationComponent)
protected void refreshView()
DefaultWidgetController.getWidgetslot().protected org.zkoss.zk.ui.Component createNotificationComponent(NotificationEvent notificationEvent, Notification notificationConfig, NotificationDefaults notificationDefaults)
protected org.zkoss.zk.ui.Component getNotificationRendererComponent(NotificationEvent notificationEvent, String rendererBean, List<NotificationParameter> parameters)
protected NotificationRenderer getNotificationRenderer(String rendererBean)
protected boolean isLinkEnabled(NotificationEvent notificationEvent, NotificationReference reference, ExpressionResolver resolver)
protected boolean isLinkEnabled(NotificationEvent event, Notification notificationConfig, NotificationDefaults notificationDefaults)
protected boolean validateReferenceIndex(NotificationReference ref, NotificationEvent event)
protected int getIndexOrPlaceholder(NotificationReference reference)
protected NotificationReference getNotificationReference(int index, Notification notificationConfig)
protected void addMessageComponent(org.zkoss.zul.Div container,
NotificationEvent notificationEvent,
Notification notificationConfig,
NotificationDefaults notificationDefaults)
protected boolean validateMessage(Notification notification, NotificationEvent notificationEvent)
protected NotificationReference getFallbackReferenceConfig(int placeHolder, boolean linksEnabledByDefaults)
protected String getReferenceLabel(NotificationEvent notificationEvent, NotificationReference referenceConfig, ExpressionResolver resolver)
protected org.zkoss.zk.ui.Component createLink(NotificationEvent notificationEvent, NotificationReference referenceConfig, ExpressionResolver resolver)
protected Object getReferencedObject(NotificationEvent event, NotificationReference ref)
protected Deque<org.zkoss.zk.ui.Component> getNotificationEventsStack()
protected boolean isDebugLog()
public org.zkoss.zul.Div getNotificationContainer()
protected ExpressionResolverFactory getExpressionResolverFactory()
public void setExpressionResolverFactory(ExpressionResolverFactory expressionResolverFactory)
protected LabelService getLabelService()
public void setLabelService(LabelService labelService)
public void setNotificationStack(NotificationStack notificationStack)
Copyright © 2018. All rights reserved.