Examples of ExpressionContext


Examples of com.volantis.xml.expression.ExpressionContext

            }

            // If there is an expression context associated with this request
            // context then it must be reset so that it is re-associated with the
            // enclosing request context from which it originally came.
            ExpressionContext exprContext =
                    MCSExpressionHelper.getExpressionContext(this);
            if (exprContext != null) {
                exprContext.
                        setProperty(MarinerRequestContext.class,
                                enclosingRequestContext,
                                false);
            }
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionContext

            // MarinerPageContext has been allocated but before it has been
            // initialised as this is needed during the initialisation.
            environmentContext.initialise(context);
            environmentContext.initialiseSession();

            ExpressionContext exprContext =
                    environmentContext.getExpressionContext();

            // If there is an expression context then it must have been associated
            // with an enclosing request context since we are still initialising
            // this instance of MarinerServletRequestContext. We now must associate
            // the expression context with this MarinerServletRequestContext.
            //
            // An expression context can be associated with more than one request
            // context, although not concurrently. When the request context is no
            // longer needed, the expression context (if any) should be reset to
            // the enclosing request context.
            if (exprContext == null) {
                ExpressionSupport.createExpressionEnv(this,
                        volantisBean, environmentContext,
                        context.getDevicePolicyAccessor());
            } else {
                exprContext.setProperty(MarinerRequestContext.class, this,
                        false);
            }

            ContextInternals.setEnvironmentContext(this, environmentContext);
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionContext

            }

            // If there is an expression context associated with this request
            // context then it must be reset so that it is re-associated with the
            // enclosing request context from which it originally came.
            ExpressionContext exprContext =
                    MCSExpressionHelper.getExpressionContext(this);
            if (exprContext != null) {
                exprContext.
                        setProperty(MarinerRequestContext.class,
                                enclosingRequestContext,
                                false);
            }
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionContext

    /**
     * Tests that the search string is found where expected.
     */
    public void testSearchPresent() throws Exception {
        ExpressionContext context = createExpressionContext();
        ExpressionFactory factory = context.getFactory();
        Function indexOf = new IndexOfFunction();
        Sequence sequence = createStringSequence(factory,
                new String[]{"a", "dog", "and", "a", "duck"});
        Value search = factory.createStringValue("a");
        Value retVal = indexOf.invoke(context, new Value[]{sequence, search});
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionContext

    /**
     * Tests that the search string is not found.
     */
    public void testSearchNotPresent() throws Exception {
        ExpressionContext context = createExpressionContext();
        ExpressionFactory factory = context.getFactory();
        Function indexOf = new IndexOfFunction();
        Sequence sequence = createStringSequence(factory,
                new String[]{"a", "dog", "and", "a", "duck"});
        Value search = factory.createStringValue("cat");
        Value retVal = indexOf.invoke(context, new Value[]{sequence, search});
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionContext

    /**
     * Tests that the search string is found at all positions.
     */
    public void testAllItemsMatch() throws Exception {
        ExpressionContext context = createExpressionContext();
        ExpressionFactory factory = context.getFactory();
        Function indexOf = new IndexOfFunction();
        Sequence sequence = createStringSequence(factory,
                new String[]{"abc", "abc", "abc", "abc", "abc"});
        Value search = factory.createStringValue("abc");
        Value retVal = indexOf.invoke(context, new Value[]{sequence, search});
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionContext

    /**
     * Tests that an empty search string causes the empty sequence to be
     * returned.
     */
    public void testEmptySearch() throws Exception {
        ExpressionContext context = createExpressionContext();
        ExpressionFactory factory = context.getFactory();
        Function indexOf = new IndexOfFunction();
        Sequence sequence = createStringSequence(factory,
                new String[]{"abc", "abc", "abc", "abc", "abc"});
        Value search = factory.createStringValue("");
        Value retVal = indexOf.invoke(context, new Value[]{sequence, search});
View Full Code Here

Examples of com.volantis.xml.expression.ExpressionContext

    /**
     * Tests that an empty sequence causes the empty sequence to be
     * returned.
     */
    public void testEmptySequence() throws Exception {
        ExpressionContext context = createExpressionContext();
        ExpressionFactory factory = context.getFactory();
        Function indexOf = new IndexOfFunction();
        Sequence sequence = createStringSequence(factory, null);
        Value search = factory.createStringValue("peter");
        Value retVal = indexOf.invoke(context, new Value[]{sequence, search});

View Full Code Here

Examples of com.volantis.xml.expression.ExpressionContext

    /**
     * Tests that an empty sequence and empty search string causes the empty
     * sequence to be returned.
     */
    public void testEmptySequenceEmptySearch() throws Exception {
        ExpressionContext context = createExpressionContext();
        ExpressionFactory factory = context.getFactory();
        Function indexOf = new IndexOfFunction();
        Sequence sequence = createStringSequence(factory, null);
        Value search = factory.createStringValue("");
        Value retVal = indexOf.invoke(context, new Value[]{sequence, search});

View Full Code Here

Examples of com.volantis.xml.expression.ExpressionContext

    /**
     * Tests that the search integer is found where expected.
     * ((15, 40, 25, 40, 10), 40)
     */
    public void testIntegerSequence() throws Exception {
        ExpressionContext context = createExpressionContext();
        ExpressionFactory factory = context.getFactory();
        Function indexOf = new IndexOfFunction();
        Sequence sequence = createIntegerSequence(factory,
                new int[]{15, 40, 25, 40, 10});
        Value search = factory.createIntValue(40);
        Value retVal = indexOf.invoke(context, new Value[]{sequence, search});
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.