org.broadleafcommerce.core.order.service.workflow.remove
Class RemoveOrderItemActivity

java.lang.Object
  extended by org.broadleafcommerce.core.workflow.BaseActivity<ProcessContext<CartOperationRequest>>
      extended by org.broadleafcommerce.core.order.service.workflow.remove.RemoveOrderItemActivity
All Implemented Interfaces:
Activity<ProcessContext<CartOperationRequest>>, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.core.Ordered

public class RemoveOrderItemActivity
extends BaseActivity<ProcessContext<CartOperationRequest>>

This class is responsible for determining which OrderItems should be removed from the order, taking into account the fact that removing an OrderItem should also remove all of its child order items.

Author:
Andre Azzolini (apazzolini)

Field Summary
protected  OrderItemService orderItemService
           
protected  OrderService orderService
           
 
Fields inherited from class org.broadleafcommerce.core.workflow.BaseActivity
automaticallyRegisterRollbackHandler, beanName, errorHandler, order, rollbackHandler, rollbackRegion, stateConfiguration
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
RemoveOrderItemActivity()
           
 
Method Summary
 ProcessContext<CartOperationRequest> execute(ProcessContext<CartOperationRequest> context)
          Called by the encompassing processor to activate the execution of the Activity
protected  void removeItemAndChildren(List<OrderItem> oisToDelete, OrderItem orderItem)
           
 
Methods inherited from class org.broadleafcommerce.core.workflow.BaseActivity
getAutomaticallyRegisterRollbackHandler, getBeanName, getErrorHandler, getOrder, getRollbackHandler, getRollbackRegion, getStateConfiguration, setAutomaticallyRegisterRollbackHandler, setBeanName, setErrorHandler, setOrder, setRollbackHandler, setRollbackRegion, setStateConfiguration, shouldExecute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

orderService

protected OrderService orderService

orderItemService

protected OrderItemService orderItemService
Constructor Detail

RemoveOrderItemActivity

public RemoveOrderItemActivity()
Method Detail

execute

public ProcessContext<CartOperationRequest> execute(ProcessContext<CartOperationRequest> 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

removeItemAndChildren

protected void removeItemAndChildren(List<OrderItem> oisToDelete,
                                     OrderItem orderItem)


Copyright © 2013. All Rights Reserved.