Interface TreeNavigator

All Known Implementing Classes:
AbstractTreeNavigatorImpl, TreeNavigatorImpl

public interface TreeNavigator
Navigates the object structure by using collector framework APIs

Supported API: true

Extendable: true
  • Method Details

    • getAssemblyNodes

      Collection<Persistable> getAssemblyNodes()
      Returns a collection of Persistable objects for all the non leaf nodes in the tree that is traversed by this navigator.

      Supported API: true
      Returns:
      Collection
    • getLeafNodes

      Collection<Persistable> getLeafNodes()
      Returns a collection of Persistable objects for all the leaf nodes in the tree that is traversed by this navigator.

      Supported API: true
      Returns:
      Collection
    • getAssociatedNodes

      Collection<Persistable> getAssociatedNodes()
      Returns a collection of associated Persistable objects for all the assembly nodes and leaf nodes in the tree that is traversed by this navigator. That objects associated via reference or other association with these main tree structure objects. This method will return non null collection when association nodes are processed by tree navigator as per navigation request specified for the object.

      Supported API: true
      Returns:
      Collection
    • getAssocLinksAndRoleBObjects

      Map<ObjectToObjectLink,Persistable> getAssocLinksAndRoleBObjects(Persistable obj)
      Returns a Map that holds the links associated to the input Persistable object as keys and the other end (Role B) objects as values.

      Supported API: true
      Parameters:
      obj - Persistable Role A object
      Returns:
      A Map holding links (associated to obj) as keys and the corresponding Role B objects as values.
    • setData

      void setData(Persistable root, int depth, NavigationCriteria navCriteria, Map<String,Object> navigationOptions) throws WTException
      Sets the data needed by this navigator for traversing the relevant tree (or structure).

      Supported API: true
      Parameters:
      root - Object for which to navigate the structure
      depth - Level (or depth) up to which to navigate the structure.
      navCriteria - Navigation criteria to be used for navigating the structure
      navigationOptions - Map containing options or settings that governs navigation of an structure.
      Example: Navigate reference to be fetched.
      Throws:
      WTException
    • getRoleAObjectAndAssocLinks

      Map<Persistable,Map<ObjectToObjectLink,Persistable>> getRoleAObjectAndAssocLinks()
      Returns a Map that holds RoleA object as a key and assocLinksAndRoleBObjects as value.

      Supported API: true
      Returns:
      A Map that holds RoleA object as a key and assocLinksAndRoleBObjects as value.
    • getFilteredAssemblyNodes

      Collection<Persistable> getFilteredAssemblyNodes(String excludeClass)
      Returns a collection of Persistable objects for all the non leaf nodes in the tree that is traversed by this navigator except the objects assignable from input excludeClass.

      Supported API: true
      Returns:
      Collection
    • getFilteredLeafNodes

      Collection<Persistable> getFilteredLeafNodes(String excludeClass)
      Returns a collection of Persistable objects for all the leaf nodes in the tree that is traversed by this navigator except the objects assignable from input excludeClass.

      Supported API: true
      Returns:
      Collection
    • getLeafAndAssemblyNodeMap

      Map<Persistable,Persistable> getLeafAndAssemblyNodeMap()
      Returns a Map that holds the Persistable leaf object as keys and its immediate assembly as value.

      Supported API: true
      Returns:
      - A Map that holds the Persistable leaf object as keys and its immediate assembly node as value.
    • getAssemblyNode

      Persistable getAssemblyNode(Persistable leaf)
      Returns a immediate assembly node of a specified input leaf node.

      Supported API: true
      Parameters:
      leaf - input leaf node
      Returns:
      - The Persistable assembly node for specified leaf or null if there is no assembly for specified child.
    • setAssemblyAndLeafNodes

      void setAssemblyAndLeafNodes(Persistable assemblyNode, Persistable leafNode, Map<Persistable,Persistable> leafAssemblyNodeMap)
      Set the value of assembly node and leaf node for raw material and hybrid structure

      Supported API: true
    • setAssocLinksAndRoleAObjects

      void setAssocLinksAndRoleAObjects(Map<Persistable,Map<ObjectToObjectLink,Persistable>> map)
      Set the value of the map assocLinksAndRoleAObjects with role A object as the key and map of part usage links in raw material structure and their role B objects as values.

      Supported API: true
    • getChangedRawMaterialLinks

      List<Persistable> getChangedRawMaterialLinks()
      Returns a Map that holds the raw material parts for added/changed/deleted raw material links

      Supported API: true
      Returns:
      - A Map that holds the raw material parts for added/changed/deleted raw material links.
    • setChangedRawMaterialLinks

      void setChangedRawMaterialLinks(WTPart part)
      Set the parts for added/changed/deleted raw material links

      Supported API: true
    • addToRoleBObjsByVersionToObjectLinksByParts

      void addToRoleBObjsByVersionToObjectLinksByParts(Persistable part, VersionToObjectLink versionToObjectLink, Persistable leafNode)
      Adds an entry to a Map that stores parts in a structure as keys, and certain Maps as values. Each value Map stores version to object links (having the said part version as the role A object) as keys and iterations of the corresponding role B objects as values. Uses the input arguments towards creating the entry.

      Supported API: true
      Parameters:
      part - - Input part.
      versionToObjectLink - - Input version to object link.
      leafNode - - Role B object of the input version to object link.
    • getVersionToObjectLink

      VersionToObjectLink getVersionToObjectLink(Persistable roleAObj, Persistable roleBObj)
      Fetches the version to object link that exists between the input role A and role B objects.

      Supported API: true
      Parameters:
      roleAObj - - Input role A object.
      roleBObj - - Input role B object.
      Returns:
      VersionToObjectLink that is associated with the input role A and role B objects.
    • getLeafNodesForAssembly

      Collection<Persistable> getLeafNodesForAssembly(Persistable assembly)
      Returns a Collection of leaf nodes for the input Persistable.

      Supported API: true
      Parameters:
      assembly - - Input Persistable for which leaf nodes are to be fetched.
      Returns:
      Collection of Persistables that are associated with the input Persistable as leaf nodes.
    • getRoleBObjsByVersionToObjectLinksByParts

      Map<Persistable,Map<VersionToObjectLink,Persistable>> getRoleBObjsByVersionToObjectLinksByParts()
      Returns a Map that stores parts in a structure as keys, and certain Maps as values. Each value Map stores version to object links (having the said part version as the role A object) as keys and iterations of the corresponding role B objects as values.

      Supported API: true
      Returns:
      A Map as mentioned in the description.
    • setObjToCoProduceLinks

      void setObjToCoProduceLinks(VersionToObjectLink link, Persistable part)
      Adds an entry to a Map that stores co-produce objects as keys, and the corresponding primary co-produce links as values.

      Supported API: true
      Parameters:
      link - - Input primary co-produce link that associates the primary part to the input co-produce object.
      part - - Input co-produce object.
    • getObjToCoProduceLinks

      Map<Persistable,VersionToObjectLink> getObjToCoProduceLinks()
      Returns a Map that stores co-produce objects as keys, and the corresponding primary co-produce links as values.

      Supported API: true
      Returns:
      A Map holding keys and values as mentioned in the description.
    • getNodeTolevel

      Integer getNodeTolevel(Persistable persistable)
      Returns a Integer that indicates the level of node in the structure.

      Supported API: true
      Returns:
      level of persistable object in the structure
    • setNodeTolevel

      void setNodeTolevel(Persistable persistable, Integer level)
      Adds an entry to a Map that stores node as key, and level as value

      Supported API: true