Class ecm.model.FavoritesTreeModel


Extends ecm.model._ModelObject.
Represents a tree that is used to display the favorites hierarchy. This class implements the Dojo dijit.tree.model.
Defined in: <ecm\model\FavoritesTreeModel.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 
Fields borrowed from class ecm.model._ModelObject:
categorization, id, isRecurring, name, nameFilter, pane, status, type, userId

Method Summary

Method Attributes Method Name and Description
 
constructor(rootItem, data)
Constructs the tree.
 
Destroys the model.
 
fetchItemByIdentity(keywordArgs)
Returns the item given the identity of the item.
 
fetchNextPage(pagedResultSet, parentItem, onComplete)
Retrieves the next page of items.
 
getChildren(parentItem, onComplete)
Gets the children of the input parentItem.
 
Returns the input item's id.
 
getLabel(item)
Returns the item's label.
 
Returns the ResultSet ecm.model.ResultSet object for the data.
 
getRoot(onItem)
Returns the root item of the model.
 
isItem(something)
Returns true if an object is an item that can be displayed in the tree.
 
Returns true if the item is permitted to have children.
 
newItem(args, parent, insertIndex)
Creates a new item.
 
onChange(item)
Callback whenever an item has changed, so that Tree can update the label, icon, and so on.
 
onChildrenChange(parent, newChildrenList)
Callback to do notifications about new, updated, or deleted items.
 
This event is triggered when the model completes processing an item.
 
pasteItem(childItem, oldParentItem, newParentItem, bCopy)
Move or copy an item from one parent item to another.
 
reload(callback)
Clears the favorite data model and retrieves the favorite items again.
 
reloadChildren(item, favItem)
Retrieves the children of the favorite item again.
 
replaceChildren(parentItem, results)
Replaces the children with the items in the result set.
 
retrieveChildren(parentItem, onComplete, favoritesItem)
Retrieves the children of a favorite item.
 
setValue(item, attribute, value)
Sets the value of all items that have the same item identity.
Methods borrowed from class ecm.model._ModelObject:
own, refresh, toString

Constructor Detail

ecm.model.FavoritesTreeModel()

Method Detail

constructor(rootItem, data)

Constructs the tree.
Parameters:
rootItem
The folder to use as the root of the tree.
data
The root bookmark folder. Data will be populated with bookmark folder.

destroy()

Destroys the model.

fetchItemByIdentity(keywordArgs)

Returns the item given the identity of the item.
Parameters:
keywordArgs
See `dojo.data.api.Identity` for details on args.

fetchNextPage(pagedResultSet, parentItem, onComplete)

Retrieves the next page of items. When processing is complete, onComplete is called.
Parameters:
pagedResultSet
The item resultSet ecm.model.ResultSet object.
parentItem
The parent item.
onComplete
Callback called when processing is complete.

getChildren(parentItem, onComplete)

Gets the children of the input parentItem.
Parameters:
parentItem
Parent item in which need to retrieve the folder contents.
onComplete
Callback that will be returned an array of children items.

getIdentity(item)

Returns the input item's id.
Parameters:
item
The input item.

getLabel(item)

Returns the item's label.
Parameters:
item
The input item.

getResultSet()

Returns the ResultSet ecm.model.ResultSet object for the data.

getRoot(onItem)

Returns the root item of the model. The root item is returned as a callback parameter.
Parameters:
onItem
A callback function called with the root item.

isItem(something)

Returns true if an object is an item that can be displayed in the tree.
Parameters:
something
Any object.

mayHaveChildren(item)

Returns true if the item is permitted to have children.
Parameters:
item
The input item.

newItem(args, parent, insertIndex)

Creates a new item. See dojo.data.api.Write for details on args.
Parameters:
args
parent
insertIndex

onChange(item)

Callback whenever an item has changed, so that Tree can update the label, icon, and so on. Note that changes to an item's children or parent(s) will trigger an onChildrenChange() so you can ignore those changes here.
Parameters:
item
Item which is changed.

onChildrenChange(parent, newChildrenList)

Callback to do notifications about new, updated, or deleted items.
Parameters:
parent
Parent that changed.
newChildrenList
Array of items.

onProcessingComplete(item)

This event is triggered when the model completes processing an item. It is intended to allow tree widgets to remove display of progress indicators.
Parameters:
item

pasteItem(childItem, oldParentItem, newParentItem, bCopy)

Move or copy an item from one parent item to another. Used in drag-and-drop. If oldParentItem is specified and bCopy is false, childItem is removed from oldParentItem. If newParentItem is specified, childItem is attached to newParentItem.
Parameters:
childItem
oldParentItem
newParentItem
bCopy

reload(callback)

Clears the favorite data model and retrieves the favorite items again.
Parameters:
callback
A callback function called after the favorite items have been retrieved.

reloadChildren(item, favItem)

Retrieves the children of the favorite item again.
Parameters:
item
The input item.
favItem
The favorite item.

replaceChildren(parentItem, results)

Replaces the children with the items in the result set.
Parameters:
parentItem
The parent item.
results
Instance of ecm.model.ResultSet.

retrieveChildren(parentItem, onComplete, favoritesItem)

Retrieves the children of a favorite item.
Parameters:
parentItem
The ecm.model.Item object used to determine the children.
onComplete
A callback function called after the children have been retrieved.
favoritesItem
The favorite item.

setValue(item, attribute, value)

Sets the value of all items that have the same item identity.
Parameters:
item
The input item.
attribute
The item attribute that will get updated with the new value.
value
The new value of the item attribute