Class ecm.model.FolderTreeModel
Extends
ecm.model._ModelObject.
Represents a tree that is used to display the folder hierarchy in a repository. This class implements the
Dojo dijit.tree.model class.
Defined in: <ecm\model\FolderTreeModel.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
Field Summary
Field Attributes | Field Name and Description |
---|---|
Used when
isFirstNodeasTeamspaces is true. |
|
When true, indicates this FolderTreeModel is search in teamspaces.
|
|
Used when
isFirstNodeasTeamspaces is true. |
|
An teamspace id of a node to filter from the list of teamspaces.
|
|
Used when
isFirstNodeasTeamspaces and isShowThisTeamspace are true. |
- Fields borrowed from class ecm.model._ModelObject:
- categorization, id, isRecurring, name, nameFilter, pane, status, type, userId
Method Summary
Method Attributes | Method Name and Description |
---|---|
applyFilter(filter, callback:)
Sets the filter and reloads the root.
|
|
constructor(rootItem, showFoldersOnly, isFirstNodeasTeamspaces, isShowThisTeamspace, thisTeamspacename, filterType)
Constructs the tree.
|
|
destroy()
Cleans up.
|
|
fetchItemByIdentity(keywordArgs)
|
|
fetchNextPage(pagedResultSet, parentItem, onComplete)
Retrieves the next page.
|
|
getChildren(parentItem, onComplete)
Get the child for the input parentItem.
|
|
getIdentity(item)
Returns the input item's id.
|
|
getLabel(item)
Returns the item's label.
|
|
getRoot(onItem)
Returns the root item in the callback.
|
|
getTeamspacesItem(parentItem, onComplete)
Gets the teamspace items for the input parentItem.
|
|
isItem(something)
Returns true if the input is instance of ecm.model.Item.
|
|
isLoaded(item)
Returns true if the item is loaded.
|
|
mayHaveChildren(item)
Returns true if the input item is a folder.
|
|
newItem(args, parent)
Creates a new item.
|
|
onChange(item)
Callback whenever an item has changed, so that Tree can update the label, icon, etc.
|
|
onChildrenChange(parent, newChildrenList)
Callback to do notifications about new, updated, or deleted items.
|
|
onChildrenChangeForMove(parent, newChildrenList)
|
|
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.
|
|
reload(parent)
Unloads and retrieves the parent folder.
|
|
replaceChildren(parentItem, resultSet)
Replace the children with the items in the result set.
|
|
searchAllTeamspaces(filter, callback:)
Retreives teamspaces passing filter criteria to the server to be used in the query.
|
- Methods borrowed from class ecm.model._ModelObject:
- own, refresh, toString
Field Detail
filter
Used when
isFirstNodeasTeamspaces
is true. Used to filter teamspaces in the search in
teamspaces. This value is set in the applyFilter
method.
isFirstNodeasTeamspaces
When true, indicates this FolderTreeModel is search in teamspaces.
isShowThisTeamspace
Used when
isFirstNodeasTeamspaces
is true. If true, create
"This teamspace"node as the first item in the list when getting list of teamspaces. Used when getting children from the teamspace builder's > new search > search in dropdown.
rootItemToFilter
An teamspace id of a node to filter from the list of teamspaces.
thisTeamspaceName
Used when
isFirstNodeasTeamspaces
and isShowThisTeamspace are true. This value
is used for the PathName in this teamspace node.
Method Detail
applyFilter(filter, callback:)
Sets the filter and reloads the root. The filter is by getTeamspacesItem method.
- Parameters:
- filter
- Filter data.
- callback:
- Function called when filtering complete with information about the number of filtered teamspaces and whether there are more results available on the server.
constructor(rootItem, showFoldersOnly, isFirstNodeasTeamspaces, isShowThisTeamspace, thisTeamspacename, filterType)
Constructs the tree.
- Parameters:
- rootItem
- The folder to use as the root of the tree.
- showFoldersOnly
- If true, only folders display in the tree. If false, both folders and non-folders display.
- isFirstNodeasTeamspaces
- If true, indicates search in teamspaces.
- isShowThisTeamspace
- If true and isFirstNodeasTeamspaces is true, create
"This teamspace"
node when getting teamspace children. - thisTeamspacename
- If isShowThisTeamspace and isFirstNodeasTeamspaces are true, this value used in the PathName in the this teamspace node.
- filterType
- Filters the items displayed on the tree (supersedes showFoldersOnly). Used when getting children for an item.
destroy()
Cleans up.
fetchItemByIdentity(keywordArgs)
- Parameters:
- keywordArgs
fetchNextPage(pagedResultSet, parentItem, onComplete)
Retrieves the next page. When processing is complete, onComplete is called.
- Parameters:
- pagedResultSet
- Instance of ecm.model.ResultSet.
- parentItem
- The parent item.
- onComplete
- Callback called when processing is complete.
getChildren(parentItem, onComplete)
Get the child for the input parentItem. This will either get the teamspace items or it will retrieve the
folder contents 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
- Item in which to get the id.
- Returns:
- String id.
getLabel(item)
Returns the item's label.
- Parameters:
- item
- Item in which to get the label.
- Returns:
- String label.
getRoot(onItem)
Returns the root item in the callback.
- Parameters:
- onItem
- Callback in which the root item is returned as a parameter.
getTeamspacesItem(parentItem, onComplete)
Gets the teamspace items for the input parentItem. If
this.isShowThisTeamspace
is true, then
add
"This teamspace"to the top of the list.
- Parameters:
- parentItem
- Parent item in which need to retrieve the contents.
- onComplete
- Callback that will be called and will be passed the array of teamspace items.
isItem(something)
Returns true if the input is instance of ecm.model.Item.
- Parameters:
- something
- If something is instanceof ecm.model.Item, then return true.
- Returns:
- Boolean indicating if this is an item.
isLoaded(item)
Returns true if the item is loaded.
- Parameters:
- item
- Input item.
- Returns:
- Boolean indicating if the item is loaded.
mayHaveChildren(item)
Returns true if the input item is a folder.
- Parameters:
- item
- Item to check if it is a folder
- Returns:
- Boolean indicating if the item is a folder.
newItem(args, parent)
Creates a new item.
- Parameters:
- args
- Information about the item to add.
- parent
- Parent item to add the new item.
onChange(item)
Callback whenever an item has changed, so that Tree can update the label, icon, etc. 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.
onChildrenChangeForMove(parent, newChildrenList)
- Parameters:
- parent
- newChildrenList
onProcessingComplete(item)
This event is triggered when the model completes processing an item. It is intended to allow tree dijits 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 is intended to allow tree dijits 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. Used in drag & 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
- 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.
reload(parent)
Unloads and retrieves the parent folder.
- Parameters:
- parent
- Parent item to unload and reload.
replaceChildren(parentItem, resultSet)
Replace the children with the items in the result set.
- Parameters:
- parentItem
- The parent item.
- resultSet
- Instance of ecm.model.ResultSet.
searchAllTeamspaces(filter, callback:)
Retreives teamspaces passing filter criteria to the server to be used in the query.
- Parameters:
- filter
- Filter data.
- callback:
- Function called when filtering complete.