Class PageDefaultRuleProcessor

java.lang.Object
org.broadleafcommerce.common.rule.AbstractRuleProcessor<org.broadleafcommerce.common.page.dto.PageDTO>
org.broadleafcommerce.cms.page.service.PageDefaultRuleProcessor
All Implemented Interfaces:
org.broadleafcommerce.common.rule.RuleProcessor<org.broadleafcommerce.common.page.dto.PageDTO>

@Service("blPageDefaultRuleProcessor") public class PageDefaultRuleProcessor extends org.broadleafcommerce.common.rule.AbstractRuleProcessor<org.broadleafcommerce.common.page.dto.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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    checkForMatch(org.broadleafcommerce.common.page.dto.PageDTO page, Map<String,Object> vars)
    Returns true if all of the rules associated with the passed in Page item match based on the passed in vars.
     

    Methods inherited from class org.broadleafcommerce.common.rule.AbstractRuleProcessor

    executeExpression, getParserContext, setContextClassNames

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PageDefaultRuleProcessor

      public PageDefaultRuleProcessor()
  • Method Details

    • checkForMatch

      public boolean checkForMatch(org.broadleafcommerce.common.page.dto.PageDTO page, Map<String,Object> vars)
      Returns true if all of the rules associated with the passed in Page item 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 test
      vars - - a map of objects used by the rule MVEL expressions
      Returns:
      the result of the rule checks
    • getContextClassNames

      public Map<String,String> getContextClassNames()
      Overrides:
      getContextClassNames in class org.broadleafcommerce.common.rule.AbstractRuleProcessor<org.broadleafcommerce.common.page.dto.PageDTO>