public class RemoveCartEntryActionHandler extends java.lang.Object implements CartEntryActionHandler
CartEntryActionHandler implementation for deleting cart entries.| Constructor and Description |
|---|
RemoveCartEntryActionHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected CartFacade |
getCartFacade() |
java.lang.String |
getErrorMessageKey()
Provides the key to the message that should be displayed when a CartEntryActionException is thrown.
|
java.lang.String |
getSuccessMessageKey()
Provides the key to the message that should be displayed when an action runs with success.
|
java.util.Optional<java.lang.String> |
handleAction(java.util.List<java.lang.Long> entryNumbers)
This method contains the logic of the action performed by the CartEntryActionHandler implementation.
|
void |
setCartFacade(CartFacade cartFacade) |
boolean |
supports(CartEntryModel cartEntry)
This method determines if the action should show or not in the cart entry tools menu.
|
public java.util.Optional<java.lang.String> handleAction(java.util.List<java.lang.Long> entryNumbers)
throws CartEntryActionException
CartEntryActionHandlerCartEntryActionHandler.supports(CartEntryModel) prevents unsupported actions to be visible in the
contextual menu, it is the responsibility of the handleAction 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.handleAction in interface CartEntryActionHandlerentryNumbers - the cart entry number for which the action is executed.CartEntryActionException - when an error occurs.public java.lang.String getSuccessMessageKey()
CartEntryActionHandlergetSuccessMessageKey in interface CartEntryActionHandlerpublic java.lang.String getErrorMessageKey()
CartEntryActionHandlergetErrorMessageKey in interface CartEntryActionHandlerpublic boolean supports(CartEntryModel cartEntry)
CartEntryActionHandlersupports in interface CartEntryActionHandlercartEntry - the cart entry model.protected CartFacade getCartFacade()
public void setCartFacade(CartFacade cartFacade)
Copyright © 2018 SAP SE. All Rights Reserved.