Class ecm.model.WorklistsTreeModel
Extends
ecm.model._ModelObject.
Represents a tree that is used to display the work list hierarchy in a repository. This class implements
the Dojo dijit.tree.model
class.
Defined in: <ecm\model\WorklistsTreeModel.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 and creates a root node of type ecm.model._ModelObject.
|
|
destroy()
Cleans up.
|
|
fetchItemByIdentity(keywordArgs)
This method uses a given identity of an item to return the corresponding item by using the
onItem callback. |
|
getChildren(parentItem, onComplete)
Get the child objects for the input
parentItem parameter. |
|
getIdentity(item)
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 item is an instance of ecm.model.Worklist,
ecm.model.ProcessApplicationSpace, ecm.model.ProcessRole or
ecm.model.ProcessInbasket. |
|
mayHaveChildren(item)
Returns
true if the input item can have children. |
|
newItem(args, parent, insertIndex)
Creates a new item.
|
|
onChange(item)
A callback function that is called 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.
|
|
onProcessingComplete(item)
This event is triggered when the model completes processing an item.
|
|
onProcessingStarted(item)
This event is triggered when the model begins processing an item.
|
|
pasteItem(childItem, oldParentItem, newParentItem, bCopy)
Move or copy an item from one parent item to another parent item.
|
|
setRepository(repository)
Set the current repository object.
|
- Methods borrowed from class ecm.model._ModelObject:
- getSortCriteria, own, refresh, toString
Method Detail
constructor()
Constructs the tree and creates a root node of type ecm.model._ModelObject.
destroy()
Cleans up.
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)
Get the child objects for the input
parentItem
parameter.
- Parameters:
- parentItem
- Parent item in which to retrieve the child contents.
- onComplete
- A callback function that returns an array of children items as a parameter.
{String} getIdentity(item)
Returns the item's identifier.
- Parameters:
- item
- A ecm.model._ModelObject or derivation from which to get the id.
- Returns:
- {String} String 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
- A callback function in which the root item is returned as a parameter.
{Boolean} isItem(something)
Returns
true
if the item is an instance of ecm.model.Worklist,
ecm.model.ProcessApplicationSpace, ecm.model.ProcessRole or
ecm.model.ProcessInbasket.
- Parameters:
- something
- An object to test for being a recognized item supported by this tree model.
- Returns:
- {Boolean} A value of
true
if the item is recognized,false
otherwise.
{Boolean} mayHaveChildren(item)
Returns
true
if the input item can have children.
- Parameters:
- item
- A ecm.model.Worklist or derivation of Worklist that will be checked for its ability to contain child items.
- Returns:
- {Boolean} A value of
true
if the item can have children,false
otherwise.
newItem(args, parent, insertIndex)
Creates a new item.
- Parameters:
- args
- Information about the item to add.
- parent
- Parent item to add the new item.
- insertIndex
onChange(item)
A callback function that is called whenever an item has changed, so that
Tree
can update the
label, icon, and so on. Note: Changes to an item's children or parent(s) will trigger an
onChildrenChange()
event, so you can ignore those changes here.
- Parameters:
- item
- Item that is changed.
onChildrenChange(parent, newChildrenList)
A callback function that is called to send 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 allows tree widgets to remove display
of progress indicators.
- Parameters:
- item
- Item to which processing is completed.
onProcessingStarted(item)
This event is triggered when the model begins processing an item. It allows tree widgets to display a
progress indicator next to the node for the item.
- Parameters:
- item
- Item to which processing is started.
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. Iffalse
, indicates move.
setRepository(repository)
Set the current repository object.
- Parameters:
- repository
- A ecm.model.Repository object to set.