1 16 package org.apache.cocoon.components.treeprocessor.sitemap; 17 18 import org.apache.avalon.framework.configuration.Configuration; 19 import org.apache.avalon.framework.configuration.ConfigurationException; 20 import org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNodeBuilder; 21 import org.apache.cocoon.components.treeprocessor.ProcessingNode; 22 23 31 public class FlowNodeBuilder extends AbstractParentProcessingNodeBuilder { 32 33 public ProcessingNode buildNode(Configuration config) 34 throws Exception { 35 String language = config.getAttribute("language", "javascript"); 36 FlowNode node = new FlowNode(language); 37 38 if ( !this.treeBuilder.registerNode("flow", node) ) { 39 throw new ConfigurationException("Only one <map:flow> is allowed in a sitemap. Another one is declared at " + 40 config.getLocation()); 41 } 42 this.treeBuilder.setupNode(node, config); 43 44 buildChildNodesList(config); 45 46 return node; 47 } 48 } 49 | Popular Tags |