@Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof ExpressionEnricher) { muleContext.getExpressionManager().registerEnricher((ExpressionEnricher) bean); } return bean; }
/** * A lifecycle method where implementor should free up any resources. If an * exception is thrown it should just be logged and processing should continue. * This method should not throw Runtime exceptions. */ public void dispose() { context.getExpressionManager().clearEvaluators(); } }
public void initialise() throws InitialisationException { expressionManager = muleContext.getExpressionManager(); config.validate(expressionManager); }
@Override public Object transform(Object input) { String token = (String) input; if (muleContext.getExpressionManager().isExpression(token)) { token = muleContext.getExpressionManager().parse(token, event, true); } return token; } }, URL_ENCODER);
@Override public void initialise() throws InitialisationException { if (value != null) { value.initialize(muleContext.getExpressionManager()); } }
@Override public Object transformMessage(MuleMessage message, String outputEncoding) throws TransformerException { if(template == null) { throw new IllegalArgumentException("Template cannot be null"); } return muleContext.getExpressionManager().parse(template, message); }
public Object process(Object object) { if(object instanceof ExpressionEnricher) { context.getExpressionManager().registerEnricher((ExpressionEnricher) object); } return object; }
@Override public void initialise() throws InitialisationException { valueEvaluator.initialize(muleContext.getExpressionManager()); } }
private String parse(String value, MuleMessage message) { if(value != null) { return muleContext.getExpressionManager().parse(value, message); } return value; }
@Override public void initialise() throws InitialisationException { super.initialise(); expressionManager = muleContext.getExpressionManager(); }
public void initialise() throws InitialisationException { initLogger(); expressionManager = muleContext.getExpressionManager(); }
public Object evaluate(String expression, MuleMessage message) { if(expression==null) { return message; } int i = expression.indexOf("."); ExpressionConfig config = getExpressionConfig(expression.substring(0, i), expression.substring(i+1)); String fullExpression = config.getFullExpression(muleContext.getExpressionManager()); return muleContext.getExpressionManager().evaluate(fullExpression, message); }
@Override public void initialise() throws InitialisationException { super.initialise(); identifierEvaluator.initialize(muleContext.getExpressionManager()); valueEvaluator.initialize(muleContext.getExpressionManager()); }
/** * Used to log the error passed into this Exception Listener * * @param t the exception thrown */ protected void logException(Throwable t, MuleEvent event) { if (this.muleContext.getExpressionManager().evaluateBoolean(logException, event, true, true)) { doLogException(t); } }
@Override public void initialise() throws InitialisationException { super.initialise(); valueEvaluator.initialize(muleContext.getExpressionManager()); }
@Override public void initialise() throws InitialisationException { super.initialise(); this.propertyNameEvaluator.initialize(muleContext.getExpressionManager()); }
@Override public void initialise() throws InitialisationException { super.initialise(); nameEvaluator.initialize(muleContext.getExpressionManager()); }
@Override public void initialise() throws InitialisationException { super.initialise(); this.attachmentNameEvaluator.initialize(muleContext.getExpressionManager()); }
@Override public void initialise() throws InitialisationException { super.initialise(); this.identifierEvaluator.initialize(muleContext.getExpressionManager()); }
public String getCorrelationId(MuleMessage message) { String id = (String) muleContext.getExpressionManager().evaluate(getCorrelationIdExpression(), message, false); if (id == null) { id = getMessageId(message); } return id; }