Class EnumerationAction
java.lang.Object
com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware
com.hybris.backoffice.widgets.actions.enumeration.EnumerationAction
- All Implemented Interfaces:
com.hybris.cockpitng.actions.CockpitAction<Collection<Object>,,Object> com.hybris.cockpitng.engine.ComponentWidgetAdapterAware
public class EnumerationAction
extends com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware
implements com.hybris.cockpitng.actions.CockpitAction<Collection<Object>,Object>
EnumerationAction is a generic class which allows to update a list of selected items with chosen enumeration value.
Enumeration action accepts 2 parameters through configuration:
-
"qualifier" - is a required
parameter. The type of the items is inferred from the input data and next, the type of the given qualifier is
retrieved. For example, configuration for Product type can be provided as follows:
<y:parameter>
<y:name>qualifier</y:name>
<y:value>approvalStatus</y:value>
</y:parameter>
-
"validatorId" - is an optional
parameter. You can provide id of validator's bean which allows to check whether the given data can be updated with
chosen enumeration value. For example:
<y:parameter>
<y:name>validatorId</y:name>
<y:value>someBeanId</y:value>
</y:parameter>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDeprecated, for removal: This API element is subject to removal in a future version.since 1808, not used anymore.booleancanPerform(com.hybris.cockpitng.actions.ActionContext<Collection<Object>> ctx) protected voidDeprecated, for removal: This API element is subject to removal in a future version.since 1808, not used anymore.protected Optional<EnumerationValidator>protected Optional<EnumerationValidator>getEnumerationValidator(com.hybris.cockpitng.actions.ActionContext<Collection<Object>> context) com.hybris.backoffice.widgets.notificationarea.NotificationServiceprotected StringgetNotificationSource(com.hybris.cockpitng.actions.ActionContext<Collection<Object>> context) com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadecom.hybris.cockpitng.type.ObjectValueServiceprotected voidnotifyUpdateFailed(com.hybris.cockpitng.actions.ActionContext<Collection<Object>> context, Map<Object, ? extends Exception> map) com.hybris.cockpitng.actions.ActionResult<Object>perform(com.hybris.cockpitng.actions.ActionContext<Collection<Object>> context) protected voidrevertChanges(Collection<Object> list) protected voidDeprecated, for removal: This API element is subject to removal in a future version.since 1808, not used anymore.protected com.hybris.cockpitng.actions.ActionResult<Object>save(com.hybris.cockpitng.actions.ActionContext<Collection<Object>> context, String expression, Collection<Object> list, HybrisEnumValue hybrisEnumValue) protected com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<Object>saveChangesWithoutInterceptors(Collection<Object> itemsToSave) Methods inherited from class com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware
addSocketInputEventListener, getComponentID, handleSocketInputEvent, initialize, initializeDefaultEventListeners, registerStubInstance, sendOutput, setComponentID, unregisterStubInstanceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hybris.cockpitng.actions.CockpitAction
getConfirmationMessage, needsConfirmation
-
Field Details
-
DEFAULT_ENUMERATION_VALIDATOR_BEAN_ID
- See Also:
-
ENUMERATION_KEY
- See Also:
-
PARAMETER_QUALIFIER
- See Also:
-
PARAMETER_VALIDATOR_ID
- See Also:
-
-
Constructor Details
-
EnumerationAction
public EnumerationAction()
-
-
Method Details
-
perform
public com.hybris.cockpitng.actions.ActionResult<Object> perform(com.hybris.cockpitng.actions.ActionContext<Collection<Object>> context) - Specified by:
performin interfacecom.hybris.cockpitng.actions.CockpitAction<Collection<Object>,Object>
-
save
protected com.hybris.cockpitng.actions.ActionResult<Object> save(com.hybris.cockpitng.actions.ActionContext<Collection<Object>> context, String expression, Collection<Object> list, HybrisEnumValue hybrisEnumValue) -
saveChangesWithoutInterceptors
protected com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<Object> saveChangesWithoutInterceptors(Collection<Object> itemsToSave) -
revertChanges
-
notifyUpdateFailed
protected void notifyUpdateFailed(com.hybris.cockpitng.actions.ActionContext<Collection<Object>> context, Map<Object, ? extends Exception> map) -
beginTransaction
Deprecated, for removal: This API element is subject to removal in a future version.since 1808, not used anymore.saveChangesWithoutInterceptors(java.util.Collection<java.lang.Object>)uses save method which became transactional in 1808 -
rollbackTransaction
Deprecated, for removal: This API element is subject to removal in a future version.since 1808, not used anymore.saveChangesWithoutInterceptors(java.util.Collection<java.lang.Object>)uses save method which became transactional in 1808 -
commitTransaction
Deprecated, for removal: This API element is subject to removal in a future version.since 1808, not used anymore.saveChangesWithoutInterceptors(java.util.Collection<java.lang.Object>)uses save method which became transactional in 1808 -
canPerform
- Specified by:
canPerformin interfacecom.hybris.cockpitng.actions.CockpitAction<Collection<Object>,Object>
-
getNotificationSource
protected String getNotificationSource(com.hybris.cockpitng.actions.ActionContext<Collection<Object>> context) -
getEnumerationValidator
protected Optional<EnumerationValidator> getEnumerationValidator(com.hybris.cockpitng.actions.ActionContext<Collection<Object>> context) -
getBean
-
getObjectValueService
public com.hybris.cockpitng.type.ObjectValueService getObjectValueService() -
getObjectFacade
public com.hybris.cockpitng.dataaccess.facades.object.ObjectFacade getObjectFacade() -
getNotificationService
public com.hybris.backoffice.widgets.notificationarea.NotificationService getNotificationService() -
getModelService
-
getSessionService
-
getDisabledInterceptorsBeanNames
-