Class DefaultCartEntryActionFacade
java.lang.Object
de.hybris.platform.acceleratorfacades.cart.action.impl.DefaultCartEntryActionFacade
- All Implemented Interfaces:
CartEntryActionFacade
Default implementation of the
CartEntryActionFacade interface.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecuteAction(CartEntryAction action, List<Long> entryNumbers) This method will triggerCartEntryActionHandler.handleAction(List)on theCartEntryActionHandlerconfigured for the given .protected CartEntryActionHandlerRegistrygetErrorMessageKey(CartEntryAction action) Provides the key to the message that should be displayed when a CartEntryActionException is thrown.getSuccessMessageKey(CartEntryAction action) Provides the key to the message that should be displayed when an action runs with success.voidsetCartEntryActionHandlerRegistry(CartEntryActionHandlerRegistry cartEntryActionHandlerRegistry)
-
Constructor Details
-
DefaultCartEntryActionFacade
public DefaultCartEntryActionFacade()
-
-
Method Details
-
executeAction
public Optional<String> executeAction(CartEntryAction action, List<Long> entryNumbers) throws CartEntryActionException Description copied from interface:CartEntryActionFacadeThis method will triggerCartEntryActionHandler.handleAction(List)on theCartEntryActionHandlerconfigured for the given .- Specified by:
executeActionin interfaceCartEntryActionFacade- Parameters:
action- the action you want to execute.entryNumbers- the cart entry numbers for which the action is executed.- Returns:
- An empty optional to signal the controller to apply the default behaviour: redisplay the cart page with a success message. Otherwise return a custom redirect URL to navigate elsewhere upon the action completion. The expected url format is the format used as SpringMVC controller method return values.
- Throws:
CartEntryActionException- when an error occurs during the action execution.
-
getSuccessMessageKey
Description copied from interface:CartEntryActionFacadeProvides the key to the message that should be displayed when an action runs with success.- Specified by:
getSuccessMessageKeyin interfaceCartEntryActionFacade- Parameters:
action- the action you want the message key for- Returns:
- the success message key.
-
getErrorMessageKey
Description copied from interface:CartEntryActionFacadeProvides the key to the message that should be displayed when a CartEntryActionException is thrown.- Specified by:
getErrorMessageKeyin interfaceCartEntryActionFacade- Parameters:
action- the action you want the message key for.- Returns:
- the error message key.
-
getCartEntryActionHandlerRegistry
-
setCartEntryActionHandlerRegistry
public void setCartEntryActionHandlerRegistry(CartEntryActionHandlerRegistry cartEntryActionHandlerRegistry)
-