Class AbstractTreeNavigatorImpl
java.lang.Object
com.ptc.windchill.esi.treenavigation.AbstractTreeNavigatorImpl
- All Implemented Interfaces:
TreeNavigator
- Direct Known Subclasses:
TreeNavigatorImpl
Performs the structure navigation and populates all the necessary collections which are to be used by ESI renderers.
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionprotected voidDoes the following:
CallsnavigateStructure(TreeNavigationRequest)to navigate the structure and populate the data in the required format. InvokesfilterLeafNodes()to remove those entries from leafNodes that figure in assemblyNodes. Invokes the APIfilterNodes(Collection, Collection)to allow customizers to filter out the nodes as per their requirement.
Supported API: trueprotected abstract voidfilterNodes(Collection<Persistable> assemblyNodes, Collection<Persistable> leafNodes) Allows subclasses to fix the contents of assembly nodes and leaf nodes collections before those are returned to the renderer.Gets the value of the attribute: assemblyNodes - a collection of Persistable objects for all the non-leaf nodes in the tree that is traversed by this navigator.intgetDepth()Gets the value of the attribute: depth - the number of levels to navigate.Gets the value of the attribute: leafNodes - a collection of Persistable objects for all the leaf-nodes in the tree that is traversed by this navigator.Gets the value of the attribute: navCriteria - the navigation criteria used for navigating the structure
Supported API: truegetRoot()Gets the value of the attribute: root; The top-level object in the structure.protected voidCallsvalidate()to insure that all attributes are in the correct state.voidsetData(Persistable root, int depth, NavigationCriteria navCriteria, Map<String, Object> navigationOptions) Sets the data needed by this navigator for traversing the relevant tree or structure.protected voidvalidate()Ensures that all attributes needed to traverse a structure are in the correct state.
-
Method Details
-
getRoot
Gets the value of the attribute: root; The top-level object in the structure.
Supported API: true- Returns:
- Persistable
-
getDepth
public int getDepth()Gets the value of the attribute: depth - the number of levels to navigate.
Supported API: true- Returns:
- int
-
getAssemblyNodes
Gets the value of the attribute: assemblyNodes - a collection of Persistable objects for all the non-leaf nodes in the tree that is traversed by this navigator.
Supported API: true- Specified by:
getAssemblyNodesin interfaceTreeNavigator- Returns:
- - The collection persistable object which are assembly nodes.
-
getLeafNodes
Gets the value of the attribute: leafNodes - a collection of Persistable objects for all the leaf-nodes in the tree that is traversed by this navigator.
Supported API: true- Specified by:
getLeafNodesin interfaceTreeNavigator- Returns:
- - The collection persistable for all the leaf-nodes.
-
processTree
Callsvalidate()to insure that all attributes are in the correct state. Calls the APIfetchStructure()which in turn invokes the collector service APIs to fetch the structure for the root part.
Supported API: true- Throws:
WTException
-
validate
Ensures that all attributes needed to traverse a structure are in the correct state. Throws a WTException if:- the root attribute is null
- the depth attribute is < 0
- the navCriteria attribute is null
Supported API: true- Throws:
WTException
-
fetchStructure
Does the following:
- Calls
navigateStructure(TreeNavigationRequest)to navigate the structure and populate the data in the required format. - Invokes
filterLeafNodes()to remove those entries from leafNodes that figure in assemblyNodes. - Invokes the API
filterNodes(Collection, Collection)to allow customizers to filter out the nodes as per their requirement.
Supported API: true- Throws:
WTException
- Calls
-
filterNodes
protected abstract void filterNodes(Collection<Persistable> assemblyNodes, Collection<Persistable> leafNodes) throws WTException Allows subclasses to fix the contents of assembly nodes and leaf nodes collections before those are returned to the renderer.
Supported API: true- Parameters:
assemblyNodes- - Collection of assembly nodes.leafNodes- - Collection of leaf nodes.- Throws:
WTException
-