|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLoggable
|
+--org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder
| Field Summary | |
protected org.apache.avalon.framework.component.ComponentSelector |
builderSelector
Selector for ProcessingNodeBuilders |
protected org.apache.avalon.framework.configuration.Configuration |
configuration
|
protected org.apache.avalon.framework.context.Context |
context
|
protected java.lang.String |
fileName
|
protected java.lang.String |
languageName
|
protected LifecycleHelper |
lifecycle
|
protected org.apache.avalon.excalibur.logger.LogKitManager |
logKit
|
protected org.apache.avalon.framework.component.ComponentManager |
manager
Component manager created by createComponentManager(Configuration). |
protected java.lang.String |
namespace
|
protected java.lang.String |
parameterElement
|
protected org.apache.avalon.framework.component.ComponentManager |
parentManager
The parent component manager, set using compose() and recompose()
(implementation of Recomposable). |
protected org.apache.avalon.excalibur.component.RoleManager |
parentRoleManager
The parent role manager, set using setRoleManager (implementation of
RoleManageable). |
protected TreeProcessor |
processor
The tree processor that we're building. |
protected org.apache.avalon.excalibur.component.RoleManager |
roleManager
Role manager result created by createRoleManager(). |
| Constructor Summary | |
DefaultTreeBuilder()
|
|
| Method Summary | |
ProcessingNode |
build(org.apache.avalon.framework.configuration.Configuration tree)
Build a processing tree from a Configuration. |
ProcessingNode |
build(Source source)
|
void |
compose(org.apache.avalon.framework.component.ComponentManager manager)
|
void |
configure(org.apache.avalon.framework.configuration.Configuration config)
|
void |
contextualize(org.apache.avalon.framework.context.Context context)
|
protected org.apache.avalon.framework.component.ComponentSelector |
createBuilderSelector()
Create a ComponentSelector for ProcessingNodeBuilders.
|
protected org.apache.avalon.framework.component.ComponentManager |
createComponentManager(org.apache.avalon.framework.configuration.Configuration tree)
Create a component manager that will be used for all Composable
ProcessingNodeBuilders and ProcessingNodes.
|
ProcessingNodeBuilder |
createNodeBuilder(org.apache.avalon.framework.configuration.Configuration config)
|
protected org.apache.avalon.excalibur.component.RoleManager |
createRoleManager()
Create a role manager that will be used by all RoleManageable
components. |
protected ProcessingNode |
createTree(org.apache.avalon.framework.configuration.Configuration tree)
Create the tree once component manager and node builders have been set up. |
void |
dispose()
|
java.util.List |
getDisposableNodes()
Return the list of ProcessingNodes part of this tree that are
Disposable. |
java.lang.String |
getFileName()
|
java.lang.String |
getLanguage()
Returns the language that is being built (e.g. |
java.lang.String |
getNamespace()
Get the namespace URI that builders should use to find their nodes. |
java.lang.String |
getParameterName()
Returns the name of the parameter element. |
protected java.util.Map |
getParameters(org.apache.avalon.framework.configuration.Configuration config)
Get <xxx:parameter> elements as a Map of ListOfMapResolvers,
that can be turned into parameters using ListOfMapResolver.buildParameters(). |
TreeProcessor |
getProcessor()
|
ProcessingNode |
getRegisteredNode(java.lang.String name)
|
java.lang.String |
getTypeForStatement(org.apache.avalon.framework.configuration.Configuration statement,
java.lang.String role)
Get the type for a statement : it returns the 'type' attribute if present, and otherwhise the default hint of the ExtendedSelector designated by
role role. |
protected void |
linkNodes()
Resolve links : call linkNode() on all
LinkedProcessingNodeBuilders.
|
void |
recompose(org.apache.avalon.framework.component.ComponentManager manager)
|
void |
recycle()
|
void |
registerNode(java.lang.String name,
ProcessingNode node)
Register a ProcessingNode under a given name.
|
void |
setLogKitManager(org.apache.avalon.excalibur.logger.LogKitManager logKit)
|
void |
setProcessor(TreeProcessor processor)
|
void |
setRoleManager(org.apache.avalon.excalibur.component.RoleManager rm)
|
ProcessingNode |
setupNode(ProcessingNode node,
org.apache.avalon.framework.configuration.Configuration config)
Setup a ProcessingNode by setting its location, calling all
the lifecycle interfaces it implements and giving it the parameter map if
it's a ParameterizableNode.
|
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable |
getLogger, setLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected TreeProcessor processor
protected org.apache.avalon.framework.context.Context context
protected org.apache.avalon.excalibur.logger.LogKitManager logKit
protected org.apache.avalon.framework.component.ComponentManager parentManager
compose() and recompose()
(implementation of Recomposable).protected org.apache.avalon.excalibur.component.RoleManager parentRoleManager
setRoleManager (implementation of
RoleManageable).protected org.apache.avalon.framework.configuration.Configuration configuration
protected org.apache.avalon.framework.component.ComponentManager manager
createComponentManager(Configuration).protected org.apache.avalon.excalibur.component.RoleManager roleManager
createRoleManager().protected org.apache.avalon.framework.component.ComponentSelector builderSelector
protected LifecycleHelper lifecycle
protected java.lang.String namespace
protected java.lang.String parameterElement
protected java.lang.String languageName
protected java.lang.String fileName
| Constructor Detail |
public DefaultTreeBuilder()
| Method Detail |
public void contextualize(org.apache.avalon.framework.context.Context context)
throws org.apache.avalon.framework.context.ContextException
contextualize in interface org.apache.avalon.framework.context.Contextualizablepublic void setLogKitManager(org.apache.avalon.excalibur.logger.LogKitManager logKit)
setLogKitManager in interface org.apache.avalon.excalibur.logger.LogKitManageable
public void compose(org.apache.avalon.framework.component.ComponentManager manager)
throws org.apache.avalon.framework.component.ComponentException
compose in interface org.apache.avalon.framework.component.Composable
public void recompose(org.apache.avalon.framework.component.ComponentManager manager)
throws org.apache.avalon.framework.component.ComponentException
recompose in interface org.apache.avalon.framework.component.Recomposablepublic void setRoleManager(org.apache.avalon.excalibur.component.RoleManager rm)
setRoleManager in interface org.apache.avalon.excalibur.component.RoleManageable
public void configure(org.apache.avalon.framework.configuration.Configuration config)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurable
protected org.apache.avalon.excalibur.component.RoleManager createRoleManager()
throws java.lang.Exception
RoleManageable
components. The default here is to create a role manager with the contents of
the <roles> element of the configuration.
Subclasses can redefine this method to create roles from other sources than the one used here.
protected org.apache.avalon.framework.component.ComponentManager createComponentManager(org.apache.avalon.framework.configuration.Configuration tree)
throws java.lang.Exception
Composable
ProcessingNodeBuilders and ProcessingNodes.
The default here is to simply return the manager set by compose(),
i.e. the component manager set by the calling TreeProcessor.
Subclasses can redefine this method to create a component manager local to a tree, such as for sitemap's <map:components>.
protected org.apache.avalon.framework.component.ComponentSelector createBuilderSelector()
throws java.lang.Exception
ComponentSelector for ProcessingNodeBuilders.
It creates a selector with the contents of the "node" element of the configuration.public void setProcessor(TreeProcessor processor)
setProcessor in interface TreeBuilderpublic TreeProcessor getProcessor()
getProcessor in interface TreeBuilderpublic java.lang.String getLanguage()
getLanguage in interface TreeBuilderpublic java.lang.String getParameterName()
getParameterName in interface TreeBuilder
public void registerNode(java.lang.String name,
ProcessingNode node)
ProcessingNode under a given name.
For example, ResourceNodeBuilder stores here the ProcessingNodes
it produces for use by sitemap pipelines. This allows to turn the tree into a graph.registerNode in interface TreeBuilderpublic ProcessingNode getRegisteredNode(java.lang.String name)
getRegisteredNode in interface TreeBuilderorg.apache.cocoon.components.treeprocessor.TreeBuilderjava.lang.IllegalStateException -
public ProcessingNodeBuilder createNodeBuilder(org.apache.avalon.framework.configuration.Configuration config)
throws java.lang.Exception
createNodeBuilder in interface TreeBuilder
protected ProcessingNode createTree(org.apache.avalon.framework.configuration.Configuration tree)
throws java.lang.Exception
protected void linkNodes()
throws java.lang.Exception
linkNode() on all
LinkedProcessingNodeBuilders.
Can be overriden by subclasses to perform pre/post resolution operations.public java.lang.String getNamespace()
getNamespace in interface TreeBuilder
public ProcessingNode build(Source source)
throws java.lang.Exception
build in interface TreeBuilderpublic java.lang.String getFileName()
getFileName in interface TreeBuilder
public ProcessingNode build(org.apache.avalon.framework.configuration.Configuration tree)
throws java.lang.Exception
Configuration.build in interface TreeBuilderpublic java.util.List getDisposableNodes()
ProcessingNodes part of this tree that are
Disposable. Care should be taken to properly dispose them before
trashing the processing tree.getDisposableNodes in interface TreeBuilder
public ProcessingNode setupNode(ProcessingNode node,
org.apache.avalon.framework.configuration.Configuration config)
throws java.lang.Exception
ProcessingNode by setting its location, calling all
the lifecycle interfaces it implements and giving it the parameter map if
it's a ParameterizableNode.
As a convenience, the node is returned by this method to allow constructs
like return treeBuilder.setupNode(new MyNode(), config).
setupNode in interface TreeBuilder
protected java.util.Map getParameters(org.apache.avalon.framework.configuration.Configuration config)
throws org.apache.avalon.framework.configuration.ConfigurationException
Map of ListOfMapResolvers,
that can be turned into parameters using ListOfMapResolver.buildParameters().null if there are no parameters.
public java.lang.String getTypeForStatement(org.apache.avalon.framework.configuration.Configuration statement,
java.lang.String role)
throws org.apache.avalon.framework.configuration.ConfigurationException
ExtendedSelector designated by
role role.getTypeForStatement in interface TreeBuilderorg.apache.avalon.framework.configuration.ConfigurationException - if the default type could not be found.public void recycle()
recycle in interface org.apache.avalon.excalibur.pool.Recyclablepublic void dispose()
dispose in interface org.apache.avalon.framework.activity.Disposable
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||