org.apache.cocoon.components.treeprocessor
Class AbstractParentProcessingNodeBuilder

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLogEnabled
        |
        +--org.apache.cocoon.components.treeprocessor.AbstractProcessingNodeBuilder
              |
              +--org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNodeBuilder
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, ProcessingNodeBuilder, org.apache.avalon.framework.component.Recomposable
Direct Known Subclasses:
ActNodeBuilder, CategoryNodeBuilder, ContainerNodeBuilder, HandleErrorsNodeBuilder, MatchNodeBuilder, PipelineNodeBuilder, SelectNodeBuilder, SitemapNodeBuilder

public abstract class AbstractParentProcessingNodeBuilder
extends AbstractProcessingNodeBuilder
implements org.apache.avalon.framework.configuration.Configurable

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

Version:
CVS $Id: AbstractParentProcessingNodeBuilder.java,v 1.1.2.1 2002/11/25 21:51:59 sylvain Exp $
Author:
Sylvain Wallez

Field Summary
protected  java.util.Collection allowedChildren
           
protected  java.util.Collection forbiddenChildren
           
protected  java.util.Collection ignoredChildren
           
 
Fields inherited from class org.apache.cocoon.components.treeprocessor.AbstractProcessingNodeBuilder
manager, treeBuilder
 
Constructor Summary
AbstractParentProcessingNodeBuilder()
           
 
Method Summary
protected  ProcessingNode[] buildChildNodes(org.apache.avalon.framework.configuration.Configuration config)
           
protected  java.util.List buildChildNodesList(org.apache.avalon.framework.configuration.Configuration config)
          Create the ProcessingNodes for the children of a given node.
 void configure(org.apache.avalon.framework.configuration.Configuration config)
          Configure the sets of allowed, forbidden and ignored children nodes.
protected  boolean isChild(org.apache.avalon.framework.configuration.Configuration child)
          Checks if a child element and is allowed, and if not throws a ConfigurationException.
protected  boolean isParameter(org.apache.avalon.framework.configuration.Configuration config)
           
static ProcessingNode[] toNodeArray(java.util.List list)
          Convenience function that converts a List of ProcessingNodes to an array.
 
Methods inherited from class org.apache.cocoon.components.treeprocessor.AbstractProcessingNodeBuilder
checkNamespace, compose, getParameters, hasParameters, recompose, setBuilder
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
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 java.util.Collection allowedChildren

forbiddenChildren

protected java.util.Collection forbiddenChildren

ignoredChildren

protected java.util.Collection ignoredChildren
Constructor Detail

AbstractParentProcessingNodeBuilder

public AbstractParentProcessingNodeBuilder()
Method Detail

configure

public void configure(org.apache.avalon.framework.configuration.Configuration config)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Configure the sets of allowed, forbidden and ignored children nodes.
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable

isChild

protected boolean isChild(org.apache.avalon.framework.configuration.Configuration child)
                   throws org.apache.avalon.framework.configuration.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:
org.apache.avalon.framework.configuration.ConfigurationException - if this child isn't allowed.

isParameter

protected boolean isParameter(org.apache.avalon.framework.configuration.Configuration config)
                       throws org.apache.avalon.framework.configuration.ConfigurationException

buildChildNodesList

protected java.util.List buildChildNodesList(org.apache.avalon.framework.configuration.Configuration config)
                                      throws java.lang.Exception
Create the ProcessingNodes for the children of a given node. Child nodes are controlled to be actually allowed in this node.

buildChildNodes

protected ProcessingNode[] buildChildNodes(org.apache.avalon.framework.configuration.Configuration config)
                                    throws java.lang.Exception

toNodeArray

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


Copyright � 1999-2002 Apache Software Foundation. All Rights Reserved.