org.apache.cocoon.components.treeprocessor
Class AbstractParentProcessingNodeBuilder

java.lang.Object
  extended byorg.apache.cocoon.util.AbstractLogEnabled
      extended byorg.apache.cocoon.components.treeprocessor.AbstractProcessingNodeBuilder
          extended byorg.apache.cocoon.components.treeprocessor.AbstractParentProcessingNodeBuilder
All Implemented Interfaces:
Configurable, ProcessingNodeBuilder
Direct Known Subclasses:
ActionSetNodeBuilder, ActNodeBuilder, CategoryNodeBuilder, ContainerNodeBuilder, FlowNodeBuilder, HandleErrorsNodeBuilder, MatchNodeBuilder, PipelineNodeBuilder, SelectNodeBuilder, SitemapNodeBuilder

public abstract class AbstractParentProcessingNodeBuilder
extends AbstractProcessingNodeBuilder
implements Configurable

Base class for parent ProcessingNodeBuilders, providing services for parsing children nodes.

Version:
$Id: AbstractParentProcessingNodeBuilder.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
protected  Collection allowedChildren
           
protected  Collection forbiddenChildren
           
protected  Collection ignoredChildren
           
 
Fields inherited from class org.apache.cocoon.components.treeprocessor.AbstractProcessingNodeBuilder
manager, treeBuilder
 
Constructor Summary
AbstractParentProcessingNodeBuilder()
           
 
Method Summary
protected  ProcessingNode[] buildChildNodes(Configuration config)
           
protected  List buildChildNodesList(Configuration config)
          Create the ProcessingNodes for the children of a given node.
 void configure(Configuration config)
          Configure the sets of allowed, forbidden and ignored children nodes.
protected  boolean isChild(Configuration child)
          Checks if a child element and is allowed, and if not throws a ConfigurationException.
protected  boolean isParameter(Configuration config)
           
static ProcessingNode[] toNodeArray(List list)
          Convenience function that converts a List of ProcessingNodes to an array.
 
Methods inherited from class org.apache.cocoon.components.treeprocessor.AbstractProcessingNodeBuilder
checkNamespace, hasParameters, setBuilder
 
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.components.treeprocessor.ProcessingNodeBuilder
buildNode
 

Field Detail

allowedChildren

protected Collection allowedChildren

forbiddenChildren

protected Collection forbiddenChildren

ignoredChildren

protected Collection ignoredChildren
Constructor Detail

AbstractParentProcessingNodeBuilder

public AbstractParentProcessingNodeBuilder()
Method Detail

configure

public void configure(Configuration config)
               throws ConfigurationException
Configure the sets of allowed, forbidden and ignored children nodes.

Specified by:
configure in interface Configurable
Throws:
ConfigurationException

isChild

protected boolean isChild(Configuration child)
                   throws ConfigurationException
Checks if a child element and is allowed, and if not throws a ConfigurationException.

Parameters:
child - the child configuration to check.
Returns:
true if this child should be considered or false if it should be ignored.
Throws:
ConfigurationException - if this child isn't allowed.

isParameter

protected boolean isParameter(Configuration config)
                       throws ConfigurationException
Throws:
ConfigurationException

buildChildNodesList

protected List buildChildNodesList(Configuration config)
                            throws Exception
Create the ProcessingNodes for the children of a given node. Child nodes are controlled to be actually allowed in this node.

Throws:
Exception

buildChildNodes

protected ProcessingNode[] buildChildNodes(Configuration config)
                                    throws Exception
Throws:
Exception

toNodeArray

public static ProcessingNode[] toNodeArray(List list)
Convenience function that converts a List of ProcessingNodes to an array.



Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.