Class EntityLinkTree
- java.lang.Object
 - 
- com.flowable.platform.common.entitylink.EntityLinkTree
 
 
- 
public class EntityLinkTree extends Object
- Author:
 - Filip Hrisafov
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEntityLinkTree.EntityLinkNodeprotected static classEntityLinkTree.Scope 
- 
Field Summary
Fields Modifier and Type Field Description protected Map<String,EntityLinkInfo>entityLinksprotected booleanneedsRefreshprotected Map<EntityLinkTree.Scope,EntityLinkTree.EntityLinkNode>nodeMap 
- 
Constructor Summary
Constructors Constructor Description EntityLinkTree(Collection<? extends EntityLinkInfo> entityLinks) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEntityLink(EntityLinkInfo entityLink)Add an entity link to the treeprotected static Map<EntityLinkTree.Scope,EntityLinkTree.EntityLinkNode>createNodeMap(Collection<? extends EntityLinkInfo> entityLinks)static EntityLinkTreecreateTree(Collection<? extends EntityLinkInfo> entityLinks)Create an entity link tree from the givenentityLinks.EntityLinkTree.EntityLinkNodeget(String scopeId, String scopeType)Get the node with the given scope parametersprotected Map<EntityLinkTree.Scope,EntityLinkTree.EntityLinkNode>getNodeMap()EntityLinkTree.EntityLinkNodegetRoot()Get the root of the tree.booleanhasNode(String scopeId, String scopeType)Check if the tree has a node for the given scope parameters 
 - 
 
- 
- 
Field Detail
- 
entityLinks
protected final Map<String,EntityLinkInfo> entityLinks
 
- 
nodeMap
protected final Map<EntityLinkTree.Scope,EntityLinkTree.EntityLinkNode> nodeMap
 
- 
needsRefresh
protected boolean needsRefresh
 
 - 
 
- 
Constructor Detail
- 
EntityLinkTree
public EntityLinkTree(Collection<? extends EntityLinkInfo> entityLinks)
 
 - 
 
- 
Method Detail
- 
get
public EntityLinkTree.EntityLinkNode get(String scopeId, String scopeType)
Get the node with the given scope parameters- Parameters:
 scopeId- the scope idscopeType- 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 idscopeType- the scope type- Returns:
 trueif the true has a node for the given tree
 
- 
addEntityLink
public void addEntityLink(EntityLinkInfo entityLink)
Add an entity link to the tree- Parameters:
 entityLink- the entity link to be added
 
- 
getRoot
public EntityLinkTree.EntityLinkNode getRoot()
Get the root of the tree.- Returns:
 - the root of the tree
 
 
- 
getNodeMap
protected Map<EntityLinkTree.Scope,EntityLinkTree.EntityLinkNode> getNodeMap()
 
- 
createNodeMap
protected static Map<EntityLinkTree.Scope,EntityLinkTree.EntityLinkNode> createNodeMap(Collection<? extends EntityLinkInfo> entityLinks)
 
- 
createTree
public static EntityLinkTree createTree(Collection<? extends EntityLinkInfo> entityLinks)
Create an entity link tree from the givenentityLinks. The links should represent all links for the same root scope. i.e. retrieved viaEntityLinkService.findEntityLinksWithSameRootScopeForScopeIdAndScopeType(String, String, String)- Parameters:
 entityLinks- all entity links with the same root scope- Returns:
 - the entity link tree for the given entity links
 
 
 - 
 
 -