Class AbstractRuleProcessor<T>
java.lang.Object
org.broadleafcommerce.common.rule.AbstractRuleProcessor<T>
- All Implemented Interfaces:
RuleProcessor<T>
- Direct Known Subclasses:
AbstractCartRuleProcessor
,PageDefaultRuleProcessor
,StructuredContentDefaultRuleProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.commons.logging.Log
protected org.mvel2.ParserContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Boolean
executeExpression
(String expression, Map<String, Object> vars) Helpful method for processing a boolean MVEL expression and associated arguments.List of class names to add to the MVEL ParserContext.protected org.mvel2.ParserContext
Having a parser context that imports the classes speeds MVEL by up to 60%.void
setContextClassNames
(Map<String, String> contextClassNames) List of class names to add to the MVEL ParserContext.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.broadleafcommerce.common.rule.RuleProcessor
checkForMatch
-
Field Details
-
LOG
protected final org.apache.commons.logging.Log LOG -
parserContext
protected org.mvel2.ParserContext parserContext -
contextClassNames
-
-
Constructor Details
-
AbstractRuleProcessor
public AbstractRuleProcessor()
-
-
Method Details
-
getParserContext
protected org.mvel2.ParserContext getParserContext()Having a parser context that imports the classes speeds MVEL by up to 60%. -
executeExpression
Helpful method for processing a boolean MVEL expression and associated arguments.Caches the expression in an LRUCache.
- Parameters:
expression
-vars
-- Returns:
- the result of the expression
-
getContextClassNames
List of class names to add to the MVEL ParserContext. -
setContextClassNames
List of class names to add to the MVEL ParserContext.
-