Search in sources :

Example 86 with EvaluationContext

use of org.springframework.expression.EvaluationContext in project uPortal by Jasig.

the class PortletSpELServiceImpl method getValue.

@Override
public <T> T getValue(String expressionString, PortletRequest request, Class<T> desiredResultType) {
    final Expression expression = parseExpression(expressionString);
    final EvaluationContext evaluationContext = getEvaluationContext(request);
    return expression.getValue(evaluationContext, desiredResultType);
}
Also used : Expression(org.springframework.expression.Expression) EvaluationContext(org.springframework.expression.EvaluationContext) StandardEvaluationContext(org.springframework.expression.spel.support.StandardEvaluationContext)

Aggregations

EvaluationContext (org.springframework.expression.EvaluationContext)86 Test (org.junit.Test)72 Expression (org.springframework.expression.Expression)53 StandardEvaluationContext (org.springframework.expression.spel.support.StandardEvaluationContext)52 SpelExpressionParser (org.springframework.expression.spel.standard.SpelExpressionParser)32 ArrayList (java.util.ArrayList)12 Authentication (org.springframework.security.core.Authentication)11 ExpressionParser (org.springframework.expression.ExpressionParser)10 SpelExpression (org.springframework.expression.spel.standard.SpelExpression)10 OAuth2Authentication (org.springframework.security.oauth2.provider.OAuth2Authentication)10 MethodInvocation (org.aopalliance.intercept.MethodInvocation)9 SimpleMethodInvocation (org.springframework.security.util.SimpleMethodInvocation)9 List (java.util.List)8 OAuth2Request (org.springframework.security.oauth2.provider.OAuth2Request)8 TypedValue (org.springframework.expression.TypedValue)6 UsernamePasswordAuthenticationToken (org.springframework.security.authentication.UsernamePasswordAuthenticationToken)6 Map (java.util.Map)5 TypeDescriptor (org.springframework.core.convert.TypeDescriptor)5 AccessException (org.springframework.expression.AccessException)5 Method (java.lang.reflect.Method)4