Search in sources :

Example 1 with BeanELResolver

use of javax.el.BeanELResolver in project tomcat by apache.

the class ELContextImpl method getDefaultResolver.

public static ELResolver getDefaultResolver(ExpressionFactory factory) {
    if (Constants.IS_SECURITY_ENABLED) {
        CompositeELResolver defaultResolver = new CompositeELResolver();
        defaultResolver.add(factory.getStreamELResolver());
        defaultResolver.add(new StaticFieldELResolver());
        defaultResolver.add(new MapELResolver());
        defaultResolver.add(new ResourceBundleELResolver());
        defaultResolver.add(new ListELResolver());
        defaultResolver.add(new ArrayELResolver());
        defaultResolver.add(new BeanELResolver());
        return defaultResolver;
    } else {
        return DefaultResolver;
    }
}
Also used : StaticFieldELResolver(javax.el.StaticFieldELResolver) CompositeELResolver(javax.el.CompositeELResolver) ResourceBundleELResolver(javax.el.ResourceBundleELResolver) ListELResolver(javax.el.ListELResolver) MapELResolver(javax.el.MapELResolver) ArrayELResolver(javax.el.ArrayELResolver) BeanELResolver(javax.el.BeanELResolver)

Example 2 with BeanELResolver

use of javax.el.BeanELResolver in project tomee by apache.

the class StatefulConversationScopedTOMEE1138Test method el.

@Test
public void el() {
    final BeanELResolver elResolver = new BeanELResolver();
    assertEquals("John", elResolver.getValue(new ELContext() {

        @Override
        public ELResolver getELResolver() {
            return elResolver;
        }

        @Override
        public FunctionMapper getFunctionMapper() {
            return new FunctionMapper() {

                @Override
                public Method resolveFunction(final String prefix, final String localName) {
                    return null;
                }
            };
        }

        @Override
        public VariableMapper getVariableMapper() {
            return new VariableMapper() {

                @Override
                public ValueExpression resolveVariable(final String variable) {
                    return null;
                }

                @Override
                public ValueExpression setVariable(final String variable, final ValueExpression expression) {
                    return null;
                }
            };
        }
    }, conversationByName, "name"));
}
Also used : ELContext(javax.el.ELContext) VariableMapper(javax.el.VariableMapper) ValueExpression(javax.el.ValueExpression) BeanELResolver(javax.el.BeanELResolver) FunctionMapper(javax.el.FunctionMapper) Test(org.junit.Test)

Example 3 with BeanELResolver

use of javax.el.BeanELResolver in project jersey by jersey.

the class LinkELContext method getELResolver.

@Override
public ELResolver getELResolver() {
    CompositeELResolver resolver = new CompositeELResolver();
    resolver.add(new ResponseContextResolver(entity, resource, instance));
    resolver.add(new BeanELResolver(true));
    return resolver;
}
Also used : CompositeELResolver(javax.el.CompositeELResolver) BeanELResolver(javax.el.BeanELResolver)

Example 4 with BeanELResolver

use of javax.el.BeanELResolver in project oxCore by GluuFederation.

the class ContextProducer method createELResolver.

private CompositeELResolver createELResolver(BeanManager beanManager) {
    CompositeELResolver resolver = new CompositeELResolver();
    resolver.add(beanManager.getELResolver());
    resolver.add(new MapELResolver());
    resolver.add(new ListELResolver());
    resolver.add(new ArrayELResolver());
    resolver.add(new ResourceBundleELResolver());
    resolver.add(new BeanELResolver());
    return resolver;
}
Also used : CompositeELResolver(javax.el.CompositeELResolver) ListELResolver(javax.el.ListELResolver) ResourceBundleELResolver(javax.el.ResourceBundleELResolver) MapELResolver(javax.el.MapELResolver) ArrayELResolver(javax.el.ArrayELResolver) BeanELResolver(javax.el.BeanELResolver)

Example 5 with BeanELResolver

use of javax.el.BeanELResolver in project sling by apache.

the class JspApplicationContextImpl method createELResolver.

private ELResolver createELResolver() {
    this.instantiated = true;
    if (this.resolver == null) {
        CompositeELResolver r = new CompositeELResolver();
        r.add(new ImplicitObjectELResolver());
        for (Iterator itr = this.resolvers.iterator(); itr.hasNext(); ) {
            r.add((ELResolver) itr.next());
        }
        r.add(new MapELResolver());
        r.add(new ResourceBundleELResolver());
        r.add(new ListELResolver());
        r.add(new ArrayELResolver());
        r.add(new BeanELResolver());
        r.add(new ScopedAttributeELResolver());
        this.resolver = r;
    }
    return this.resolver;
}
Also used : CompositeELResolver(javax.el.CompositeELResolver) ImplicitObjectELResolver(javax.servlet.jsp.el.ImplicitObjectELResolver) Iterator(java.util.Iterator) ScopedAttributeELResolver(javax.servlet.jsp.el.ScopedAttributeELResolver) ResourceBundleELResolver(javax.el.ResourceBundleELResolver) ListELResolver(javax.el.ListELResolver) MapELResolver(javax.el.MapELResolver) ArrayELResolver(javax.el.ArrayELResolver) BeanELResolver(javax.el.BeanELResolver)

Aggregations

BeanELResolver (javax.el.BeanELResolver)5 CompositeELResolver (javax.el.CompositeELResolver)4 ArrayELResolver (javax.el.ArrayELResolver)3 ListELResolver (javax.el.ListELResolver)3 MapELResolver (javax.el.MapELResolver)3 ResourceBundleELResolver (javax.el.ResourceBundleELResolver)3 Iterator (java.util.Iterator)1 ELContext (javax.el.ELContext)1 FunctionMapper (javax.el.FunctionMapper)1 StaticFieldELResolver (javax.el.StaticFieldELResolver)1 ValueExpression (javax.el.ValueExpression)1 VariableMapper (javax.el.VariableMapper)1 ImplicitObjectELResolver (javax.servlet.jsp.el.ImplicitObjectELResolver)1 ScopedAttributeELResolver (javax.servlet.jsp.el.ScopedAttributeELResolver)1 Test (org.junit.Test)1