Package org.apache.cocoon.sitemap

Examples of org.apache.cocoon.sitemap.EnterSitemapEventListener


            // only invoke if pipeline is not internally
            if (!context.isBuildingPipelineOnly()) {
                final EnterSitemapEvent enterEvent = new EnterSitemapEvent(this, environment);
                final Iterator i = this.enterSitemapEventListeners.iterator();
                while (i.hasNext()) {
                    final EnterSitemapEventListener current = (EnterSitemapEventListener) i.next();
                    current.enteredSitemap(enterEvent);
                }
            }

            this.sitemapExecutor.enterSitemap(this, environment.getObjectModel(), this.wrappingProcessor.source.getURI());

            // and now process
            EnvironmentHelper.enterProcessor(this, environment);
            final Redirector oldRedirector = context.getRedirector();
            try {
                // Build a redirector
                TreeProcessorRedirector redirector = new TreeProcessorRedirector(environment, context);
                context.setRedirector(redirector);
                context.service(this.manager);
                context.setLastProcessor(this);

                return this.rootNode.invoke(environment, context);
            } finally {
                EnvironmentHelper.leaveProcessor();
                // Restore old redirector
                context.setRedirector(oldRedirector);
            }

        } finally {
            if (handle != null) {
                this.sitemapExecutor.leaveSitemap(this, environment.getObjectModel());
                // invoke listeners
                // only invoke if pipeline is not internally
                if (!context.isBuildingPipelineOnly()) {
                    final LeaveSitemapEvent leaveEvent = new LeaveSitemapEvent(this, environment);
                    final Iterator i = this.leaveSitemapEventListeners.iterator();
                    while (i.hasNext()) {
                        final LeaveSitemapEventListener current = (LeaveSitemapEventListener) i.next();
                        current.leftSitemap(leaveEvent);
                    }
                }
                WebAppContextUtils.leavingContext(this.webAppContext, handle);
            }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.sitemap.EnterSitemapEventListener

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.