org.broadleafcommerce.core.pricing.service.workflow
Class AutoBundleActivity
java.lang.Object
org.broadleafcommerce.core.workflow.BaseActivity
org.broadleafcommerce.core.pricing.service.workflow.AutoBundleActivity
- All Implemented Interfaces:
- Activity, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware
public class AutoBundleActivity
- extends BaseActivity
This pricing workflow step will automatically bundle items in the cart.
For example, if a ProductBundle exists of two items and the user has
one of the items in their cart. If they then add the second item,
this activity will replace the two items with the ProductBundle.
This only occurs if the ProductBundle is set to "automatically" bundle.
| Methods inherited from class org.broadleafcommerce.core.workflow.BaseActivity |
getAutomaticallyRegisterRollbackHandler, getBeanName, getErrorHandler, getRollbackHandler, getRollbackRegion, getStateConfiguration, setAutomaticallyRegisterRollbackHandler, setBeanName, setErrorHandler, setRollbackHandler, setRollbackRegion, setStateConfiguration |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
catalogService
protected CatalogService catalogService
orderService
protected OrderService orderService
orderItemDao
protected OrderItemDao orderItemDao
fulfillmentGroupItemDao
protected FulfillmentGroupItemDao fulfillmentGroupItemDao
AutoBundleActivity
public AutoBundleActivity()
execute
public ProcessContext execute(ProcessContext context)
throws Exception
- Description copied from interface:
Activity
- Called by the encompassing processor to activate
the execution of the Activity
- Parameters:
context - - process context for this workflow
- Returns:
- resulting process context
- Throws:
Exception
handleAutomaticBundling
public Order handleAutomaticBundling(Order order)
throws PricingException,
RemoveFromCartException
- Throws:
PricingException
RemoveFromCartException
countExistingUsesOfBundle
protected int countExistingUsesOfBundle(Order order,
ProductBundle bundle)
populateItemMatchesForSku
protected int populateItemMatchesForSku(List<DiscreteOrderItem> matchingItems,
Order order,
List<DiscreteOrderItem> unbundledItems,
Long skuId)
countMaximumApplications
protected int countMaximumApplications(Order order,
SkuBundleItem skuBundleItem,
Set<Long> processedBundles)
Copyright © 2013. All Rights Reserved.