com.atlassian.confluence.pages
Class ContentTree

java.lang.Object
  extended by com.atlassian.confluence.pages.ContentTree

public class ContentTree
extends java.lang.Object

Stores a list of root ContentNodes. The purpose of this tree object is to store a hierarchy of pages (maybe a subset of the full tree) that a user can see after applying permission checks. This saves us from having to redo permission checks every time we need to display or walk the page hiearchy.


Constructor Summary
ContentTree()
           
ContentTree(java.util.List rootContentNodes)
           
 
Method Summary
 void addRootNode(ContentNode contentNode)
           
 void filter(java.util.List ids)
          Remove all nodes in this tree whose id does not match the list passed in
 java.util.List getAllContentNodes()
           
 java.util.List getPages()
           
 java.util.List getRootNodes()
           
 boolean isRootNode(ContentNode node)
           
 void removeNode(ContentNode contentNode)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentTree

public ContentTree()

ContentTree

public ContentTree(java.util.List rootContentNodes)
Method Detail

getRootNodes

public java.util.List getRootNodes()

isRootNode

public boolean isRootNode(ContentNode node)

filter

public void filter(java.util.List ids)
Remove all nodes in this tree whose id does not match the list passed in

Parameters:
ids - List<String> of ids of pages

addRootNode

public void addRootNode(ContentNode contentNode)

removeNode

public void removeNode(ContentNode contentNode)

getAllContentNodes

public java.util.List getAllContentNodes()

getPages

public java.util.List getPages()
Returns:
all the pages associated with the nodes in this tree

size

public int size()
Returns:
the number of nodes in this tree


Copyright © 2003-2010 Atlassian. All Rights Reserved.