org.xwiki.model.reference
Class EntityReferenceTree

java.lang.Object
  extended by org.xwiki.model.reference.EntityReferenceTreeNode
      extended by org.xwiki.model.reference.EntityReferenceTree

@Unstable
public class EntityReferenceTree
extends EntityReferenceTreeNode

Expose a set of references as a tree. The sort order is configurable using a Comparator. By default the references will be sorted in default String order.

Only a set of references starting at same level is supported. For example you can pass the following lists:

but not [space.page, wiki:space].

Since:
5.4RC1
Version:
$Id: 7a06da90b1575477ea31a46840cae21ead063147 $

Constructor Summary
EntityReferenceTree(Comparator<String> comparator, EntityReference... references)
           
EntityReferenceTree(Comparator<String> comparator, Iterable<? extends EntityReference> references)
           
EntityReferenceTree(EntityReference... references)
           
EntityReferenceTree(Iterable<? extends EntityReference> references)
           
 
Method Summary
 
Methods inherited from class org.xwiki.model.reference.EntityReferenceTreeNode
get, getChildren, getLocales, getReference, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 names
references - the references to fill the tree with

EntityReferenceTree

public EntityReferenceTree(Comparator<String> comparator,
                           EntityReference... references)
Parameters:
comparator - control the order of references names
references - the references to fill the tree with


Copyright © 2004–2014 XWiki. All rights reserved.