Class StructuredContentDefaultRuleProcessor
java.lang.Object
org.broadleafcommerce.common.rule.AbstractRuleProcessor<org.broadleafcommerce.common.structure.dto.StructuredContentDTO>
org.broadleafcommerce.cms.structure.service.StructuredContentDefaultRuleProcessor
- All Implemented Interfaces:
org.broadleafcommerce.common.rule.RuleProcessor<org.broadleafcommerce.common.structure.dto.StructuredContentDTO>
@Service("blContentDefaultRuleProcessor")
public class StructuredContentDefaultRuleProcessor
extends org.broadleafcommerce.common.rule.AbstractRuleProcessor<org.broadleafcommerce.common.structure.dto.StructuredContentDTO>
By default, this rule processor combines all of the rules from
StructuredContent.getStructuredContentMatchRules()
into a single MVEL expression.- Author:
- bpolster.
-
Field Summary
Fields inherited from class org.broadleafcommerce.common.rule.AbstractRuleProcessor
contextClassNames, parserContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckForMatch(org.broadleafcommerce.common.structure.dto.StructuredContentDTO sc, Map<String, Object> vars) Returns true if all of the rules associated with the passed inStructuredContentitem match based on the passed in vars.Methods inherited from class org.broadleafcommerce.common.rule.AbstractRuleProcessor
executeExpression, getParserContext, setContextClassNames
-
Constructor Details
-
StructuredContentDefaultRuleProcessor
public StructuredContentDefaultRuleProcessor()
-
-
Method Details
-
checkForMatch
public boolean checkForMatch(org.broadleafcommerce.common.structure.dto.StructuredContentDTO sc, Map<String, Object> vars) Returns true if all of the rules associated with the passed inStructuredContentitem match based on the passed in vars.Also returns true if no rules are present for the passed in item.
- Parameters:
sc- - a structured content item to testvars- - a map of objects used by the rule MVEL expressions- Returns:
- the result of the rule checks
-
getContextClassNames
- Overrides:
getContextClassNamesin classorg.broadleafcommerce.common.rule.AbstractRuleProcessor<org.broadleafcommerce.common.structure.dto.StructuredContentDTO>
-