Examples of ExpressionRuntimeException


Examples of org.mule.api.expression.ExpressionRuntimeException

        Object o = muleContext.getRegistry().lookupObject(name);

        if (o == null && objectRequired)
        {
            throw new ExpressionRuntimeException(CoreMessages.expressionEvaluatorReturnedNull(NAME, expression));
        }
        else if (o == null || property == null)
        {
            return o;
        }
        else if(muleContext.getExpressionManager().isEvaluatorRegistered("bean"))
        {
            //Special handling of Mule object types
            if(o instanceof AbstractEndpointBuilder)
            {
                property = "endpointBuilder.endpoint." + property;
            }

            Object p = muleContext.getExpressionManager().evaluate("#[bean:" + property + "]", new DefaultMuleMessage(o, muleContext));
            if (p == null && propertyRequired)
            {
                throw new ExpressionRuntimeException(CoreMessages.expressionEvaluatorReturnedNull(NAME, name + "." + property));
            }
            else
            {
                return p;
            }
        }
        else
        {
            throw new ExpressionRuntimeException(CoreMessages.expressionEvaluatorNotRegistered("bean"));
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.