Class CheckAddAvailabilityActivity
java.lang.Object
org.broadleafcommerce.core.workflow.BaseActivity<ProcessContext<CartOperationRequest>>
org.broadleafcommerce.core.order.service.workflow.AbstractCheckAvailabilityActivity
org.broadleafcommerce.core.order.service.workflow.CheckAddAvailabilityActivity
- All Implemented Interfaces:
Activity<ProcessContext<CartOperationRequest>>,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.core.Ordered
@Component("blCheckAddAvailabilityActivity")
public class CheckAddAvailabilityActivity
extends AbstractCheckAvailabilityActivity
This activity handles both adds and updates. In both cases, this will check the availability and quantities (if applicable)
of the passed in request. If this is an update request, this will use the
Sku from OrderItemRequestDTO.getOrderItemId().
If this is an add request, there is no order item yet so the Sku is looked up via the OrderItemRequestDTO.getSkuId().- Author:
- Phillip Verheyden (phillipuniverse)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CatalogServicestatic final intprotected OrderItemServiceFields inherited from class org.broadleafcommerce.core.order.service.workflow.AbstractCheckAvailabilityActivity
inventoryServiceFields inherited from class org.broadleafcommerce.core.workflow.BaseActivity
automaticallyRegisterRollbackHandler, beanName, errorHandler, order, rollbackHandler, rollbackRegion, stateConfigurationFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(ProcessContext<CartOperationRequest> context) Called by the encompassing processor to activate the execution of the ActivityMethods inherited from class org.broadleafcommerce.core.order.service.workflow.AbstractCheckAvailabilityActivity
checkSkuAvailability, shouldExecuteMethods inherited from class org.broadleafcommerce.core.workflow.BaseActivity
getAutomaticallyRegisterRollbackHandler, getBeanName, getErrorHandler, getOrder, getRollbackHandler, getRollbackRegion, getStateConfiguration, setAutomaticallyRegisterRollbackHandler, setBeanName, setErrorHandler, setOrder, setRollbackHandler, setRollbackRegion, setStateConfiguration
-
Field Details
-
ORDER
public static final int ORDER- See Also:
-
catalogService
-
orderItemService
-
-
Constructor Details
-
CheckAddAvailabilityActivity
public CheckAddAvailabilityActivity()
-
-
Method Details
-
execute
public ProcessContext<CartOperationRequest> execute(ProcessContext<CartOperationRequest> context) throws Exception Description copied from interface:ActivityCalled by the encompassing processor to activate the execution of the Activity- Parameters:
context- - process context for this workflow- Returns:
- resulting process context
- Throws:
Exception
-