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,RuleArchiveAction,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 Summary
Fields Modifier and Type Field Description protected static java.lang.StringDEFAULT_ALERT_DIALOG_OKprotected static java.lang.StringDEFAULT_ALERT_DIALOG_TEMPLATE_URLprotected static java.lang.StringDEFAULT_ALERT_DIALOG_WIDTH
-
Constructor Summary
Constructors Constructor Description AbstractInteractiveAction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddDialogWindowAttribute(com.hybris.cockpitng.actions.ActionContext<I> context, org.zkoss.zul.Window window)Override the method in subclasses to supplement dialog window with attributesbooleancanPerform(com.hybris.cockpitng.actions.ActionContext<I> context)protected voiddoOnAlertOkClick(org.zkoss.zul.Messagebox.ClickEvent clickEvent)Override the method in descent classes to process onOk event of alert dialog if neededprotected java.lang.StringgetAlertDialogTemplate()protected java.lang.StringgetAlertDialogWidth()protected java.util.Map<java.lang.String,java.lang.Object>getArguments(com.hybris.cockpitng.actions.ActionContext<I> context)protected java.lang.StringgetDialogHeight()protected abstract java.lang.StringgetDialogTemplate(com.hybris.cockpitng.actions.ActionContext<I> context)protected abstract java.lang.StringgetDialogTitle(com.hybris.cockpitng.actions.ActionContext<I> context)protected java.lang.StringgetDialogTop()protected java.lang.StringgetDialogWidth()protected org.zkoss.zk.ui.ComponentgetRoot()com.hybris.cockpitng.actions.ActionResult<O>perform(com.hybris.cockpitng.actions.ActionContext<I> context)voidsendOutputDataToSocket(java.lang.String socketId, java.lang.Object data)Sends data object into specified socket.voidshowAlertDialog(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
-
-
-
-
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
-
-
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 contextwindow- window to supplement attributes
-
canPerform
public boolean canPerform(com.hybris.cockpitng.actions.ActionContext<I> context)
-
perform
public com.hybris.cockpitng.actions.ActionResult<O> perform(com.hybris.cockpitng.actions.ActionContext<I> context)
-
showAlertDialog
public void showAlertDialog(com.hybris.cockpitng.actions.ActionContext<I> context, java.lang.String title, java.lang.String message)
Description copied from interface:InteractiveActionShows alert dialog with title, message and button Ok.- Specified by:
showAlertDialogin interfaceInteractiveAction<I,O>- Parameters:
context- ActionContext to get localized labels by the codestitle- title codemessage- 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:InteractiveActionSends data object into specified socket.- Specified by:
sendOutputDataToSocketin interfaceInteractiveAction<I,O>- Parameters:
socketId- Socket identifier to send datadata- 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)
-
-