Search in sources :

Example 1 with CompositeELResolver

use of org.camunda.bpm.engine.impl.javax.el.CompositeELResolver in project camunda-bpm-platform by camunda.

the class CdiExpressionManager method createElResolver.

@Override
protected ELResolver createElResolver() {
    CompositeELResolver compositeElResolver = new CompositeELResolver();
    compositeElResolver.add(new VariableScopeElResolver());
    compositeElResolver.add(new VariableContextElResolver());
    compositeElResolver.add(new CdiResolver());
    compositeElResolver.add(new ArrayELResolver());
    compositeElResolver.add(new ListELResolver());
    compositeElResolver.add(new MapELResolver());
    compositeElResolver.add(new BeanELResolver());
    return compositeElResolver;
}
Also used : CdiResolver(org.camunda.bpm.engine.cdi.impl.el.CdiResolver) CompositeELResolver(org.camunda.bpm.engine.impl.javax.el.CompositeELResolver) VariableContextElResolver(org.camunda.bpm.engine.impl.el.VariableContextElResolver) ListELResolver(org.camunda.bpm.engine.impl.javax.el.ListELResolver) MapELResolver(org.camunda.bpm.engine.impl.javax.el.MapELResolver) VariableScopeElResolver(org.camunda.bpm.engine.impl.el.VariableScopeElResolver) ArrayELResolver(org.camunda.bpm.engine.impl.javax.el.ArrayELResolver) BeanELResolver(org.camunda.bpm.engine.impl.javax.el.BeanELResolver)

Example 2 with CompositeELResolver

use of org.camunda.bpm.engine.impl.javax.el.CompositeELResolver in project camunda-bpm-platform by camunda.

the class ExpressionManager method createElResolver.

protected ELResolver createElResolver() {
    CompositeELResolver elResolver = new CompositeELResolver();
    elResolver.add(new VariableScopeElResolver());
    elResolver.add(new VariableContextElResolver());
    elResolver.add(new MockElResolver());
    if (beans != null) {
        // ACT-1102: Also expose all beans in configuration when using standalone engine, not
        // in spring-context
        elResolver.add(new ReadOnlyMapELResolver(beans));
    }
    elResolver.add(new ProcessApplicationElResolverDelegate());
    elResolver.add(new ArrayELResolver());
    elResolver.add(new ListELResolver());
    elResolver.add(new MapELResolver());
    elResolver.add(new ProcessApplicationBeanElResolverDelegate());
    return elResolver;
}
Also used : CompositeELResolver(org.camunda.bpm.engine.impl.javax.el.CompositeELResolver) ListELResolver(org.camunda.bpm.engine.impl.javax.el.ListELResolver) MockElResolver(org.camunda.bpm.engine.test.mock.MockElResolver) MapELResolver(org.camunda.bpm.engine.impl.javax.el.MapELResolver) ArrayELResolver(org.camunda.bpm.engine.impl.javax.el.ArrayELResolver)

Example 3 with CompositeELResolver

use of org.camunda.bpm.engine.impl.javax.el.CompositeELResolver in project camunda-bpm-platform by camunda.

the class SpringExpressionManager method createElResolver.

@Override
protected ELResolver createElResolver() {
    CompositeELResolver compositeElResolver = new CompositeELResolver();
    compositeElResolver.add(new VariableScopeElResolver());
    compositeElResolver.add(new VariableContextElResolver());
    if (beans != null) {
        // Only expose limited set of beans in expressions
        compositeElResolver.add(new ReadOnlyMapELResolver(beans));
    } else {
        // Expose full application-context in expressions
        compositeElResolver.add(new ApplicationContextElResolver(applicationContext));
    }
    compositeElResolver.add(new ArrayELResolver());
    compositeElResolver.add(new ListELResolver());
    compositeElResolver.add(new MapELResolver());
    compositeElResolver.add(new BeanELResolver());
    return compositeElResolver;
}
Also used : ReadOnlyMapELResolver(org.camunda.bpm.engine.impl.el.ReadOnlyMapELResolver) CompositeELResolver(org.camunda.bpm.engine.impl.javax.el.CompositeELResolver) VariableContextElResolver(org.camunda.bpm.engine.impl.el.VariableContextElResolver) ListELResolver(org.camunda.bpm.engine.impl.javax.el.ListELResolver) ReadOnlyMapELResolver(org.camunda.bpm.engine.impl.el.ReadOnlyMapELResolver) MapELResolver(org.camunda.bpm.engine.impl.javax.el.MapELResolver) VariableScopeElResolver(org.camunda.bpm.engine.impl.el.VariableScopeElResolver) ArrayELResolver(org.camunda.bpm.engine.impl.javax.el.ArrayELResolver) BeanELResolver(org.camunda.bpm.engine.impl.javax.el.BeanELResolver)

Example 4 with CompositeELResolver

