com.ibm.portal.resolver.webdav.tree
Interface WebdavCopyableTreeModelController<T,M extends Modifiable>

All Superinterfaces:
Committable, Disposable, WebdavTreeModel<T>, WebdavTreeModelController<T,M>

public interface WebdavCopyableTreeModelController<T,M extends Modifiable>
extends WebdavTreeModelController<T,M>

Implemented by tree models that enable copy operations on their resources.

Since:
6.1.5
Note:
This interface is designed to be implemented by clients.

Field Summary
 
Fields inherited from interface com.ibm.portal.resolver.webdav.tree.WebdavTreeModelController
FLAG_COLLECTION, FLAG_FILE
 
Method Summary
 WebdavCopyContext<T> createCopyContext(java.lang.String name, T item, T newParent)
           Creates a CreationContext that identifies a copy operation on a resource.
 
Methods inherited from interface com.ibm.portal.resolver.webdav.tree.WebdavTreeModelController
createCreationContext, getTreeModelController, update
 
Methods inherited from interface com.ibm.portal.resolver.webdav.tree.WebdavTreeModel
createDataSource, getItem, getLocalized, getName, getTreeModel, isCollection
 
Methods inherited from interface com.ibm.portal.Committable
commit, dispose
 

Method Detail

createCopyContext

WebdavCopyContext<T> createCopyContext(java.lang.String name,
                                       T item,
                                       T newParent)

Creates a CreationContext that identifies a copy operation on a resource. This creation context will be passed in to ModelController.create(Class, CreationContext). The resulting object will then be inserted into the target location via TreeModelController.insert(Object, Object, Object).

If item is a collection resource, the copy operation only acts on the collection itself, not on the children of the collection. They will be copied individually and the new copies will be inserted one-by-one.

Parameters:
name - the target name of the item to be created. If this value is null then the copy should have the same name as the source item.
item - the item to be copied, will not be null
newParent - the target parent collection, not null. This information can be used as a hint for the target insert location. In any case the new node will be explicitly inserted as the child of the parent collection after it has been created.
Returns:
a creation context or null