Class PageDefaultRuleProcessor
java.lang.Object
org.broadleafcommerce.common.rule.AbstractRuleProcessor<PageDTO>
org.broadleafcommerce.cms.page.service.PageDefaultRuleProcessor
- All Implemented Interfaces:
RuleProcessor<PageDTO>
@Service("blPageDefaultRuleProcessor")
public class PageDefaultRuleProcessor
extends AbstractRuleProcessor<PageDTO>
By default, this rule processor combines all of the rules from
Page.getPageMatchRules()
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(PageDTO page, Map<String, Object> vars) Returns true if all of the rules associated with the passed inPageitem match based on the passed in vars.List of class names to add to the MVEL ParserContext.Methods inherited from class org.broadleafcommerce.common.rule.AbstractRuleProcessor
executeExpression, getParserContext, setContextClassNames
-
Constructor Details
-
PageDefaultRuleProcessor
public PageDefaultRuleProcessor()
-
-
Method Details
-
checkForMatch
Returns true if all of the rules associated with the passed inPageitem match based on the passed in vars.Also returns true if no rules are present for the passed in item.
- Parameters:
page- - a page item to testvars- - a map of objects used by the rule MVEL expressions- Returns:
- the result of the rule checks
-
getContextClassNames
Description copied from class:AbstractRuleProcessorList of class names to add to the MVEL ParserContext.- Overrides:
getContextClassNamesin classAbstractRuleProcessor<PageDTO>
-