Package org.xwiki.model.reference
Class EntityReferenceTree
- java.lang.Object
-
- org.xwiki.model.reference.EntityReferenceTreeNode
-
- org.xwiki.model.reference.EntityReferenceTree
-
public class EntityReferenceTree extends EntityReferenceTreeNode
Expose a set of references as a tree. The sort order is configurable using aComparator
. By default the references will be sorted in defaultString
order.Only a set of references starting at same level is supported. For example you can pass the following lists:
- [
wiki:space.page
,wiki2:space2.page2
] - [
wiki:space.page
,wiki:space
] - [
space.page
,space
]
space.page
,wiki:space
].- Since:
- 5.4RC1
- Version:
- $Id: 231c2f65806270e48ce0a1aae8ecbee2d73d3921 $
- [
-
-
Constructor Summary
Constructors Constructor Description EntityReferenceTree(Iterable<? extends EntityReference> references)
EntityReferenceTree(Comparator<String> comparator, Iterable<? extends EntityReference> references)
EntityReferenceTree(Comparator<String> comparator, EntityReference... references)
EntityReferenceTree(EntityReference... references)
-
Method Summary
-
Methods inherited from class org.xwiki.model.reference.EntityReferenceTreeNode
get, get, getChildren, getChildren, getChildren, getChildrenInternal, getLocales, getReference, toString
-
-
-
-
Constructor Detail
-
EntityReferenceTree
public EntityReferenceTree(Iterable<? extends EntityReference> references)
- Parameters:
references
- the references to fill the tree with
-
EntityReferenceTree
public EntityReferenceTree(EntityReference... references)
- Parameters:
references
- the references to fill the tree with
-
EntityReferenceTree
public EntityReferenceTree(Comparator<String> comparator, Iterable<? extends EntityReference> references)
- Parameters:
comparator
- control the order of references namesreferences
- the references to fill the tree with
-
EntityReferenceTree
public EntityReferenceTree(Comparator<String> comparator, EntityReference... references)
- Parameters:
comparator
- control the order of references namesreferences
- the references to fill the tree with
-
-