Class ecm.model.Dnd

Provides common methods for checking drag and drop capabilities and dropping.
Defined in: <ecm\model\Dnd.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 

Method Summary

Method Attributes Method Name and Description
 
Displays error dialog indicating no privilege to add to the folder with the input name.
 
canDrop(sourceItems, targetItem, isCopy, rootItem)
Checks if the sourceItems can be dropped on the targetItem.
 
dropCopy(sourceItems, targetItem)
When the source items have been dropped on the target item for "copy", this method adds the source items to the target.
 
dropMove(sourceItems, targetItem, currentParentItem)
When the source items have been dropped on the target item for "move", this method moves the source items to the target.
 
Checks if there are privileges to copy the input item.
 
Checks if there are privileges to move the input item.
 
Checks if there are privileges to add folders to the input folder item.
 
hasPrivilegeToAddItemsToFolder(targetItem, isDraggingDocuments, isDraggingFolders)
Checks privileges.
 
hasPrivilegeToAddTo(targetItem)
Checks if there are privileges to add items to the input folder item.
 
hasPrivilegeToRemoveFrom(currentParentItem)
Checks if there are privileges to remove the input item.

Constructor Detail

ecm.model.Dnd()

Method Detail

addCannotDropErrorMessage(name)

Displays error dialog indicating no privilege to add to the folder with the input name.
Parameters:
name
String indicating the folder that cannot be added to.

canDrop(sourceItems, targetItem, isCopy, rootItem)

Checks if the sourceItems can be dropped on the targetItem.
Parameters:
sourceItems
Array of ecm.model.Item or ecm.model.Favorite.
targetItem
Instance of ecm.model.Item or ecm.model.Favorite.
isCopy
Boolean indicating if copy or move.
rootItem
Optional parameter indicating the root item of the tree.
Returns:
Boolean indicating if the source items can be dropped on the target item.

dropCopy(sourceItems, targetItem)

When the source items have been dropped on the target item for "copy", this method adds the source items to the target.
Parameters:
sourceItems
Array of ecm.model.Item or ecm.model.Favorite.
targetItem
Instance of ecm.model.Item or ecm.model.Favorite.

dropMove(sourceItems, targetItem, currentParentItem)

When the source items have been dropped on the target item for "move", this method moves the source items to the target.
Parameters:
sourceItems
Array of ecm.model.Item or ecm.model.Favorite.
targetItem
Instance of ecm.model.Item or ecm.model.Favorite.
currentParentItem
Instance of ecm.model.Item or ecm.model.Favorite. Optional parameter specifying the parent of all the source items.

hasPrivilegeCopyToFolder(sourceItem)

Checks if there are privileges to copy the input item.
Parameters:
sourceItem
Instance of ecm.model.Item or ecm.model.Favorite.
Since:
2.0.3.5
Returns:
Boolean indicating if have privileges to copy the input item.

hasPrivilegeMoveToFolder(sourceItem)

Checks if there are privileges to move the input item.
Parameters:
sourceItem
Instance of ecm.model.Item or ecm.model.Favorite.
Since:
2.0.3.5
Returns:
Boolean indicating if have privileges to move the input item.

hasPrivilegeToAddFolderTo(targetItem)

Checks if there are privileges to add folders to the input folder item.
Parameters:
targetItem
Instance of ecm.model.Item or ecm.model.Favorite.
Since:
2.0.3.4
Returns:
Boolean indicating if have privileges to add to the target item.

hasPrivilegeToAddItemsToFolder(targetItem, isDraggingDocuments, isDraggingFolders)

Checks privileges.
Parameters:
targetItem
Instance of ecm.model.Item or ecm.model.Favorite.
isDraggingDocuments
Boolean indicating if dragging documents.
isDraggingFolders
Boolean indicating if dragging folders.
Since:
2.0.3.4
Returns:
Boolean indicating if have privileges to add to the target item.

hasPrivilegeToAddTo(targetItem)

Checks if there are privileges to add items to the input folder item.
Parameters:
targetItem
Instance of ecm.model.Item or ecm.model.Favorite.
Returns:
Boolean indicating if have privileges to add to the target item.

hasPrivilegeToRemoveFrom(currentParentItem)

Checks if there are privileges to remove the input item.
Parameters:
currentParentItem
Instance of ecm.model.Item or ecm.model.Favorite.
Returns:
Boolean indicating if have privileges to remove from the input item.