|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NodeLoader<I>
A node loader is an object that knows how to create a node for some specific item and how to load forward and reverse nodes for related items.
NOTE! This interface is not fixed on the implementor side. We reserve
the right to add new methods and functionality to this interface without
warning. We recommend that all implementations are subclasses of AbstractNodeLoader
since this class will get default implementation of
all new funcationality.
Method Summary | |
---|---|
Node |
createForwardNode(DbControl dc,
OverviewContext context,
Node parentNode)
Create a forward-loading (from parent to child) node for the given parent node. |
Node |
createPropertyNode(DbControl dc,
OverviewContext context,
Node parentNode)
Create a property node for the given parent node. |
Node |
createReverseNode(DbControl dc,
OverviewContext context,
Node childNode)
Create a reverse-loading (from child to parent) node for the given child node. |
Node |
createRootNode(DbControl dc,
OverviewContext context,
I item)
Create a root node for the given item. |
boolean |
loadChildNodes(DbControl dc,
OverviewContext context,
Node node)
Load child nodes of the current node unless they have been loaded already. |
Method Detail |
---|
Node createRootNode(DbControl dc, OverviewContext context, I item)
ChildNodeDirection.ALL
so that both forward and reverse
child nodes are loaded.
dc
- The DbControl to use for database accesscontext
- The overview contextitem
- The root item
UnsupportedOperationException
- If the current item can't
be used as a root nodeNode createForwardNode(DbControl dc, OverviewContext context, Node parentNode)
The direction of the node(s) should usually be ChildNodeDirection.FORWARD
.
In case there is an error (permission denied, etc.) ChildNodeDirection.NONE
should be used. If there is no child item null
should be returned.
Errors, missing items, etc. should be reported as failures to the OverviewContext
.
dc
- The DbControl to use for database accesscontext
- The overview contextparentNode
- The parent node
UnsupportedOperationException
- If the current item can't
be used as a forward-loading nodeNode createReverseNode(DbControl dc, OverviewContext context, Node childNode)
The direction of the node(s) should usually be ChildNodeDirection.REVERSE
.
In case there is an error (permission denied, etc.) ChildNodeDirection.NONE
should be used. If there is no parent item null
should be returned.
Errors, missing items, etc. should be reported as failures to the OverviewContext
.
dc
- The DbControl to use for database accesscontext
- The overview contextchildNode
- The child node
UnsupportedOperationException
- If the current item can't
be used as a reverse-loading nodeNode createPropertyNode(DbControl dc, OverviewContext context, Node parentNode)
The direction of the node(s) should usually be ChildNodeDirection.NONE
, but
it may also be ChildNodeDirection.PROPERTY
in case the property has sub-properties.
One example is the ProtocolLoader
which loads the
protocol parameters as child nodes.
In case there is an error (permission denied, etc.) ChildNodeDirection.NONE
should be used. If there is no property item null
should be returned (but this may also indicate that more than one node
was created).
Errors, missing items, etc. should be reported as failures to the OverviewContext
.
dc
- The DbControl to use for database accesscontext
- The overview contextparentNode
- The parent node
UnsupportedOperationException
- If the current item can't
be used as a property nodeboolean loadChildNodes(DbControl dc, OverviewContext context, Node node)
Node.getChildNodeDirection()
of the node.
dc
- The DbControl to use for database accesscontext
- The overview contextnode
- The node
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |