Class OgnlFactory
java.lang.Object
com.peterphi.std.guice.common.ognl.OgnlFactory
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
clear()
static OgnlEvaluator
getInstance
(Object root, String expression) Get an OGNL Evaluator for a particular expression with a given inputstatic org.apache.commons.lang.text.StrLookup
newOgnlLookup
(Object root) Creates a lookup helper forStrTemplate
to allow the evaluation of OGNL blocks within strings.
Callers should probably usetemplate(String, Object)
instead.static String
Helper method that usesStrTemplate
and evaluates OGNL expressions within${...}
blocks
-
Method Details
-
clear
public static void clear() -
getInstance
Get an OGNL Evaluator for a particular expression with a given input- Parameters:
root
- an example instance of the root object that will be passed to this OGNL evaluatorexpression
- the OGNL expression- Returns:
- See Also:
-
template
Helper method that usesStrTemplate
and evaluates OGNL expressions within${...}
blocks- Parameters:
template
- the template textroot
- the root object for any OGNL invocations- Returns:
-
newOgnlLookup
Creates a lookup helper forStrTemplate
to allow the evaluation of OGNL blocks within strings.
Callers should probably usetemplate(String, Object)
instead.- Parameters:
root
- the root object for any OGNL invocations- Returns:
-