Examples of SimpleResolver


Examples of de.odysseus.el.util.SimpleResolver

    SimpleContext context = new SimpleContext(new SimpleResolver());
    assertEquals("1", factory.createValueExpression("1", Object.class).getValue(context));
  }

  public void testCreateMethodExpression() throws NoSuchMethodException {
    SimpleContext context = new SimpleContext(new SimpleResolver());
    context.getELResolver().setValue(context, null, "foo", this);
    assertEquals(bar(), factory.createMethodExpression(context, "${foo.bar}", null, new Class[0]).invoke(context, null));
  }
View Full Code Here

Examples of org.activiti.engine.impl.juel.SimpleResolver

    compositeResolver.add(new ListELResolver());
    compositeResolver.add(new MapELResolver());
    compositeResolver.add(new ResourceBundleELResolver());
    compositeResolver.add(new DynamicBeanPropertyELResolver(ItemInstance.class, "getFieldValue", "setFieldValue"));
    compositeResolver.add(new BeanELResolver());
    return new SimpleResolver(compositeResolver);
  }
View Full Code Here

Examples of org.camunda.bpm.engine.impl.juel.SimpleResolver

    compositeResolver.add(new ArrayELResolver());
    compositeResolver.add(new ListELResolver());
    compositeResolver.add(new MapELResolver());
    compositeResolver.add(new ResourceBundleELResolver());
    compositeResolver.add(new BeanELResolver());
    return new SimpleResolver(compositeResolver);
  }
View Full Code Here

Examples of org.codehaus.stax.test.SimpleResolver

        String EXT_SUBSET =
            "<!ELEMENT root (#PCDATA)>\n"
            +"<!-- comments are ok!!! -->";

        XMLStreamReader sr = getReader(XML, true,
                                       new SimpleResolver(EXT_SUBSET));
        assertTokenType(DTD, sr.next());
        assertTokenType(START_ELEMENT, sr.next());
        assertEquals("root", sr.getLocalName());
        assertTokenType(CHARACTERS, sr.next());
        assertEquals("text", getAndVerifyText(sr));
View Full Code Here

Examples of org.codehaus.stax.test.SimpleResolver

        String EXT_SUBSET =
            "<!ELEMENT root (#PCDATA)>\n"
            +"<!ENTITY extEnt '"+EXT_ENTITY_VALUE+"'>\n";

        XMLStreamReader sr = getReader(XML, true,
                                       new SimpleResolver(EXT_SUBSET));
        assertTokenType(DTD, sr.next());
        assertTokenType(START_ELEMENT, sr.next());
        assertEquals("root", sr.getLocalName());
        assertTokenType(CHARACTERS, sr.next());
        assertEquals(EXT_ENTITY_VALUE, getAndVerifyText(sr));
View Full Code Here

Examples of org.codehaus.stax.test.SimpleResolver

        setSupportDTD(f, true);
        setCoalescing(f, false);
        setReplaceEntities(f, true);
        setValidating(f, true);
        if (extSubset != null) {
            setResolver(f, new SimpleResolver(extSubset));
        } else {
            setResolver(f, null);
        }
        return constructStreamReader(f, contents);
    }
View Full Code Here

Examples of org.codehaus.stax.test.SimpleResolver

            +"  <!ENTITY myent 'value'>"
            +"]]>\n"
            ;

        XMLInputFactory f = getValidatingFactory(true);
        setResolver(f, new SimpleResolver(EXT_DTD));
        XMLStreamReader sr = f.createXMLStreamReader(new StringReader(XML));
        assertTokenType(DTD, sr.next());
        assertTokenType(START_ELEMENT, sr.next());
        assertTokenType(CHARACTERS, sr.next());
        assertEquals("value", getAndVerifyText(sr));
View Full Code Here

Examples of org.codehaus.stax.test.SimpleResolver

            +"]]>\n"
            +"<!ENTITY myent 'value'>"
            ;

        XMLInputFactory f = getValidatingFactory(true);
        setResolver(f, new SimpleResolver(EXT_DTD));
        XMLStreamReader sr = f.createXMLStreamReader(new StringReader(XML));
        assertTokenType(DTD, sr.next());
        assertTokenType(START_ELEMENT, sr.next());
        assertTokenType(CHARACTERS, sr.next());
        assertEquals("value", getAndVerifyText(sr));
View Full Code Here

Examples of org.codehaus.stax.test.SimpleResolver

            +"]]>\n"
            +"<!ELEMENT root (#PCDATA)>\n"
            ;

        XMLInputFactory f = getValidatingFactory(true);
        setResolver(f, new SimpleResolver(EXT_DTD));
        XMLStreamReader sr = f.createXMLStreamReader(new StringReader(XML));
        assertTokenType(DTD, sr.next());
        assertTokenType(START_ELEMENT, sr.next());
        assertTokenType(CHARACTERS, sr.next());
        String text = getAndVerifyText(sr);
View Full Code Here

Examples of org.codehaus.stax.test.SimpleResolver

        if (!setSupportExternalEntities(f, true)) {
            reportNADueToExtEnt("testExternalEntityWithResolver");
            return;
        }

        setResolver(f, new SimpleResolver(ENTITY_VALUE1));

        // First, simple content without further expansion etc
        XMLStreamReader sr = constructStreamReader(f, XML);
        assertTokenType(DTD, sr.next());
        assertTokenType(START_ELEMENT, sr.next());
        assertTokenType(CHARACTERS, sr.next());
        assertEquals(ACTUAL_VALUE1, getAndVerifyText(sr));
        assertTokenType(END_ELEMENT, sr.next());
        sr.close();

        // Then bit more complicated one:

        String ENTITY_VALUE2 = "external entity: <leaf /> this &amp; that &intEnt;";
        String ACTUAL_VALUE2a = "ent='external entity: ";
        String ACTUAL_VALUE2b = " this & that & more!'";
        String XML2 =
            "<!DOCTYPE root [\n"
            +"<!ENTITY extEnt SYSTEM 'myurl'>\n"
            +"<!ENTITY intEnt '&amp; more!'>\n"
            +"]><root>ent='&extEnt;'</root>";
        setResolver(f, new SimpleResolver(ENTITY_VALUE2));

        sr = constructStreamReader(f, XML2);
        assertTokenType(DTD, sr.next());
        assertTokenType(START_ELEMENT, sr.next());
        assertTokenType(CHARACTERS, sr.next());
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.