Package org.apache.camel.model.language

Examples of org.apache.camel.model.language.SimpleExpression


               
                from("file:target/split").routeId("foo").noAutoStartup()
                    .split(body().tokenize(comma))
                        .parallelProcessing()
                        .streaming()
                        .setProperty("split", new SimpleExpression("${property.CamelSplitIndex}"))
                        .split(body().tokenize(LS))
                            .parallelProcessing()
                            .streaming()
                            .setBody(body().append(":Status=OK").append(LS))
                            .to("file:target/split/outbox?fileExist=Append&fileName=result${property.split}.txt")
                       .end()
                       .setBody(new SimpleExpression("${property.split} complete"))
                       .to("file:target/split/outbox?fileExist=Append&fileName=result${property.split}.txt")
                    .end().to("mock:result");

            }
        };
View Full Code Here


     *
     * @param text the expression to be evaluated
     * @return the builder to continue processing the DSL
     */
    public T simple(String text) {
        return expression(new SimpleExpression(text));
    }
View Full Code Here

     * @param text the expression to be evaluated
     * @param resultType the result type
     * @return the builder to continue processing the DSL
     */
    public T simple(String text, Class<?> resultType) {
        SimpleExpression expression = new SimpleExpression(text);
        expression.setResultType(resultType);
        setExpressionType(expression);
        return result;
    }
View Full Code Here

     *
     * @param text the expression to be evaluated
     * @return the builder to continue processing the DSL
     */
    public T simple(String text) {
        return expression(new SimpleExpression(text));
    }
View Full Code Here

     * @param text the expression to be evaluated
     * @param resultType the result type
     * @return the builder to continue processing the DSL
     */
    public T simple(String text, Class<?> resultType) {
        SimpleExpression expression = new SimpleExpression(text);
        expression.setResultType(resultType);
        setExpressionType(expression);
        return result;
    }
View Full Code Here

     *
     * @param text the expression to be evaluated
     * @return the builder to continue processing the DSL
     */
    public T simple(String text) {
        return expression(new SimpleExpression(text));
    }
View Full Code Here

     * @param text the expression to be evaluated
     * @param resultType the result type
     * @return the builder to continue processing the DSL
     */
    public T simple(String text, Class<?> resultType) {
        SimpleExpression expression = new SimpleExpression(text);
        expression.setResultType(resultType);
        setExpressionType(expression);
        return result;
    }
View Full Code Here

     */
    public static ExpressionDefinition toExpressionDefinition(Expression expression) {
        if (expression instanceof SimpleBuilder) {
            SimpleBuilder builder = (SimpleBuilder) expression;
            // we keep the original expression by using the constructor that accepts an expression
            SimpleExpression answer = new SimpleExpression(builder);
            answer.setExpression(builder.getText());
            answer.setResultType(builder.getResultType());
            return answer;
        } else if (expression instanceof XPathBuilder) {
            XPathBuilder builder = (XPathBuilder) expression;
            // we keep the original expression by using the constructor that accepts an expression
            XPathExpression answer = new XPathExpression(builder);
            answer.setExpression(builder.getText());
            answer.setResultType(builder.getResultType());
            return answer;
        } else if (expression instanceof ValueBuilder) {
            ValueBuilder builder = (ValueBuilder) expression;
            expression = builder.getExpression();
        }
View Full Code Here

     */
    public static ExpressionDefinition toExpressionDefinition(Predicate predicate) {
        if (predicate instanceof SimpleBuilder) {
            SimpleBuilder builder = (SimpleBuilder) predicate;
            // we keep the original expression by using the constructor that accepts an expression
            SimpleExpression answer = new SimpleExpression(builder);
            answer.setExpression(builder.getText());
            return answer;
        } else if (predicate instanceof XPathBuilder) {
            XPathBuilder builder = (XPathBuilder) predicate;
            // we keep the original expression by using the constructor that accepts an expression
            XPathExpression answer = new XPathExpression(builder);
            answer.setExpression(builder.getText());
            return answer;
        }

        if (predicate instanceof ExpressionDefinition) {
            return (ExpressionDefinition) predicate;
View Full Code Here

     *
     * @param text the expression to be evaluated
     * @return the builder to continue processing the DSL
     */
    public T simple(String text) {
        return expression(new SimpleExpression(text));
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.model.language.SimpleExpression

Copyright © 2018 www.massapicom. 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.