public interface CartEntryActionHandler
CartEntryAction.| Modifier and Type | Method and Description |
|---|---|
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.
|
boolean |
supports(CartEntryModel cartEntry)
This method determines if the action should show or not in the cart entry tools menu.
|
java.util.Optional<java.lang.String> handleAction(java.util.List<java.lang.Long> entryNumbers)
throws CartEntryActionException
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.entryNumbers - the cart entry number for which the action is executed.CartEntryActionException - when an error occurs.java.lang.String getSuccessMessageKey()
java.lang.String getErrorMessageKey()
boolean supports(CartEntryModel cartEntry)
cartEntry - the cart entry model.Copyright © 2018 SAP SE. All Rights Reserved.