public interface Tree extends Serializable
| Modifier and Type | Method and Description |
|---|---|
boolean |
currentObjectIsParent() |
Map |
getAllObjects() |
List |
getChildList() |
List |
getChildList(Long parentID) |
Map |
getChildren() |
Map |
getChildren(Long parentID) |
Long |
getCurrentId() |
String |
getCurrentLevel()
Get the current level.
|
Object |
getCurrentObject() |
String |
getCurrentObjectHTMLId()
This is used to get the String id suitable for use in a
javascript tree.
|
Collection |
getCurrentObjectProperties()
This returns a collection of String properties that can be
displayed in a table.
|
Object |
getParent() |
List |
getRootNodeList() |
Collection |
getSortedObjects()
A collection of objects in proper sorted order for a tree.
|
Collection |
getSortedObjects(Long parentId)
A collection of objects in proper sorted order for a subpool tree.
|
String |
getSortProperty()
This gets the property by which siblings will be sorted.
|
boolean |
haveCommonRoot(Long poolIdA,
Long poolIdB)
THis checks to see if given two pools have a common ancestor
|
boolean |
isDescendantOf(Long poolA,
Long poolB)
Is a pool a descendant of the other?
|
int |
poolLevel(Long poolId)
This returns the level of the pool inside a pool tree, Root being 0.
|
void |
setCurrentId(Long id) |
void |
setPropertyMethods(String[] methods)
This takes in an array of method names used to get the properties.
|
void |
setSortProperty(String sortBy)
This sets the property by which siblings will be sorted.
|
void |
sortByProperty(String sortProperty,
boolean sortAscending)
This sorts the tree by the property .
|
Long getCurrentId()
void setCurrentId(Long id)
id - boolean currentObjectIsParent()
Object getCurrentObject()
Object getParent()
String getCurrentObjectHTMLId()
String getCurrentLevel()
Collection getCurrentObjectProperties()
void setPropertyMethods(String[] methods)
This does not have to be implemented -- it will be a dummy method for most trees. i.e.
String[] methods = new String[3]; methods[0] = "getName"; methods[1] = "getNumberOfSubpools"; methods[2] = "getDescription";
Which might produce:
{ "Biology 101", "3", "Basic Biology Questions" }
when getCurrentObjectProperties() is called.
Map getAllObjects()
Collection getSortedObjects()
Collection getSortedObjects(Long parentId)
Map getChildren()
List getChildList()
List getRootNodeList()
String getSortProperty()
void setSortProperty(String sortBy)
void sortByProperty(String sortProperty, boolean sortAscending)
boolean haveCommonRoot(Long poolIdA, Long poolIdB)
int poolLevel(Long poolId)
Copyright © 2005–2017 Sakai Project. All rights reserved.