Class RuleFieldValidator
java.lang.Object
org.broadleafcommerce.openadmin.server.service.persistence.validation.RuleFieldValidator
- All Implemented Interfaces:
PopulateValueRequestValidator,org.springframework.core.Ordered
@Component("blRuleFieldValidator")
public class RuleFieldValidator
extends Object
implements PopulateValueRequestValidator
Validates that a rule can be parsed out successfully. Most of this comes from
RuleFieldPersistenceProvider.- Author:
- Phillip Verheyden (phillipuniverse)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RuleFieldExtractionUtilityprotected org.broadleafcommerce.common.sandbox.SandBoxHelperFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanHandleValidation(PopulateValueRequest populateValueRequest) protected StringintgetOrder()validate(PopulateValueRequest populateValueRequest, Serializable instance) Validates a population request prior to invoking anyFieldPersistenceProviders.
-
Field Details
-
ruleFieldExtractionUtility
-
sandBoxHelper
protected org.broadleafcommerce.common.sandbox.SandBoxHelper sandBoxHelper
-
-
Constructor Details
-
RuleFieldValidator
public RuleFieldValidator()
-
-
Method Details
-
validate
public PropertyValidationResult validate(PopulateValueRequest populateValueRequest, Serializable instance) Description copied from interface:PopulateValueRequestValidatorValidates a population request prior to invoking anyFieldPersistenceProviders. If no validation could be performed for the givenPopulateValueRequestthen return true to let it pass on to a differentPopulateValueRequestValidatoror on to aFieldPersistenceProvider.- Specified by:
validatein interfacePopulateValueRequestValidator- Parameters:
populateValueRequest- thePopulateValueRequestthat should be validatedinstance- the Hibernate entity that will attempt to be populated- Returns:
- false if the
PopulateValueRequestfailed validation. In this case, the request should not be passed to anyFieldPersistenceProviders.
-
getMvelParsingErrorMesage
-
canHandleValidation
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-