org.olat.catalog.ui
Class CatalogAjaxTreeModel

java.lang.Object
  extended by org.olat.core.gui.control.generic.ajax.tree.AjaxTreeModel
      extended by org.olat.catalog.ui.CatalogAjaxTreeModel

public class CatalogAjaxTreeModel
extends AjaxTreeModel

Description:
This class represents the catalog data model that can be used with the ajax tree controller. It supports dynamic loading of catalog elements and can be configured to display only the categories or the categories and the children.

The datamodel can also support drag&drop. In this mode, the categories act as drop zones for categories and leafs.

Initial Date: 30.05.2008

Author:
gnaegi

Constructor Summary
CatalogAjaxTreeModel(CatalogEntry rootEntry, CatalogEntry toBeMovedEntry, java.util.List<CatalogEntry> ownedEntries, boolean showLeafs, boolean allowDragNdrop)
          Constructor for a ajax tree catalog data model
 
Method Summary
 java.util.List<AjaxTreeNode> getChildrenFor(java.lang.String nodeId)
          Returns the list of children for this node.
 
Methods inherited from class org.olat.core.gui.control.generic.ajax.tree.AjaxTreeModel
getCustomRootIconCssClass, getTreeModelIdentifyer, setCustomRootIconCssClass
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatalogAjaxTreeModel

public CatalogAjaxTreeModel(CatalogEntry rootEntry,
                            CatalogEntry toBeMovedEntry,
                            java.util.List<CatalogEntry> ownedEntries,
                            boolean showLeafs,
                            boolean allowDragNdrop)
Constructor for a ajax tree catalog data model

Parameters:
rootEntry - The catalog root entry
toBeMovedEntry - The entry what should be moved or NULL if no such entry. If not null this entry will not be displayed in the tree
ownedEntries - List of entries (categories) that are owned by the current user. In category move operations the target category will be checked against this list. Can be NULL
showLeafs - true: show also leafs in the tree; false: show only categories
allowDragNdrop - true: enable drag&dop of categories and leafs; false: don't use drag&drop
Method Detail

getChildrenFor

public java.util.List<AjaxTreeNode> getChildrenFor(java.lang.String nodeId)
Description copied from class: AjaxTreeModel
Returns the list of children for this node.

Specified by:
getChildrenFor in class AjaxTreeModel
Parameters:
nodeId - The ID of the given node.
Returns:
See Also:
org.olat.core.gui.control.generic.ajax.tree.TreeDataModel#getChildrenFor(java.lang.String)