1 16 package org.apache.cocoon.components.treeprocessor.sitemap; 17 18 import org.apache.avalon.framework.configuration.Configuration; 19 import org.apache.avalon.framework.thread.ThreadSafe; 20 21 import org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNodeBuilder; 22 import org.apache.cocoon.components.treeprocessor.ProcessingNode; 23 24 30 public class HandleErrorsNodeBuilder extends AbstractParentProcessingNodeBuilder 31 implements ThreadSafe { 32 33 34 protected boolean hasParameters() { 35 return false; 36 } 37 38 public ProcessingNode buildNode(Configuration config) throws Exception { 39 40 HandleErrorsNode node = new HandleErrorsNode(config.getAttributeAsInteger("type", -1), 41 config.getAttribute("when", "external")); 42 this.treeBuilder.setupNode(node, config); 43 44 ((SitemapLanguage) this.treeBuilder).setBuildingErrorHandler(true); 46 try { 47 node.setChildren(buildChildNodes(config)); 49 } finally { 50 ((SitemapLanguage) this.treeBuilder).setBuildingErrorHandler(false); 52 } 53 54 return node; 55 } 56 } 57 | Popular Tags |