Interface CartEntryActionFacade

All Known Implementing Classes:
DefaultCartEntryActionFacade

public interface CartEntryActionFacade
Facade interface for executing accelerator cart entry actions.
  • Method Details

    • executeAction

      Optional<String> executeAction(CartEntryAction action, List<Long> entryNumbers) throws CartEntryActionException
      This method will trigger CartEntryActionHandler.handleAction(List) on the CartEntryActionHandler configured 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

      Optional<String> getSuccessMessageKey(CartEntryAction action)
      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

      Optional<String> getErrorMessageKey(CartEntryAction action)
      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.