Package com.ptc.core.components.beans
Interface TreeHandler
- All Known Implementing Classes:
ESIShowRelatedESITxnsTreeHandler,MESShopOrdersTreeHandler,TreeHandlerAdapter
public interface TreeHandler
Retrieves the data for a tree component which is used by the TreeCommand.
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddExpandedNode(Object node) Add a node to the expanded node list, which is used for node expansion state management
Supported API: trueGet the oids of the expanded nodes
Supported API: trueGet the handler's model context.Get a mapping of the child nodes for each of the parent nodes in the given list.Get the list of root nodes for the tree.booleanhasChildren(Object node) Determines whether or not the given node has children.booleanisExpandNeeded(Object node, int level) Determines whether or not the given node needs to be expanded.voidSet contextual information about the tree that is being built, like the descriptor, command bean etc.
-
Method Details
-
getModelContext
ModelContext getModelContext()Get the handler's model context.
Supported API: true- Returns:
- ModelContext
-
setModelContext
Set contextual information about the tree that is being built, like the descriptor, command bean etc. This should be initialized before data is requested from the handler.
Supported API: true- Parameters:
mc- The context- Throws:
WTException
-
getNodes
Get a mapping of the child nodes for each of the parent nodes in the given list. Important: This is the only method that will be called for the expand action so this method must be able to initialize the handler properly so that it can answer the question of what are the children of the parent.
Supported API: true- Parameters:
parents- A list of parent nodes- Returns:
- A mapping of parent nodes to lists of their children
- Throws:
WTException
-
getRootNodes
Get the list of root nodes for the tree.
Supported API: true- Returns:
- The root nodes for this tree
- Throws:
WTException
-
isExpandNeeded
Determines whether or not the given node needs to be expanded.
Supported API: true- Parameters:
node- The node to checklevel- The level at which the node appears within the tree- Returns:
- boolean
- Throws:
WTException
-
hasChildren
Determines whether or not the given node has children.
Supported API: true- Parameters:
node- The node to check- Returns:
- boolean
- Throws:
WTException
-
addExpandedNode
Add a node to the expanded node list, which is used for node expansion state management
Supported API: true- Throws:
WTException
-
getExpandedOids
Set getExpandedOids()Get the oids of the expanded nodes
Supported API: true- Returns:
- The NmOids that are expanded
-