Package org.xwiki.tree
Class AbstractTreeNode
- java.lang.Object
-
- org.xwiki.tree.AbstractTreeNode
-
- All Implemented Interfaces:
TreeNode
- Direct Known Subclasses:
AbstractTree
public abstract class AbstractTreeNode extends Object implements TreeNode
Base class for representing a node in a tree structure.- Since:
- 8.3M2, 7.4.5
- Version:
- $Id: 3396ca81049fd6b1c6a8012ae8448c090e77e2cb $
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.inject.Provider<org.xwiki.component.manager.ComponentManager>
contextComponentManagerProvider
protected org.slf4j.Logger
logger
-
Fields inherited from interface org.xwiki.tree.TreeNode
PROPERTY_EXCLUSIONS, PROPERTY_FILTERS, PROPERTY_ORDER_BY
-
-
Constructor Summary
Constructors Constructor Description AbstractTreeNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getChildCount(String nodeId)
Retrieve the number of children of the specified node.List<String>
getChildren(String nodeId, int offset, int limit)
Retrieve the children of the specified node.protected Set<String>
getExclusions()
protected Set<String>
getExclusions(String parentNodeId)
protected String
getOrderBy()
String
getParent(String nodeId)
Retrieve the parent of the specified node.Map<String,Object>
getProperties()
Retrieve the properties that can be used to configure the tree node.protected <E> List<E>
subList(List<E> list, int offset, int limit)
-
-
-
Method Detail
-
getChildren
public List<String> getChildren(String nodeId, int offset, int limit)
Description copied from interface:TreeNode
Retrieve the children of the specified node.- Specified by:
getChildren
in interfaceTreeNode
- Parameters:
nodeId
- the node idoffset
- the offset within the list of child nodeslimit
- the number of child nodes to return- Returns:
- a part of the child nodes of the specified node
-
getChildCount
public int getChildCount(String nodeId)
Description copied from interface:TreeNode
Retrieve the number of children of the specified node.- Specified by:
getChildCount
in interfaceTreeNode
- Parameters:
nodeId
- the node id- Returns:
- the number of child nodes
-
getParent
public String getParent(String nodeId)
Description copied from interface:TreeNode
Retrieve the parent of the specified node.
-
getProperties
public Map<String,Object> getProperties()
Description copied from interface:TreeNode
Retrieve the properties that can be used to configure the tree node. For instance you may want to sort or filter the child nodes.- Specified by:
getProperties
in interfaceTreeNode
- Returns:
- the map of tree node properties
-
getOrderBy
protected String getOrderBy()
-
-