|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Tree
originally Tree.java
| Method Summary | |
|---|---|
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 . |
| Method Detail |
|---|
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(Long parentID)
parentID -
Map getChildren()
List getChildList(Long parentID)
parentID -
List getChildList()
List getRootNodeList()
String getSortProperty()
void setSortProperty(String sortBy)
void sortByProperty(String sortProperty,
boolean sortAscending)
boolean haveCommonRoot(Long poolIdA,
Long poolIdB)
boolean isDescendantOf(Long poolA,
Long poolB)
int poolLevel(Long poolId)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||