Class ExtensionChildNodeLoader<I>
java.lang.Object
net.sf.basedb.util.overview.loader.ExtensionChildNodeLoader<I>
- All Implemented Interfaces:
NodeLoader<I>
Wrapper for node loaders that automatically hooks into the
extension system when loading child nodes for a parent node.
It works by first delegating all method calls to the parent
node loader, but the
loadChildNodes(DbControl, OverviewContext, Node)
contains additional logic to query the extension system and
call ChildNodeLoaderAction.createChildNodes(DbControl, OverviewContext, Node)
for any action created by the an extension.- Since:
- 3.2
- Author:
- Nicklas
-
Field Summary
-
Constructor Summary
ConstructorDescriptionExtensionChildNodeLoader
(NodeLoader<I> parent) Wrap the given parent node loader. -
Method Summary
Modifier and TypeMethodDescriptioncreateForwardNode
(DbControl dc, OverviewContext context, Node parentNode) Call the same method on the 'parent' node loader.createPropertyNode
(DbControl dc, OverviewContext context, Node parentNode) Call the same method on the 'parent' node loader.createReverseNode
(DbControl dc, OverviewContext context, Node childNode) Call the same method on the 'parent' node loader.createRootNode
(DbControl dc, OverviewContext context, I item) Call the same method on the 'parent' node loader.boolean
loadChildNodes
(DbControl dc, OverviewContext context, Node node) Call the same method on the 'parent' node loader.toString()
-
Field Details
-
parent
-
-
Constructor Details
-
ExtensionChildNodeLoader
Wrap the given parent node loader.
-
-
Method Details
-
createForwardNode
Call the same method on the 'parent' node loader.- Specified by:
createForwardNode
in interfaceNodeLoader<I>
- Parameters:
dc
- The DbControl to use for database accesscontext
- The overview contextparentNode
- The parent node- Returns:
- The node that the parent node loader creates (may be null)
-
createPropertyNode
Call the same method on the 'parent' node loader.- Specified by:
createPropertyNode
in interfaceNodeLoader<I>
- Parameters:
dc
- The DbControl to use for database accesscontext
- The overview contextparentNode
- The parent node- Returns:
- The node that the parent node loader creates (may be null)
-
createReverseNode
Call the same method on the 'parent' node loader. If one or more child nodes are added to the parent node, theloadChildNodes(DbControl, OverviewContext, Node)
is called for each of the new nodes.- Specified by:
createReverseNode
in interfaceNodeLoader<I>
- Parameters:
dc
- The DbControl to use for database accesscontext
- The overview contextchildNode
- The child node- Returns:
- The node that the parent node loader creates (may be null)
-
createRootNode
Call the same method on the 'parent' node loader.- Specified by:
createRootNode
in interfaceNodeLoader<I>
- Parameters:
dc
- The DbControl to use for database accesscontext
- The overview contextitem
- The root item- Returns:
- The node that the parent node loader creates (may be null)
-
loadChildNodes
Call the same method on the 'parent' node loader. Then, check the extension system for extensions to the 'net.sf.basedb.util.overview.loader' extension point and ask the factories forChildNodeLoaderAction
:s and let each of them create their child nodes.- Specified by:
loadChildNodes
in interfaceNodeLoader<I>
- Parameters:
dc
- The DbControl to use for database accesscontext
- The overview contextnode
- The node- Returns:
- TRUE if new nodes were added to the parent node, FALSE if not
-
toString
-