Class EntityLinkTree

java.lang.Object
com.flowable.platform.common.entitylink.EntityLinkTree

public class EntityLinkTree extends Object
Author:
Filip Hrisafov
  • Field Details

  • Constructor Details

    • EntityLinkTree

      public EntityLinkTree(Collection<? extends org.flowable.entitylink.api.EntityLinkInfo> entityLinks)
  • Method Details

    • get

      public EntityLinkTree.EntityLinkNode get(String scopeId, String scopeType)
      Get the node with the given scope parameters
      Parameters:
      scopeId - the scope id
      scopeType - the scope type
      Returns:
      the node in the tree representing the given scope
    • hasNode

      public boolean hasNode(String scopeId, String scopeType)
      Check if the tree has a node for the given scope parameters
      Parameters:
      scopeId - the scope id
      scopeType - the scope type
      Returns:
      true if the true has a node for the given tree
    • addEntityLink

      public void addEntityLink(org.flowable.entitylink.api.EntityLinkInfo entityLink)
      Add an entity link to the tree
      Parameters:
      entityLink - the entity link to be added
    • getRoot

      Get the root of the tree.
      Returns:
      the root of the tree
    • findRoot

      protected EntityLinkTree.EntityLinkNode findRoot()
    • getNodeMap

    • createNodeMap

      protected static Map<EntityLinkTree.Scope,EntityLinkTree.EntityLinkNode> createNodeMap(Collection<? extends org.flowable.entitylink.api.EntityLinkInfo> entityLinks)
    • createTree

      public static EntityLinkTree createTree(Collection<? extends org.flowable.entitylink.api.EntityLinkInfo> entityLinks)
      Create an entity link tree from the given entityLinks. The links should represent all links for the same root scope. i.e. retrieved via EntityLinkService.findEntityLinksWithSameRootScopeForScopeIdAndScopeType(String, String, String)
      Parameters:
      entityLinks - all entity links with the same root scope
      Returns:
      the entity link tree for the given entity links