Examples of evaluate()


Examples of org.mule.api.expression.ExpressionEvaluator.evaluate()

        ExpressionEvaluator extractor = (ExpressionEvaluator) evaluators.get(evaluator);
        if (extractor == null)
        {
            throw new IllegalArgumentException(CoreMessages.expressionEvaluatorNotRegistered(evaluator).getMessage());
        }
        Object result = extractor.evaluate(expression, message);
        //TODO Handle empty collections || (result instanceof Collection && ((Collection)result).size()==0)
        if (failIfNull && (result == null))
        {
            throw new RequiredValueException(CoreMessages.expressionEvaluatorReturnedNull(evaluator, expression));
        }

Examples of org.mule.api.expression.ExpressionManager.evaluate()

        if (!StringUtils.isEmpty(expectExceptionThatSatisfies))
        {
            ExpressionManager expressionManager = muleContext.getExpressionManager();
            if (expressionManager.isExpression(expectExceptionThatSatisfies))
            {
                Boolean expressionResult = (Boolean) expressionManager.evaluate(expectExceptionThatSatisfies, event);
                if (!expressionResult)
                {
                    fail("The exception does not match your MEL expression");
                }
                return true;

Examples of org.mule.el.mvel.MVELExpressionLanguage.evaluate()

    public void testShortcutVariable() throws RegistrationException, InitialisationException
    {
        MVELExpressionLanguage mvel = new MVELExpressionLanguage(muleContext);
        mvel.initialise();

        Assert.assertEquals(muleContext.getConfiguration().getId(), mvel.evaluate("appShortcut.name"));
    }

    @Test
    public void testVariableAlias() throws RegistrationException, InitialisationException
    {

Examples of org.mule.expression.RegistryExpressionEvaluator.evaluate()

    {

        MuleMessage message = new DefaultMuleMessage(new Apple(), muleContext);
        RegistryExpressionEvaluator eval = new RegistryExpressionEvaluator();
        eval.setMuleContext(muleContext);
        Object o = eval.evaluate("bowlToBasket", message);
        assertNotNull(o);
        assertTrue(o instanceof Transformer);

        o = eval.evaluate("XXbowlToBasket*", message);
        assertNull(o);

Examples of org.mule.module.ognl.expression.OgnlExpressionEvaluator.evaluate()

        Banana banana = new Banana();
        banana.bite();
        FruitBowl payload = new FruitBowl(apple, banana);
        DefaultMuleMessage msg = new DefaultMuleMessage(payload, muleContext);
        OgnlExpressionEvaluator e = new OgnlExpressionEvaluator();
        Object value = e.evaluate("apple.washed", msg);
        assertNotNull(value);
        assertTrue(value instanceof Boolean);
        assertTrue(((Boolean) value).booleanValue());

        value = e.evaluate("bar", msg);

Examples of org.mule.module.xml.expression.JXPathExpressionEvaluator.evaluate()

        apple.wash();
        FruitBowl payload = new FruitBowl(apple, new Banana());
        DefaultMuleMessage msg = new DefaultMuleMessage(payload, muleContext);

        JXPathExpressionEvaluator e = new JXPathExpressionEvaluator();
        Object value = e.evaluate("apple/washed", msg);
        assertNotNull(value);
        assertTrue(value instanceof Boolean);
        assertTrue(((Boolean) value).booleanValue());

        value = e.evaluate("bar", msg);

Examples of org.mule.routing.correlation.CorrelationPropertiesExpressionEvaluator.evaluate()

        String correlationId = UUID.getUUID();
       
        MuleMessage message = new DefaultMuleMessage("test", props, muleContext);
        message.setCorrelationId(correlationId);
       
        Object result = evaluator.evaluate(MuleProperties.MULE_CORRELATION_ID_PROPERTY, message);
        assertNotNull(result);
        assertEquals(correlationId, result);
    }
   
    public void testCorrelationManagerNullResult()

Examples of org.nasutekds.server.admin.condition.Condition.evaluate()

              Message msg = ERR_DSCFG_ERROR_GET_CHILD_MONFE.get(rufn);
              throw new ClientException(LDAPResultCode.NO_SUCH_OBJECT, msg);
            }

            Condition condition = apd.getTargetIsEnabledCondition();
            while (!condition.evaluate(context, ref)) {
              boolean isBadReference = true;

              if (condition instanceof ContainsCondition) {
                // Attempt to automatically enable the managed object.
                ContainsCondition cvc = (ContainsCondition) condition;

Examples of org.netbeans.api.debugger.jpda.JPDADebugger.evaluate()

                        v = operation.getReturnValue();
                    }
                }
            }
            if (v == null) {
                v = d.evaluate (expression);
            }
            String type = v.getType ();
            if (v instanceof ObjectVariable)
                try {
                    String toString = null;

Examples of org.noname.designer.core.interfaces.IEvaluator.evaluate()

    try {
      if (statements != null && !statements.isEmpty()) {
        for (int i = 0; i < statements.size(); i++) {
          Statement statement = (Statement) statements.get(i);
          IEvaluator evaluator = (IEvaluator) Platform.getAdapterManager().getAdapter(statement, IEvaluator.class);
          int result = evaluator.evaluate(context);
          switch (result) {
          case CONTINUE:
            return CONTINUE;
          case BREAK:
            return BREAK;
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.