Class SaveForLaterActionHandler
java.lang.Object
de.hybris.platform.selectivecartsplitlistaddon.cart.action.impl.SaveForLaterActionHandler
- All Implemented Interfaces:
CartEntryActionHandler
Deals with cart entries when moving them into Save for Later
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionProvides the key to the message that should be displayed when a CartEntryActionException is thrown.protected SelectiveCartFacadeProvides the key to the message that should be displayed when an action runs with success.handleAction(List<Long> entryNumbers) Moves selected entries into Save for LatervoidsetSelectiveCartFacade(SelectiveCartFacade selectiveCartFacade) booleansupports(CartEntryModel cartEntry) This method determines if the action should show or not in the cart entry tools menu.
-
Constructor Details
-
SaveForLaterActionHandler
public SaveForLaterActionHandler()
-
-
Method Details
-
handleAction
Moves selected entries into Save for Later- Specified by:
handleActionin interfaceCartEntryActionHandler- Parameters:
entryNumbers- the list of entry numbers- Returns:
- the empty optional
- Throws:
CartEntryActionException- throws when moving product to Save for Later failed
-
getSuccessMessageKey
Description copied from interface:CartEntryActionHandlerProvides the key to the message that should be displayed when an action runs with success.- Specified by:
getSuccessMessageKeyin interfaceCartEntryActionHandler- Returns:
- the success message key.
-
getErrorMessageKey
Description copied from interface:CartEntryActionHandlerProvides the key to the message that should be displayed when a CartEntryActionException is thrown.- Specified by:
getErrorMessageKeyin interfaceCartEntryActionHandler- Returns:
- the error message key.
-
supports
Description copied from interface:CartEntryActionHandlerThis method determines if the action should show or not in the cart entry tools menu. An action may not be supported by every cart entry and this is the method to override to make this decision. This method is intended to refine the contents of the contextual menu of a cart item. It is the responsibility of the method and the processes it calls to perform appropriate validations in case the action is called on a cart entry for which it should not.- Specified by:
supportsin interfaceCartEntryActionHandler- Parameters:
cartEntry- the cart entry model.- Returns:
- true if the cart entry supports the action, false otherwise.
-
getSelectiveCartFacade
-
setSelectiveCartFacade
-