Interface CartEntryActionFacade
- All Known Implementing Classes:
DefaultCartEntryActionFacade
public interface CartEntryActionFacade
Facade interface for executing accelerator cart entry actions.
-
Method Summary
Modifier and TypeMethodDescriptionexecuteAction(CartEntryAction action, List<Long> entryNumbers) This method will triggerCartEntryActionHandler.handleAction(List)on theCartEntryActionHandlerconfigured for the given .getErrorMessageKey(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.
-
Method Details
-
executeAction
Optional<String> executeAction(CartEntryAction action, List<Long> entryNumbers) throws CartEntryActionException This method will triggerCartEntryActionHandler.handleAction(List)on theCartEntryActionHandlerconfigured for the given .- 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
Provides the key to the message that should be displayed when an action runs with success.- Parameters:
action- the action you want the message key for- Returns:
- the success message key.
-
getErrorMessageKey
Provides the key to the message that should be displayed when a CartEntryActionException is thrown.- Parameters:
action- the action you want the message key for.- Returns:
- the error message key.
-