use of org.camunda.bpm.engine.impl.javax.el.CompositeELResolver in project camunda-bpm-platform by camunda.

the class DefaultElResolverLookup method lookupResolver.

public static final ELResolver lookupResolver(AbstractProcessApplication processApplication) {
    ServiceLoader<ProcessApplicationElResolver> providers = ServiceLoader.load(ProcessApplicationElResolver.class);
    List<ProcessApplicationElResolver> sortedProviders = new ArrayList<ProcessApplicationElResolver>();
    for (ProcessApplicationElResolver provider : providers) {
        sortedProviders.add(provider);
    }
    if (sortedProviders.isEmpty()) {
        return null;
    } else {
        // sort providers first
        Collections.sort(sortedProviders, new ProcessApplicationElResolver.ProcessApplicationElResolverSorter());
        // add all providers to a composite resolver
        CompositeELResolver compositeResolver = new CompositeELResolver();
        StringBuilder summary = new StringBuilder();
        summary.append(String.format("ElResolvers found for Process Application %s", processApplication.getName()));
        for (ProcessApplicationElResolver processApplicationElResolver : sortedProviders) {
            ELResolver elResolver = processApplicationElResolver.getElResolver(processApplication);
            if (elResolver != null) {
                compositeResolver.add(elResolver);
                summary.append(String.format("Class %s", processApplicationElResolver.getClass().getName()));
            } else {
                LOG.noElResolverProvided(processApplication.getName(), processApplicationElResolver.getClass().getName());
            }
        }
        LOG.paElResolversDiscovered(summary.toString());
        return compositeResolver;
    }
}
Also used : CompositeELResolver(org.camunda.bpm.engine.impl.javax.el.CompositeELResolver) ELResolver(org.camunda.bpm.engine.impl.javax.el.ELResolver) CompositeELResolver(org.camunda.bpm.engine.impl.javax.el.CompositeELResolver) ArrayList(java.util.ArrayList) ProcessApplicationElResolver(org.camunda.bpm.application.ProcessApplicationElResolver)

Example 5 with CompositeELResolver

use of org.camunda.bpm.engine.impl.javax.el.CompositeELResolver in project camunda-bpm-platform by camunda.

the class MockExpressionManager method createElResolver.

@Override
protected ELResolver createElResolver() {
    CompositeELResolver compositeElResolver = new CompositeELResolver();
    compositeElResolver.add(new VariableScopeElResolver());
    compositeElResolver.add(new VariableContextElResolver());
    compositeElResolver.add(new MockElResolver());
    compositeElResolver.add(new ArrayELResolver());
    compositeElResolver.add(new ListELResolver());
    compositeElResolver.add(new MapELResolver());
    compositeElResolver.add(new BeanELResolver());
    return compositeElResolver;
}
Also used : CompositeELResolver(org.camunda.bpm.engine.impl.javax.el.CompositeELResolver) VariableContextElResolver(org.camunda.bpm.engine.impl.el.VariableContextElResolver) ListELResolver(org.camunda.bpm.engine.impl.javax.el.ListELResolver) MapELResolver(org.camunda.bpm.engine.impl.javax.el.MapELResolver) VariableScopeElResolver(org.camunda.bpm.engine.impl.el.VariableScopeElResolver) ArrayELResolver(org.camunda.bpm.engine.impl.javax.el.ArrayELResolver) BeanELResolver(org.camunda.bpm.engine.impl.javax.el.BeanELResolver)

Aggregations

CompositeELResolver (org.camunda.bpm.engine.impl.javax.el.CompositeELResolver)6 ArrayELResolver (org.camunda.bpm.engine.impl.javax.el.ArrayELResolver)5 ListELResolver (org.camunda.bpm.engine.impl.javax.el.ListELResolver)5 MapELResolver (org.camunda.bpm.engine.impl.javax.el.MapELResolver)5 BeanELResolver (org.camunda.bpm.engine.impl.javax.el.BeanELResolver)4 VariableContextElResolver (org.camunda.bpm.engine.impl.el.VariableContextElResolver)3 VariableScopeElResolver (org.camunda.bpm.engine.impl.el.VariableScopeElResolver)3 ArrayList (java.util.ArrayList)1 ProcessApplicationElResolver (org.camunda.bpm.application.ProcessApplicationElResolver)1 CdiResolver (org.camunda.bpm.engine.cdi.impl.el.CdiResolver)1 ReadOnlyMapELResolver (org.camunda.bpm.engine.impl.el.ReadOnlyMapELResolver)1 ELResolver (org.camunda.bpm.engine.impl.javax.el.ELResolver)1 ResourceBundleELResolver (org.camunda.bpm.engine.impl.javax.el.ResourceBundleELResolver)1 SimpleResolver (org.camunda.bpm.engine.impl.juel.SimpleResolver)1 MockElResolver (org.camunda.bpm.engine.test.mock.MockElResolver)1