Examples of EnvironmentSourceResolver


Examples of org.apache.cocoon.treeprocessor.EnvironmentSourceResolver

        // Create the source resolver relative to the environment.
       
        // Design note : creating the SourceResolver could also have been done
        // in TreeProcessor.invoke(), but doing it here ensures we use the local
        // component manager used by all other nodes.
        EnvironmentSourceResolver resolver = new EnvironmentSourceResolver(this.manager, env);
        SitemapRedirector redirector = new SitemapRedirector(env);
       
        Map objectModel = env.getObjectModel();
       
        Object oldResolver = objectModel.get(OBJECT_SOURCE_RESOLVER);
        Object oldRedirector = env.getAttribute(REDIRECTOR_ATTR);

        objectModel.put(OBJECT_SOURCE_RESOLVER, resolver);
        env.setAttribute(REDIRECTOR_ATTR, redirector);

        try {
            // FIXME : is there any useful information that can be passed as top-level parameters,
            //         such as the URI of the mount point ?
           
            return invokeNodes(this.children, env, context);
           
        } finally {

            // Restore old redirector and resolver
            env.setAttribute(REDIRECTOR_ATTR, oldRedirector);
            objectModel.put(OBJECT_SOURCE_RESOLVER, oldResolver);
           
            // Dispose the resolver
            resolver.dispose();
        }
    }
View Full Code Here

Examples of org.apache.cocoon.treeprocessor.EnvironmentSourceResolver

        // Create the source resolver relative to the environment.
       
        // Design note : creating the SourceResolver could also have been done
        // in TreeProcessor.invoke(), but doing it here ensures we use the local
        // component manager used by all other nodes.
        EnvironmentSourceResolver resolver = new EnvironmentSourceResolver(this.manager, env);
        SitemapRedirector redirector = new SitemapRedirector(env);
       
        Map objectModel = env.getObjectModel();
       
        Object oldResolver = objectModel.get(OBJECT_SOURCE_RESOLVER);
        Object oldRedirector = env.getAttribute(REDIRECTOR_ATTR);

        objectModel.put(OBJECT_SOURCE_RESOLVER, resolver);
        env.setAttribute(REDIRECTOR_ATTR, redirector);

        try {
            // FIXME : is there any useful information that can be passed as top-level parameters,
            //         such as the URI of the mount point ?
           
            return this.pipelines.invoke(env, context);
           
        } finally {

            // Restore old redirector and resolver
            env.setAttribute(REDIRECTOR_ATTR, oldRedirector);
            objectModel.put(OBJECT_SOURCE_RESOLVER, oldResolver);
           
            // Dispose the resolver
            resolver.dispose();
        }
    }
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.