Package com.hybris.cockpitng.actions
Class AbstractStatefulAction<INPUT,OUTPUT>
- java.lang.Object
-
- com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware
-
- com.hybris.cockpitng.actions.AbstractStatefulAction<INPUT,OUTPUT>
-
- All Implemented Interfaces:
CockpitAction<INPUT,OUTPUT>,ComponentWidgetAdapterAware
- Direct Known Subclasses:
AbstractToggleAction
public abstract class AbstractStatefulAction<INPUT,OUTPUT> extends AbstractComponentWidgetAdapterAware implements CockpitAction<INPUT,OUTPUT>
-
-
Constructor Summary
Constructors Constructor Description AbstractStatefulAction()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static java.lang.StringgetActionUID(ActionContext<?> context)Reads unique identity of action.protected <V> VgetValue(ActionContext<INPUT> actionContext, java.lang.String key)Reads a value from parent's widget model.protected static <V> VrestoreModelValue(ActionContext<?> context, java.lang.String key)Reads a value from parent's widget model.protected voidsetValue(ActionContext<INPUT> actionContext, java.lang.String key, java.lang.Object value)Puts a value to parent's widget model.protected static voidstoreModelValue(ActionContext<?> context, java.lang.String key, java.lang.Object value)Puts a value to parent's widget model.-
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
canPerform, getConfirmationMessage, needsConfirmation, perform
-
-
-
-
Method Detail
-
getValue
protected <V> V getValue(ActionContext<INPUT> actionContext, java.lang.String key)
Reads a value from parent's widget model.Method is resistant to situation when many instances of a particular action used in single parent widgets.
- Type Parameters:
V- value type- Parameters:
actionContext- action contextkey- value key- Returns:
- value found or
null
-
setValue
protected void setValue(ActionContext<INPUT> actionContext, java.lang.String key, java.lang.Object value)
Puts a value to parent's widget model.Method is resistant to situation when many instances of a particular action used in single parent widgets.
- Parameters:
actionContext- action contextkey- value keyvalue- value to be put
-
restoreModelValue
protected static <V> V restoreModelValue(ActionContext<?> context, java.lang.String key)
Reads a value from parent's widget model.Method is resistant to situation when many instances of a particular action used in single parent widgets.
- Type Parameters:
V- value type- Parameters:
context- action contextkey- value key- Returns:
- value found or
null
-
storeModelValue
protected static void storeModelValue(ActionContext<?> context, java.lang.String key, java.lang.Object value)
Puts a value to parent's widget model.Method is resistant to situation when many instances of a particular action used in single parent widgets.
- Parameters:
context- action contextkey- value keyvalue- value to be put
-
getActionUID
protected static java.lang.String getActionUID(ActionContext<?> context)
Reads unique identity of action.- Parameters:
context- action context- Returns:
- unique identity of action
-
-