Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webengine.ui.tree
Interface TreeModel

All Superinterfaces:
Serializable
All Known Implementing Classes:
TreeModelImpl

public interface TreeModel
extends Serializable

A tree view manage a tree structure of items. The tree data is lazy loaded by using the data provider specified at tree view creation.

Author:
Bogdan Stefanescu

Method Summary
 TreeItem find(Path path)
          Like find(Path) but the path is expressed as a Path object.
 TreeItem find(String path)
          Find the item at the given path.
 TreeItem findAndReveal(Path path)
          Like findAndReveal(Path) but the path is expressed as a Path object.
 TreeItem findAndReveal(String path)
          Find and item given it's path and expand parents if needed.
 ContentProvider getContentProvider()
          Gets the content provider used by this tree.
 Object getInput()
          Gets the current input of the tree.
 TreeItem getRoot()
          Get the tree root item, or null if tree has no input.
 void setContentProvider(ContentProvider provider)
          Sets the content provider to be used by this tree.
 void setInput(Object input)
          Sets the input data.
 

Method Detail

getContentProvider

ContentProvider getContentProvider()
Gets the content provider used by this tree.


setContentProvider

void setContentProvider(ContentProvider provider)
Sets the content provider to be used by this tree.


setInput

void setInput(Object input)
Sets the input data.

Parameters:
input - (may be null)

getInput

Object getInput()
Gets the current input of the tree.

Returns:
the tree input data. may be null.

getRoot

TreeItem getRoot()
Get the tree root item, or null if tree has no input.

Returns:
the root

find

TreeItem find(String path)
Find the item at the given path. Only loaded items are searched. This operation will not load any extra item.

Parameters:
path - the path to search
Returns:
the item at the given path or null if none

findAndReveal

TreeItem findAndReveal(String path)
Find and item given it's path and expand parents if needed. The returned item is not explicitly expanded so it may be collapsed or its children if any not yet loaded

Parameters:
path - the path to search
Returns:
the item or null if none

find

TreeItem find(Path path)
Like find(Path) but the path is expressed as a Path object.

See Also:
find(String)

findAndReveal

TreeItem findAndReveal(Path path)
Like findAndReveal(Path) but the path is expressed as a Path object.

See Also:
findAndReveal(String)

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.