Class DefaultCommerceRemoveEntryGroupStrategy
java.lang.Object
de.hybris.platform.commerceservices.order.impl.DefaultCommerceRemoveEntryGroupStrategy
- All Implemented Interfaces:
CommerceRemoveEntryGroupStrategy
public class DefaultCommerceRemoveEntryGroupStrategy
extends Object
implements CommerceRemoveEntryGroupStrategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterRemoveEntryGroup(RemoveEntryGroupParameter parameters, CommerceCartModification result) protected voidbeforeRemoveEntryGroup(RemoveEntryGroupParameter parameters) protected CommerceCartModificationcreateRemoveEntryGroupResp(RemoveEntryGroupParameter parameter, String status) protected CommerceCartModificationdoRemoveEntryGroup(RemoveEntryGroupParameter parameter) Do remove from the cart.protected List<EntryGroup>excludeEntryGroup(List<EntryGroup> source, Integer groupNumber) protected List<CommerceRemoveEntryGroupMethodHook>protected ConfigurationServiceprotected EntryGroupServiceprotected CommerceUpdateCartEntryStrategyprotected voidremoveEntriesByGroupNumber(RemoveEntryGroupParameter parameter, List<Integer> groupNumbers) removeEntryGroup(RemoveEntryGroupParameter parameter) Removes from the cart an entry group with all nested groups and their cart entriesvoidsetCommerceRemoveEntryGroupHooks(List<CommerceRemoveEntryGroupMethodHook> commerceRemoveEntryGroupHooks) voidsetConfigurationService(ConfigurationService configurationService) voidsetEntryGroupService(EntryGroupService entryGroupService) voidsetUpdateCartEntryStrategy(CommerceUpdateCartEntryStrategy updateCartEntryStrategy) protected void
-
Constructor Details
-
DefaultCommerceRemoveEntryGroupStrategy
public DefaultCommerceRemoveEntryGroupStrategy()
-
-
Method Details
-
removeEntryGroup
@Nonnull public CommerceCartModification removeEntryGroup(@Nonnull RemoveEntryGroupParameter parameter) throws CommerceCartModificationException Removes from the cart an entry group with all nested groups and their cart entries- Specified by:
removeEntryGroupin interfaceCommerceRemoveEntryGroupStrategy- Parameters:
parameter- remove entry group parameters- Returns:
- Cart modification information
- Throws:
CommerceCartModificationException- if related cart entry wasn't removed
-
doRemoveEntryGroup
protected CommerceCartModification doRemoveEntryGroup(RemoveEntryGroupParameter parameter) throws CommerceCartModificationException Do remove from the cart.- Parameters:
parameter- remove entry group parameter- Returns:
- the commerce cart modification
- Throws:
CommerceCartModificationException- the commerce cart modification exception
-
excludeEntryGroup
-
createRemoveEntryGroupResp
protected CommerceCartModification createRemoveEntryGroupResp(RemoveEntryGroupParameter parameter, String status) -
removeEntriesByGroupNumber
protected void removeEntriesByGroupNumber(RemoveEntryGroupParameter parameter, List<Integer> groupNumbers) throws CommerceCartModificationException -
getAllSubsequentGroupNumbers
-
validateRemoveEntryGroupParameter
-
beforeRemoveEntryGroup
protected void beforeRemoveEntryGroup(RemoveEntryGroupParameter parameters) throws CommerceCartModificationException -
afterRemoveEntryGroup
protected void afterRemoveEntryGroup(RemoveEntryGroupParameter parameters, CommerceCartModification result) throws CommerceCartModificationException -
getCommerceRemoveEntryGroupHooks
-
setCommerceRemoveEntryGroupHooks
public void setCommerceRemoveEntryGroupHooks(List<CommerceRemoveEntryGroupMethodHook> commerceRemoveEntryGroupHooks) -
getConfigurationService
-
setConfigurationService
-
getUpdateCartEntryStrategy
-
setUpdateCartEntryStrategy
-
getEntryGroupService
-
setEntryGroupService
-