public class DefaultTreeBuilder extends AbstractLogEnabled implements TreeBuilder,Recomposable,Configurable,Contextualizable,RoleManageable,Recyclable,Disposable(Code)
getParameters(Configuration config, Location location) Get <xxx:parameter> elements as a Map of ListOfMapResolvers,
that can be turned into parameters using ListOfMapResolver.buildParameters().
getTypeForStatement(Configuration statement, 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.
setupNode(ProcessingNode node, 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.
Create a ComponentSelector for ProcessingNodeBuilders.
It creates a selector with the contents of the "node" element of the configuration.
a selector for node builders
Create a role manager that will be used by all 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.
the role manager
Create the tree once component manager and node builders have been set up.
Can be overriden by subclasses to perform pre/post tree creation operations.
Return the list of ProcessingNodes part of this tree that are
Disposable. Care should be taken to properly dispose them before
trashing the processing tree.
Get <xxx:parameter> elements as a Map of ListOfMapResolvers,
that can be turned into parameters using ListOfMapResolver.buildParameters().
the Map of ListOfMapResolver, or null if there are no parameters.
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.
throws: ConfigurationException - if the default type could not be found.
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.
As a convenience, the node is returned by this method to allow constructs
like return treeBuilder.setupNode(new MyNode(), config).