ilog.ds
Interface IlTreeDataSourceEditor

All Superinterfaces:
IlDataSourceEditor
All Known Implementing Classes:
IlsTreeDataSource

public interface IlTreeDataSourceEditor
extends IlDataSourceEditor

Tree data source editor interface Provides methods to request a tree data source to update its back-end. This class is a companion to IlTreeDataSource. The execution of all the methods prefixed with ds may be asynchronous and, therefore, may not be immediately reflected in the local model. Each method has a version that takes an AsyncInvocationListener. Use this to track the progress of the asynchronous method call.

See Also:
IlTreeDataSource

Method Summary
abstract  Object dsAddItem(Object parent, Map properties)
          Creates a new item in the tree.
abstract  void dsMoveItem(Object item, Object newParent)
          Moves an existing item to a new position in the tree.
abstract  void dsRemoveItem(Object item)
          Removes an item from the tree.
abstract  void dsUpdateItem(Object item, String propertyName, Object propertyValue)
          Updates a property of a tree item.
abstract  boolean isItemEditable(Object obj)
          Checks whether the item is editable or not.
 
Methods inherited from interface ilog.ds.IlDataSourceEditor
dsEndBatch, dsStartBatch, dsUpdateProperty, getDSBatchLevel, isEditable
 

Method Detail

isItemEditable

public boolean isItemEditable(Object obj)
Checks whether the item is editable or not.
Parameters:
obj - The item to test.
Returns:
false if the item is not editable.

dsAddItem

public Object dsAddItem(Object parent,
                        Map properties)
Creates a new item in the tree.
Parameters:
parent - item The owner of the new item. Cannot be null.
properties - The properties of the node to create
Returns:
The created item (to be used only as a key). Note that this method may return null if the item takes a long time to be created.

dsRemoveItem

public void dsRemoveItem(Object item)
Removes an item from the tree.
Parameters:
item - The item to be removed

dsMoveItem

public void dsMoveItem(Object item,
                       Object newParent)
Moves an existing item to a new position in the tree.
Parameters:
item - The item to move
newParent - The new parent item. Cannot be null.

dsUpdateItem

public void dsUpdateItem(Object item,
                         String propertyName,
                         Object propertyValue)
Updates a property of a tree item.
Parameters:
item - The item to update
propertyName - The name of the property to be updated
propertyValue - The new value of the property