Class AbstractInteractiveAction<I,O>

java.lang.Object
com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware
de.hybris.platform.ruleenginebackoffice.actions.AbstractInteractiveAction<I,O>
All Implemented Interfaces:
com.hybris.cockpitng.actions.CockpitAction<I,O>, com.hybris.cockpitng.engine.ComponentWidgetAdapterAware, InteractiveAction<I,O>
Direct Known Subclasses:
AbstractRuleProcessingForModuleAction, RuleCloneAction, RuleCreateFromTemplateAction, RuleCreatePromotionFromTemplateAction, RulesModuleSyncAction

public abstract class AbstractInteractiveAction<I,O> extends com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware implements InteractiveAction<I,O>
AbstractInteractiveAction is the abstract class for the common functionality interactive actions.
  • Field Details

  • Constructor Details

    • AbstractInteractiveAction

      public AbstractInteractiveAction()
  • Method Details

    • getDialogTemplate

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

      protected abstract 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, String title, 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 String getAlertDialogTemplate()
    • getAlertDialogWidth

      protected String getAlertDialogWidth()
    • sendOutputDataToSocket

      public void sendOutputDataToSocket(String socketId, 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
    • getRoot

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

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