Package org.apache.cocoon.treeprocessor

Examples of org.apache.cocoon.treeprocessor.ProcessingNodeBuilder


            Configuration childConfig = childConfigs[i];
            if (!isChild(childConfig)) {
                continue childLoop;
            }
               
            ProcessingNodeBuilder builder = this.treeBuilder.createNodeBuilder(childConfig);
           
            if (builder instanceof HandleErrorsNodeBuilder) {
                // Error handler : check type
                HandleErrorsNode handler = (HandleErrorsNode)builder.buildNode(childConfig);
                int type = handler.getStatusCode();
               
                if ( (type == 404 && error404Handler != null) ||
                     (type == 500 && error500Handler != null) ) {
                    String msg = "Duplicate handle-errors at " + handler.getLocation();
                    getLogger().error(msg);
                    throw new ConfigurationException(msg);
                }
               
                if (type == 404) {
                    error404Handler = handler;
                } else if (type == 500) {
                    error500Handler = handler;
                } else {
                    String msg = "Unkown handle-errors type (" + type + ") at " + handler.getLocation();
                    getLogger().error(msg);
                    throw new ConfigurationException(msg);
                }

            } else {
                // Regular builder
                children.add(builder.buildNode(childConfig));
            }
        }
        
        node.setChildren(toNodeArray(children));
        node.set404Handler(error404Handler);
View Full Code Here

TOP

Related Classes of org.apache.cocoon.treeprocessor.ProcessingNodeBuilder

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.