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
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Add a node to the expanded node list, which is used for node expansion state management

    Supported API: true
    Get the oids of the expanded nodes

    Supported API: true
    Get the handler's model context.
    getNodes(List parents)
    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.
    boolean
    Determines whether or not the given node has children.
    boolean
    isExpandNeeded(Object node, int level)
    Determines whether or not the given node needs to be expanded.
    void
    Set 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

      void setModelContext(ModelContext mc) throws WTException
      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

      Map<Object,List> getNodes(List parents) throws WTException
      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

      List<Object> getRootNodes() throws WTException
      Get the list of root nodes for the tree.

      Supported API: true
      Returns:
      The root nodes for this tree
      Throws:
      WTException
    • isExpandNeeded

      boolean isExpandNeeded(Object node, int level) throws WTException
      Determines whether or not the given node needs to be expanded.

      Supported API: true
      Parameters:
      node - The node to check
      level - The level at which the node appears within the tree
      Returns:
      boolean
      Throws:
      WTException
    • hasChildren

      boolean hasChildren(Object node) throws WTException
      Determines whether or not the given node has children.

      Supported API: true
      Parameters:
      node - The node to check
      Returns:
      boolean
      Throws:
      WTException
    • addExpandedNode

      void addExpandedNode(Object node) throws WTException
      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