com.webmethods.caf.faces.data.tree
Interface ITreeContentProvider

All Superinterfaces:
IAddressableTableContentProvider, IContentProvider, ITableContentProvider
All Known Subinterfaces:
ISelectableTreeContentProvider
All Known Implementing Classes:
BoundChildrenTreeContentProvider, FilterableListTreeContentProvider, LazyNodeTreeContentProvider, ListTreeContentProvider, NodeTreeContentProvider, TableTreeContentProvider, XMLTreeContentProvider

public interface ITreeContentProvider
extends IAddressableTableContentProvider

Tree content provider. Must always iterate over tree data source in depth-first order. May have multiple roots (rows at depth zero).


Method Summary
 Iterator getChildIds()
          String ids of child rows, in order.
 int getDepth()
          Depth of current row.
 boolean getHasChildren()
          True if current row has children.
 boolean[] getLastChildAncestors()
          ITreeContentProvider.isLastChild() value of ancestors to the current row, from the root to the current row's parent.
 Collection getOpenIds()
          Collection of String ids of open rows.
 String getParentId()
          Id of parent row.
 Iterator getRootIds()
          String ids of root rows, in order.
 Collection getUnopenIds()
          Collection of String ids of un-open rows (all other rows are open implicitly).
 boolean getUseUnopenModel()
          True if it's more effecient to use the un-open model (ITreeContentProvider.getUnopenIds()) rather than the open model (ITreeContentProvider.getOpenIds()).
 boolean isFirstChild()
          True if current row is first child of parent (not whether or not current row is first row in tree).
 boolean isLastChild()
          True if current row is last child of parent (not whether or not current row is last row in tree).
 boolean isOpen()
          True if current row is open.
 boolean isVisible()
          True if ancestors of current row are all open.
 void setOpen(boolean open)
          True if current row is open.
 void setOpenIds(Collection ids)
          Collection of String ids of open rows.
 void setUnopenIds(Collection ids)
          Collection of String ids of un-open rows (all other rows are open implicitly).
 
Methods inherited from interface com.webmethods.caf.faces.data.IAddressableTableContentProvider
getRowId, isAddressable, setRowById
 
Methods inherited from interface com.webmethods.caf.faces.data.ITableContentProvider
getCurrentRow, getRowCount, getRowIndex, getRowVariable, isRowAvailable, setRowIndex, setRowVariable
 
Methods inherited from interface com.webmethods.caf.faces.data.IContentProvider
getPropertyKeys, getType, getValue, hasProperty, toString
 

Method Detail

getRootIds

Iterator getRootIds()
String ids of root rows, in order. Empty iterator (not null) if tree is empty.


getDepth

int getDepth()
Depth of current row. Zero (0) for root.


getParentId

String getParentId()
Id of parent row. Null for root. Parent depth must be exactly one less than current depth.


getChildIds

Iterator getChildIds()
String ids of child rows, in order. Empty iterator (not null) if row has no children. Child depth must be exactly one more than current depth.


getHasChildren

boolean getHasChildren()
True if current row has children.


isFirstChild

boolean isFirstChild()
True if current row is first child of parent (not whether or not current row is first row in tree). Also true for first root in tree (child with no parent is a root).


isLastChild

boolean isLastChild()
True if current row is last child of parent (not whether or not current row is last row in tree). Also true for last root in tree (child with no parent is a root).


getLastChildAncestors

boolean[] getLastChildAncestors()
ITreeContentProvider.isLastChild() value of ancestors to the current row, from the root to the current row's parent. Zero-length array (non-null) for root.


isOpen

boolean isOpen()
True if current row is open.


setOpen

void setOpen(boolean open)
True if current row is open.


isVisible

boolean isVisible()
True if ancestors of current row are all open. Root is always visible.


getOpenIds

Collection getOpenIds()
Collection of String ids of open rows. May be empty or contain non-existent ids; never null, never contains null.


setOpenIds

void setOpenIds(Collection ids)
Collection of String ids of open rows. May be empty or contain non-existent ids; never null, never contains null.


getUseUnopenModel

boolean getUseUnopenModel()
True if it's more effecient to use the un-open model (ITreeContentProvider.getUnopenIds()) rather than the open model (ITreeContentProvider.getOpenIds()).


getUnopenIds

Collection getUnopenIds()
Collection of String ids of un-open rows (all other rows are open implicitly). May be empty or contain non-existent ids; never null, never contains null.


setUnopenIds

void setUnopenIds(Collection ids)
Collection of String ids of un-open rows (all other rows are open implicitly). May be empty or contain non-existent ids; never null, never contains null.