Search in sources :

Example 1 with GlobalVariableResolverFactory

use of org.mule.runtime.core.internal.el.mvel.GlobalVariableResolverFactory in project mule by mulesoft.

the class AbstractVarAssignmentDataTypePropagatorTestCase method createMvelExpressionLanguageContext.

protected MVELExpressionLanguageContext createMvelExpressionLanguageContext(PrivilegedEvent testEvent, PrivilegedEvent.Builder builder, ParserConfiguration parserConfiguration) {
    final MVELExpressionLanguageContext context = new MVELExpressionLanguageContext(parserConfiguration, muleContext);
    final StaticVariableResolverFactory staticContext = new StaticVariableResolverFactory(parserConfiguration, muleContext);
    final GlobalVariableResolverFactory globalContext = new GlobalVariableResolverFactory(emptyMap(), emptyMap(), parserConfiguration, muleContext);
    final DelegateVariableResolverFactory innerDelegate = new DelegateVariableResolverFactory(globalContext, new VariableVariableResolverFactory(parserConfiguration, muleContext, testEvent, builder));
    final DelegateVariableResolverFactory delegate = new DelegateVariableResolverFactory(staticContext, new MessageVariableResolverFactory(parserConfiguration, muleContext, testEvent, builder, innerDelegate));
    context.setNextFactory(new CachedMapVariableResolverFactory(emptyMap(), delegate));
    return context;
}
Also used : DelegateVariableResolverFactory(org.mule.runtime.core.internal.el.mvel.DelegateVariableResolverFactory) MVELExpressionLanguageContext(org.mule.runtime.core.internal.el.mvel.MVELExpressionLanguageContext) GlobalVariableResolverFactory(org.mule.runtime.core.internal.el.mvel.GlobalVariableResolverFactory) MessageVariableResolverFactory(org.mule.runtime.core.internal.el.mvel.MessageVariableResolverFactory) CachedMapVariableResolverFactory(org.mule.mvel2.integration.impl.CachedMapVariableResolverFactory) StaticVariableResolverFactory(org.mule.runtime.core.internal.el.mvel.StaticVariableResolverFactory) VariableVariableResolverFactory(org.mule.runtime.core.internal.el.mvel.VariableVariableResolverFactory)

Example 2 with GlobalVariableResolverFactory

use of org.mule.runtime.core.internal.el.mvel.GlobalVariableResolverFactory in project mule by mulesoft.

the class AbstractVarExpressionDataTypeResolverTestCase method createMvelExpressionLanguageContext.

protected MVELExpressionLanguageContext createMvelExpressionLanguageContext(PrivilegedEvent testEvent, ParserConfiguration parserConfiguration) {
    final MVELExpressionLanguageContext context = new MVELExpressionLanguageContext(parserConfiguration, muleContext);
    final StaticVariableResolverFactory staticContext = new StaticVariableResolverFactory(parserConfiguration, muleContext);
    final GlobalVariableResolverFactory globalContext = new GlobalVariableResolverFactory(Collections.EMPTY_MAP, Collections.EMPTY_MAP, parserConfiguration, muleContext);
    final DelegateVariableResolverFactory innerDelegate = new DelegateVariableResolverFactory(globalContext, new VariableVariableResolverFactory(parserConfiguration, muleContext, testEvent, PrivilegedEvent.builder(testEvent)));
    final DelegateVariableResolverFactory delegate = new DelegateVariableResolverFactory(staticContext, new MessageVariableResolverFactory(parserConfiguration, muleContext, testEvent, PrivilegedEvent.builder(testEvent), innerDelegate));
    context.setNextFactory(new CachedMapVariableResolverFactory(Collections.EMPTY_MAP, delegate));
    return context;
}
Also used : DelegateVariableResolverFactory(org.mule.runtime.core.internal.el.mvel.DelegateVariableResolverFactory) MVELExpressionLanguageContext(org.mule.runtime.core.internal.el.mvel.MVELExpressionLanguageContext) GlobalVariableResolverFactory(org.mule.runtime.core.internal.el.mvel.GlobalVariableResolverFactory) MessageVariableResolverFactory(org.mule.runtime.core.internal.el.mvel.MessageVariableResolverFactory) CachedMapVariableResolverFactory(org.mule.mvel2.integration.impl.CachedMapVariableResolverFactory) StaticVariableResolverFactory(org.mule.runtime.core.internal.el.mvel.StaticVariableResolverFactory) VariableVariableResolverFactory(org.mule.runtime.core.internal.el.mvel.VariableVariableResolverFactory)

Aggregations

CachedMapVariableResolverFactory (org.mule.mvel2.integration.impl.CachedMapVariableResolverFactory)2 DelegateVariableResolverFactory (org.mule.runtime.core.internal.el.mvel.DelegateVariableResolverFactory)2 GlobalVariableResolverFactory (org.mule.runtime.core.internal.el.mvel.GlobalVariableResolverFactory)2 MVELExpressionLanguageContext (org.mule.runtime.core.internal.el.mvel.MVELExpressionLanguageContext)2 MessageVariableResolverFactory (org.mule.runtime.core.internal.el.mvel.MessageVariableResolverFactory)2 StaticVariableResolverFactory (org.mule.runtime.core.internal.el.mvel.StaticVariableResolverFactory)2 VariableVariableResolverFactory (org.mule.runtime.core.internal.el.mvel.VariableVariableResolverFactory)2