Package org.apache.cocoon.components.treeprocessor

Examples of org.apache.cocoon.components.treeprocessor.InvokeContext.enableLogging()


    public void testRootSitemapVariables() throws PatternException {
        String expr = "from {/1} to {1}";
       
        InvokeContext context = new InvokeContext(true);
        context.enableLogging(new LogKitLogger(getLogger()));

        Map sitemapElements;
        sitemapElements = new HashMap();
        sitemapElements.put("1", "juliet");
        context.pushMap("label1", sitemapElements);
View Full Code Here


   
    public void testColonInTextContent() throws PatternException {
        String expr = "http://cocoon.apache.org";
       
        InvokeContext context = new InvokeContext(true);
        context.enableLogging(new LogKitLogger(getLogger()));

        Map sitemapElements;
        sitemapElements = new HashMap();
        context.pushMap("label", sitemapElements);
       
View Full Code Here

   
    public void testColonBeginningTextContent() throws PatternException {
        String expr = ":colon-starts-this";
       
        InvokeContext context = new InvokeContext(true);
        context.enableLogging(new LogKitLogger(getLogger()));

        Map sitemapElements;
        sitemapElements = new HashMap();
        context.pushMap("label", sitemapElements);
       
View Full Code Here

   
    public void testEmbeddedColon() throws PatternException {
        String expr = "{1}:{1}";
       
        InvokeContext context = new InvokeContext(true);
        context.enableLogging(new LogKitLogger(getLogger()));

        Map sitemapElements;
        sitemapElements = new HashMap();
        sitemapElements.put("1", "abc");
        context.pushMap("label", sitemapElements);
View Full Code Here

    public void testEscapedBraces() throws PatternException {
        String expr = "This is a \\{brace\\}";
       
        InvokeContext context = new InvokeContext(true);
        context.enableLogging(new LogKitLogger(getLogger()));

        Map sitemapElements;
        sitemapElements = new HashMap();
        context.pushMap("label", sitemapElements);
View Full Code Here

    }

    public void testModuleWithoutOption() throws PatternException {
        String expr = "{baselink:}";
        InvokeContext context = new InvokeContext(true);
        context.enableLogging(new LogKitLogger(getLogger()));
       
        Map sitemapElements = new HashMap();
        context.pushMap("sitemap", sitemapElements);
        PreparedVariableResolver resolver = new PreparedVariableResolver(expr, manager);
        assertEquals("", resolver.resolve(context, getObjectModel()));
View Full Code Here

              objectModel.put(ObjectModelHelper.THROWABLE_OBJECT, ex);
          }

      // Build a new context
      errorContext = new InvokeContext();
      errorContext.enableLogging(getLogger());
      errorContext.compose(this.manager);
     
      nodeSuccessfull = node.invoke(env, errorContext);
        } catch (Exception subEx) {
            getLogger().error("An exception occured in while handling errors at " + node.getLocation(), subEx);
View Full Code Here

        MockRequest request = getRequest();
        request.reset();
        request.addParameter("foo", "bar");
        request.addParameter("bar", "123");
        InvokeContext context = new InvokeContext(true);
        context.enableLogging(getLogger());
       
        Map sitemapElements = new HashMap();
        context.pushMap("sitemap", sitemapElements);
        PreparedVariableResolver resolver = new PreparedVariableResolver(expr, getManager());
        assertEquals("123", resolver.resolve(context, getObjectModel()));
View Full Code Here

        String expr = "{request-param:f{1}}";
        MockRequest request = getRequest();
        request.reset();
        request.addParameter("foo", "123");
        InvokeContext context = new InvokeContext(true);
        context.enableLogging(getLogger());
       
        Map sitemapElements = new HashMap();
        sitemapElements.put("1", "oo");
        context.pushMap("sitemap", sitemapElements);
        PreparedVariableResolver resolver = new PreparedVariableResolver(expr, getManager());
View Full Code Here

   
    public void testAnchors() throws PatternException {
        String expr = "{#label:name}";
       
        InvokeContext context = new InvokeContext(true);
        context.enableLogging(getLogger());
       
        Map sitemapElements = new HashMap();
        sitemapElements.put("name", "123");
        context.pushMap("label", sitemapElements);
        PreparedVariableResolver resolver = new PreparedVariableResolver(expr, getManager());
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.