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

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

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

Implemented by tree models that allow to rename items. Renaming an item means to modify the information that is returned by WebdavTreeModel.getName(Object). A renaming operation does not modify the position in the tree hierarchy.

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
 void rename(java.lang.String name, M item)
           Modifies the name of the modifiable item, i.e.
 
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

rename

void rename(java.lang.String name,
            M item)
            throws CannotModifyPropertyException

Modifies the name of the modifiable item, i.e. the value that is returned by WebdavTreeModel.getName(Object) on the item. The the rename operation could not be executed successfully, the implementation should throw an exception.

The framework makes sure that an item with the same name as the new target name does not already exist, so implementation do not need to check for this condition.

Parameters:
name - the new name, not null
item - the item to be renamed, not null
Throws:
CannotModifyPropertyException