use of javax.el.ExpressionFactory in project wildfly by wildfly.
the class JspApplicationContextWrapper method getExpressionFactory.
@Override
public ExpressionFactory getExpressionFactory() {
if (factory == null) {
synchronized (this) {
if (factory == null) {
ExpressionFactory tmpfactory = delegate.getExpressionFactory();
for (ExpressionFactoryWrapper wrapper : wrapperList) {
tmpfactory = wrapper.wrap(tmpfactory, servletContext);
}
factory = tmpfactory;
}
}
}
return factory;
}
use of javax.el.ExpressionFactory in project Payara by payara.
the class WeldContextListenerTest method testcontextInitialized.
@Test
public void testcontextInitialized() throws Exception {
EasyMockSupport mockSupport = new EasyMockSupport();
ELResolver elResolver = mockSupport.createMock(ELResolver.class);
ExpressionFactory expressionFactory = mockSupport.createMock(ExpressionFactory.class);
StandardContext servletContext = new StandardContext();
servletContext.getServletContext();
ServletContextEvent servletContextEvent = mockSupport.createMock(ServletContextEvent.class);
BeanManager beanManager = mockSupport.createMock(BeanManager.class);
JspApplicationContextImpl jspApplicationContext = new JspApplicationContextImpl(servletContext);
expect(beanManager.getELResolver()).andReturn(elResolver);
expect(beanManager.wrapExpressionFactory(isA(ExpressionFactory.class))).andReturn(expressionFactory);
mockSupport.replayAll();
WeldContextListener weldContextListener = getWeldContextListener(beanManager, jspApplicationContext);
weldContextListener.contextInitialized(servletContextEvent);
assertSame(expressionFactory, jspApplicationContext.getExpressionFactory());
validateJspApplicationContext(jspApplicationContext, elResolver);
mockSupport.verifyAll();
mockSupport.resetAll();
}
use of javax.el.ExpressionFactory in project oxCore by GluuFederation.
the class FacesMessages method evalAsString.
public String evalAsString(String expression) {
if (facesContext == null) {
return expression;
}
ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
ELContext elContext = facesContext.getELContext();
ValueExpression valueExpression = expressionFactory.createValueExpression(elContext, expression, String.class);
String result = (String) valueExpression.getValue(elContext);
return result;
}
use of javax.el.ExpressionFactory in project camunda-engine-dmn by camunda.
the class FeelEngineFactoryImpl method createFeelEngine.
protected FeelEngine createFeelEngine() {
FeelToJuelTransform transform = createFeelToJuelTransform();
ExpressionFactory expressionFactory = createExpressionFactory();
ElContextFactory elContextFactory = createElContextFactory();
Cache<TransformExpressionCacheKey, String> transformExpressionCache = createTransformExpressionCache();
return new FeelEngineImpl(transform, expressionFactory, elContextFactory, transformExpressionCache);
}
Aggregations