Class AbstractInteractiveAction<I,​O>

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addDialogWindowAttribute​(com.hybris.cockpitng.actions.ActionContext<I> context, org.zkoss.zul.Window window)
      Override the method in subclasses to supplement dialog window with attributes
      boolean canPerform​(com.hybris.cockpitng.actions.ActionContext<I> context)  
      protected void doOnAlertOkClick​(org.zkoss.zul.Messagebox.ClickEvent clickEvent)
      Override the method in descent classes to process onOk event of alert dialog if needed
      protected java.lang.String getAlertDialogTemplate()  
      protected java.lang.String getAlertDialogWidth()  
      protected java.util.Map<java.lang.String,​java.lang.Object> getArguments​(com.hybris.cockpitng.actions.ActionContext<I> context)  
      protected java.lang.String getDialogHeight()  
      protected abstract java.lang.String getDialogTemplate​(com.hybris.cockpitng.actions.ActionContext<I> context)  
      protected abstract java.lang.String getDialogTitle​(com.hybris.cockpitng.actions.ActionContext<I> context)  
      protected java.lang.String getDialogTop()  
      protected java.lang.String getDialogWidth()  
      protected org.zkoss.zk.ui.Component getRoot()  
      com.hybris.cockpitng.actions.ActionResult<O> perform​(com.hybris.cockpitng.actions.ActionContext<I> context)  
      void sendOutputDataToSocket​(java.lang.String socketId, java.lang.Object data)
      Sends data object into specified socket.
      void showAlertDialog​(com.hybris.cockpitng.actions.ActionContext<I> context, java.lang.String title, java.lang.String message)
      Shows alert dialog with title, message and button Ok.
      • Methods inherited from class com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware

        addSocketInputEventListener, getComponentID, handleSocketInputEvent, initialize, initializeDefaultEventListeners, registerStubInstance, sendOutput, setComponentID, unregisterStubInstance
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.hybris.cockpitng.actions.CockpitAction

        getConfirmationMessage, needsConfirmation
    • Field Detail

      • DEFAULT_ALERT_DIALOG_WIDTH

        protected static final java.lang.String DEFAULT_ALERT_DIALOG_WIDTH
        See Also:
        Constant Field Values
      • DEFAULT_ALERT_DIALOG_TEMPLATE_URL

        protected static final java.lang.String DEFAULT_ALERT_DIALOG_TEMPLATE_URL
        See Also:
        Constant Field Values
      • DEFAULT_ALERT_DIALOG_OK

        protected static final java.lang.String DEFAULT_ALERT_DIALOG_OK
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractInteractiveAction

        public AbstractInteractiveAction()
    • Method Detail

      • getDialogTemplate

        protected abstract java.lang.String getDialogTemplate​(com.hybris.cockpitng.actions.ActionContext<I> context)
      • getDialogTitle

        protected abstract java.lang.String getDialogTitle​(com.hybris.cockpitng.actions.ActionContext<I> context)
      • addDialogWindowAttribute

        protected void addDialogWindowAttribute​(com.hybris.cockpitng.actions.ActionContext<I> context,
                                                org.zkoss.zul.Window window)
        Override the method in subclasses to supplement dialog window with attributes
        Parameters:
        context - action context
        window - window to supplement attributes
      • canPerform

        public boolean canPerform​(com.hybris.cockpitng.actions.ActionContext<I> context)
        Specified by:
        canPerform in interface com.hybris.cockpitng.actions.CockpitAction<I,​O>
      • perform

        public com.hybris.cockpitng.actions.ActionResult<O> perform​(com.hybris.cockpitng.actions.ActionContext<I> context)
        Specified by:
        perform in interface com.hybris.cockpitng.actions.CockpitAction<I,​O>
      • showAlertDialog

        public void showAlertDialog​(com.hybris.cockpitng.actions.ActionContext<I> context,
                                    java.lang.String title,
                                    java.lang.String message)
        Description copied from interface: InteractiveAction
        Shows alert dialog with title, message and button Ok.
        Specified by:
        showAlertDialog in interface InteractiveAction<I,​O>
        Parameters:
        context - ActionContext to get localized labels by the codes
        title - title code
        message - message code
      • getAlertDialogTemplate

        protected java.lang.String getAlertDialogTemplate()
      • getAlertDialogWidth

        protected java.lang.String getAlertDialogWidth()
      • sendOutputDataToSocket

        public void sendOutputDataToSocket​(java.lang.String socketId,
                                           java.lang.Object data)
        Description copied from interface: InteractiveAction
        Sends data object into specified socket.
        Specified by:
        sendOutputDataToSocket in interface InteractiveAction<I,​O>
        Parameters:
        socketId - Socket identifier to send data
        data - data object to send
      • doOnAlertOkClick

        protected void doOnAlertOkClick​(org.zkoss.zul.Messagebox.ClickEvent clickEvent)
        Override the method in descent classes to process onOk event of alert dialog if needed
        Parameters:
        clickEvent - message box click event
      • getDialogWidth

        protected java.lang.String getDialogWidth()
      • getDialogHeight

        protected java.lang.String getDialogHeight()
      • getDialogTop

        protected java.lang.String getDialogTop()
      • getRoot

        protected org.zkoss.zk.ui.Component getRoot()
      • getArguments

        protected java.util.Map<java.lang.String,​java.lang.Object> getArguments​(com.hybris.cockpitng.actions.ActionContext<I> context)