Class ecm.model.RepositoryTreeModel


Extends ecm.model._ModelObject.
Represents a tree that that is used to display the hierarchy of repository objects. This class implements the Dojo dijit.tree.model class.
Defined in: <ecm\model\RepositoryTreeModel.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
 
Constructs the tree model.
 
Destroys the model.
 
fetchItemByIdentity(keywordArgs)
This method uses a given identity of an item to return the corresponding item by using the onItem callback.
 
getChildren(parentItem, onComplete)
Gets the child items for the input parentItem.
 
Returns the item's identifier.
 
getLabel(item)
Returns the item's label.
 
getRoot(onItem)
Returns the root item in the callback.
 
isItem(something)
Returns true if the input object is an instance of ecm.model.Repository.
 
Returns true if the item is permitted to have children.
 
newItem(args, parent, insertIndex)
This method is not implemented.
 
onChange(item)
Callback whenever an item has changed, so that Tree can update the label, icon, and so on.
 
onChildrenChange(parent, newChildrenList)
A callback function that is called to send notifications about new, updated, or deleted items.
 
pasteItem(childItem, oldParentItem, newParentItem, bCopy)
Move or copy an item from one parent item to another parent item.
 
Sets the repositories that are used for this model.
Methods borrowed from class ecm.model._ModelObject:
own, refresh, toString

Constructor Detail

ecm.model.RepositoryTreeModel()

Method Detail

constructor()

Constructs the tree model.

destroy()

Destroys the model.

fetchItemByIdentity(keywordArgs)

This method uses a given identity of an item to return the corresponding item by using the onItem callback. Return null if there is no item that uses the given identity. Implementations of this method can sometimes return an item from a local cache and can sometimes fetch an item from a remote server.
Parameters:
keywordArgs

getChildren(parentItem, onComplete)

Gets the child items for the input parentItem.
Parameters:
parentItem
Parent item in which to retrieve the folder contents.
onComplete
Callback function that returns an array of child items.

getIdentity(item)

Returns the item's identifier.
Parameters:
item
A ecm.model._ModelObject or derivation from which to get the id.

{String} getLabel(item)

Returns the item's label.
Parameters:
item
A ecm.model._ModelObject or derivation from which to get the name.
Returns:
{String} String label.

getRoot(onItem)

Returns the root item in the callback.
Parameters:
onItem
Callback in which the root item is returned as a parameter.

{Boolean} isItem(something)

Returns true if the input object is an instance of ecm.model.Repository.
Parameters:
something
An object.
Returns:
{Boolean} If the input object is an instance of ecm.model.Respository, then returns true.

mayHaveChildren(item)

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

newItem(args, parent, insertIndex)

This method is not implemented.
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
A dojo.data.Item.

onChildrenChange(parent, newChildrenList)

A callback function that is called to send notifications about new, updated, or deleted items.
Parameters:
parent
A dojo.data.Item.
newChildrenList
An array of dojo.data.Item objects.

pasteItem(childItem, oldParentItem, newParentItem, bCopy)

Move or copy an item from one parent item to another parent item.
Parameters:
childItem
Child item to paste.
oldParentItem
Child's old parent item.
newParentItem
Child's new parent item.
bCopy
If true, indicates copy. If false, indicates move.

setRepositories()

Sets the repositories that are used for this model.