Class ValidateProductOptionsActivity
java.lang.Object
org.broadleafcommerce.core.workflow.BaseActivity<ProcessContext<CheckoutSeed>>
org.broadleafcommerce.core.checkout.service.workflow.ValidateProductOptionsActivity
- All Implemented Interfaces:
Activity<ProcessContext<CheckoutSeed>>,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.core.Ordered
@Component("blValidateProductOptionsActivity")
public class ValidateProductOptionsActivity
extends BaseActivity<ProcessContext<CheckoutSeed>>
This is an required activity to valiate if required product options are in the order.
If sku browsing is enabled, product option data will not be available. In this case, the following validation is skipped.
- Author:
- Priyesh Patel
-
Field Summary
FieldsFields 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<CheckoutSeed> context) Called by the encompassing processor to activate the execution of the Activityprotected List<DiscreteOrderItem>getOrderItems(Order order) protected booleanisMissingRequiredAttribute(boolean isRequired, boolean hasStrategy, boolean isAddOrNoneType, boolean isSubmitType, String attributeValue) protected booleanshouldValidateWithException(boolean hasValidationType, boolean hasStrategy, boolean isAddOrNoneType, boolean isSubmitType) Methods inherited from class org.broadleafcommerce.core.workflow.BaseActivity
getAutomaticallyRegisterRollbackHandler, getBeanName, getErrorHandler, getOrder, getRollbackHandler, getRollbackRegion, getStateConfiguration, setAutomaticallyRegisterRollbackHandler, setBeanName, setErrorHandler, setOrder, setRollbackHandler, setRollbackRegion, setStateConfiguration, shouldExecute
-
Field Details
-
ORDER
public static final int ORDER- See Also:
-
productOptionValidationService
-
-
Constructor Details
-
ValidateProductOptionsActivity
public ValidateProductOptionsActivity()
-
-
Method Details
-
execute
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
-
getOrderItems
-
shouldValidateWithException
protected boolean shouldValidateWithException(boolean hasValidationType, boolean hasStrategy, boolean isAddOrNoneType, boolean isSubmitType) -
isMissingRequiredAttribute
protected boolean isMissingRequiredAttribute(boolean isRequired, boolean hasStrategy, boolean isAddOrNoneType, boolean isSubmitType, String attributeValue) -
getProductOptionValidationStrategyType
-