Package org.jitterbit.integration.data.script.ExpressionParser

Examples of org.jitterbit.integration.data.script.ExpressionParser.Result


    /**
     * Scans the current expression.
     */
    public final void doScan() {
        Result result = parser.parse(getExpression());
        publisher.process(result);
    }
View Full Code Here


                errorMessage = "This is a required field. You must provide a value.";
                return !required;
            }
            if (parser != null) {
                String expression = ScriptConstants.wrapInTags(value, false);
                Result result = parser.parse(expression);
                ScriptStatus status = result.getStatus();
                if (status.getState() == State.INVALID) {
                    errorMessage = status.getMessage();
                    return false;
                }
            }
View Full Code Here

    public void ensureBug2842302Works() {
        verifySingleReference("$x[2] = 1", "x", AccessType.SET);
    }

    private void verifySingleReference(String expression, String deName, AccessType type) {
        Result result = parser.parse(ScriptConstants.wrapInTags(expression));
        Set<DataElementReference> refs = result.getGlobalDataElementReferences();
        assertEquals(1, refs.size());
        DataElementReference ref = refs.iterator().next();
        assertSame(script, ref.getSource());
        assertEquals(EnumSet.of(type), ref.getAccessType());
        assertEquals(deName, ref.getDataElement());
View Full Code Here

        verifySingleReference("$x = " + sourceDe, "x", AccessType.SET);
    }

    @Test
    public void ensureBothSetAndGetWorks() {
        Result result = parser.parse(ScriptConstants.wrapInTags("$x = 2; $x"));
        Set<DataElementReference> refs = result.getGlobalDataElementReferences();
        assertEquals(1, refs.size());
        DataElementReference ref = refs.iterator().next();
        assertSame(script, ref.getSource());
        assertEquals("x", ref.getDataElement());
        assertEquals(EnumSet.of(AccessType.GET, AccessType.SET), ref.getAccessType());
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.data.script.ExpressionParser.Result

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.