com.ibm.commons.iloader.node
Class DataNode

java.lang.Object
  extended by com.ibm.commons.iloader.node.DataNode

public class DataNode
extends java.lang.Object

As the name suggests this class is the primary component in the DataNode framework. This class is responsible for executing commands to modify the underlying model, and for firing notification of the occurance of such events. This class a long with the IClassDef and ILoader interfaces comprise the major parts of the framework.

See Also:
IClassDef, ILoader

Nested Class Summary
static class DataNode.AttributeComparator
          Compares attributes in the model
static class DataNode.Comparator
          A comparator used to compare the attributes in the model
static class DataNode.ComputedField
          An attribute whose values may or may not have a direct bearing on the underlying model.
static interface DataNode.Factory
          A factory object that creates new instances of the supported data type.
static class DataNode.Filter
          Allows the client to filter certain values from the model
protected  class DataNode.MapTable
          Internal attribute table
 
Constructor Summary
DataNode()
          Creates a new instance of this class.
 
Method Summary
 boolean add(java.lang.Object object)
           
 boolean add(java.lang.Object object, DataNodeListener exclude)
           
 void addComputedField(DataNode.ComputedField field)
          Adds a computed field to the DataNode.
 void addDataNodeListener(DataNodeListener listener)
          Add a new listener.
 void addDataNodeUpdaterListener(DataNodeUpdaterListener listener)
          Adds a DataNodeUpdateListener.
 void addDataNodeVetoListener(DataNodeVetoListener listener)
          Add a new veto listener.
 boolean canDelete()
           
 boolean canDelete(int index)
           
 boolean canDeleteAll()
           
 boolean canEdit()
           
 boolean canFirst()
          Check if the data node can be positionned to the first item.
 boolean canInsert()
           
 boolean canInsert(int index)
           
 boolean canLast()
          Check if the data node current record can be set to the last one.
 boolean canNext()
          Check if the data node current record can be set to the next one.
 boolean canPrev()
          Check if the data node current record can be set to the previous one.
 boolean canSetCurrentItem(int index)
          Check if the system can be set to a specific item.
 java.lang.Object createObject()
           
 java.lang.Object createObject(java.lang.String namespaceUri, java.lang.String className)
           
 boolean delete()
           
 boolean delete(int[] indexes, DataNodeListener exclude)
          Delete a list of items in the datanode.
 boolean delete(int index, DataNodeListener exclude)
           
 boolean deleteAll()
           
 boolean deleteAll(DataNodeListener exclude)
          Delete all items in the datanode.
 boolean doCanDeleteAll()
           
protected  boolean doEdit()
           
 boolean edit(IEditor editor)
           
 boolean first()
          Set the new current record to the first one.
 boolean flush(boolean force)
           
 IClassDef getClassDef()
          Returns the IClassDef associated with the current model.
 DataNode.Comparator getComparator()
          Returns an attribute comparator for the data node.
 java.util.ArrayList<DataNode.ComputedField> getComputedFields()
          Returns all of the computed fields associated with this DataNode.
 java.lang.Object getCurrentObject()
          Get the current object.
 int getCurrentRow()
          Get the current item index.
 DataChangeNotifier getDataChangeNotifier()
          Returns the DataChangeNotifer for the current DataNode
 IObjectCollection getDataProvider()
          Returns a direct link to the model that the DataNode is operating on.
 int getDefaultCurrentRow()
          Get the default index when the node is reset.
 DataNode.Factory getFactory()
          Returns the factory associated with the current DataNode, may be null.
 DataNode.Filter getFilter()
          Returns the DataNode filter, may be null.
 ILoader getLoader()
          Returns the ILoader for the current model.
protected  DataNode.MapTable getMapTable()
           
 IMember getMember(java.lang.String name)
          Returns the property (member) with the given name.
 java.util.Iterator<IMember> getMembers()
          Returns all of the properties of the IClassDef plus any extra ComputedFields that have been added to the DataNode via addComputedField(ComputedField).
 java.lang.Object getObject(int index)
          Returns the object at the given index.
 java.lang.Object getObject(java.lang.Object instance, IAttribute attribute)
          Returns an object based on a given attribute and model.
 IObjectCollection getObjectCollection(java.lang.Object instance, ICollection collection)
          Returns an object collection for the given property.
 int getObjectCount()
          Get the number of available items.
 DataNode getParentNode()
          Get the parent node.
 DataNode getRootNode()
          Get the root node.
 java.lang.String getValue(IAttribute attribute)
          Returns the value of the given attribute.
 java.lang.String getValue(int index, IAttribute attribute)
          Returns the value of the requested attribute at the requested index.
 java.lang.String getValue(java.lang.Object instance, IAttribute attribute)
          Returns the value of the given attribute in the provided model.
 IValueCollection getValueCollection(java.lang.Object instance, ICollection collection)
          Returns a value collection for a particular complex property.
protected  void initMapTable()
           
 boolean insert(int index, java.lang.Object object)
           
 boolean insert(int index, java.lang.Object object, DataNodeListener exclude)
           
 boolean isAutoInsert()
          Indicate if the data is in auto insert mode.
 boolean isCurrent(int row)
          Check if a row is the current one.
 boolean isModelModified()
          Check if the current row had been modified.
 boolean isNotifyListeners()
          Indicates if the listeners must be notified of events.
 boolean isReadOnly()
          Indicate if the data is in read-only mode.
 boolean isValidData()
          Check if the current item can be accessed safetly for reading.
 boolean isValidData(int index)
          Check if an item can be accessed safetly for reading.
 boolean isValidMetaData()
          Check if an the datanode has a valid meta data.
 boolean isValidState()
          Returns if the DataNode is in a valid state.
 boolean last()
          Set the new current record to the last one.
 void linkTo(DataNodeBinding parent, java.lang.String propertyName)
          Link to a parent node.
 int logicalToPhysical(int index)
           
 boolean next()
          Set the new current record to the next one.
 boolean notifyCanDelete(int index)
           
 boolean notifyCanDeleteAll()
           
 boolean notifyCanEdit()
           
 boolean notifyCanInsert(int index)
           
 boolean notifyCanSetCurrentItem(int newItem)
           
 boolean notifyCanSetValue(java.lang.String attributeName, java.lang.String value, java.lang.String oldValue)
           
 void notifyCurrentChanged(DataNodeListener exclude)
           
 void notifyInvalidate(DataNodeListener exclude)
           
 void notifyItemInserted(int pos, DataNodeListener exclude)
           
 void notifyItemRemoved(int pos, DataNodeListener exclude)
           
 void notifyMetaDataChanged(DataNodeListener exclude)
           
 void notifyModifiedChanged(DataNodeListener exclude)
           
 void notifyReadOnlyChanged(DataNodeListener exclude)
           
 void notifyUserNotification(java.lang.String key, java.lang.Object param, DataNodeListener exclude)
           
 void notifyValueChanged(int record, java.lang.Object object, IMember member, DataNodeListener exclude)
           
 int physicalToLogical(int index)
           
 boolean prev()
          Set the new current record to the previous one.
 void removeComputedField(DataNode.ComputedField field)
          Removes a computed field from the DataNode.
 void removeDataNodeListener(DataNodeListener listener)
          Remove an existing listener.
 void removeDataNodeUpdaterListener(DataNodeUpdaterListener listener)
          Removes the model listener.
 void removeDataNodeVetoListener(DataNodeVetoListener listener)
          Remove an existing veto listener.
 void resetCurrentRow()
          Notify listeners that the current items have changed.
 void resetData()
          Completely reset the data node.
 void resetRow(int row)
          Notify listeners that a specific row have changed.
 void setAutoInsert(boolean autoInsert)
          Change the autoInsert mode.
 void setClassDef(IClassDef classDef)
          Sets the IClassDef associated with the current DataNode.
 void setComparator(DataNode.Comparator comparator)
          Sets an attribute comparator for the data node.
 boolean setCurrentRow(int newCurrent, DataNodeListener exclude)
          Set the current item index.
 void setDataChangeNotifier(DataChangeNotifier notifier)
          Sets the DataChangeNotifier for the current DataNode.
 void setDataProvider(IObjectCollection dataProvider)
          Sets the data model that the DataNode operates on.
 void setDefaultCurrentItem(int index)
          Set the default static current item.
 void setFactory(DataNode.Factory factory)
          Sets a Factory object to be used in conjunction with this DataNode.
 void setFilter(DataNode.Filter filter)
          Sets a filter on the DataNode.
 void setModelModified(boolean modified)
          Sets the modified flag.
 void setNotifyListeners(boolean notifyListeners)
           
 void setObject(java.lang.Object instance, IAttribute attribute, java.lang.Object value, DataChangeNotifier notifier)
          Sets an object value for a particular property in the model.
 void setReadOnly(boolean readOnly)
          Set the read-only mode.
 boolean setValue(IAttribute attribute, java.lang.String value, DataNodeListener exclude)
          Sets the given value in the given attribute.
 boolean setValue(int index, IAttribute attribute, java.lang.String value, DataNodeListener exclude)
          Sets the value of a given attribute at a given index in the model.
 void setValue(java.lang.Object instance, IAttribute attribute, java.lang.String value, DataChangeNotifier notifier)
          Sets the value of the given attribute, with the given value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataNode

public DataNode()
Creates a new instance of this class.

Method Detail

isReadOnly

public boolean isReadOnly()
Indicate if the data is in read-only mode. A node is in read-only mode if its parent is in read-only mode.

Returns:
true if the DataNode is read-only

setReadOnly

public void setReadOnly(boolean readOnly)
Set the read-only mode. Causes com.ibm.commons.iloader.node.DataNodeListener#onReadOnlyChanged(DataNode) to be fired.

Parameters:
readonly - the read-only mode

isAutoInsert

public boolean isAutoInsert()
Indicate if the data is in auto insert mode.

Returns:
true if the DataNode is in auto insert mode

setAutoInsert

public void setAutoInsert(boolean autoInsert)
Change the autoInsert mode.

Parameters:
autoInsert - the new auto insert mode

isModelModified

public boolean isModelModified()
Check if the current row had been modified. This flag is checked each time a property value change is requested and is reseted when the the modifications are posted or cancelled.

Returns:
true if the row has been modified

setModelModified

public void setModelModified(boolean modified)
Sets the modified flag. A modification notification is sent to all the listeners the first time the modification flag is set, not at each property setting.

Parameters:
modified - the new modified state

getLoader

public ILoader getLoader()
Returns the ILoader for the current model. The ILoader is retrieved from the IClassDef associated with the DataNode. Cannot be null.

Returns:
returns the ILoader associated with this DataNode (data model)

getClassDef

public IClassDef getClassDef()
Returns the IClassDef associated with the current model. The IClassDef is used to describe instances of the model that the DataNode is describing.

Returns:
an IClassDef instance associated with the current DataNode

setClassDef

public void setClassDef(IClassDef classDef)
Sets the IClassDef associated with the current DataNode. This will cause a com.ibm.commons.iloader.node.DataNodeListener.onMetaDataChanged(DataNode) event to be fired.

Parameters:
classDef - the new IClassDef that is to be associated with the DataNode

getMembers

public java.util.Iterator<IMember> getMembers()
Returns all of the properties of the IClassDef plus any extra ComputedFields that have been added to the DataNode via addComputedField(ComputedField).

Returns:
returns an iterator of all properties and computed fields

getMember

public IMember getMember(java.lang.String name)
Returns the property (member) with the given name. May return null.

Parameters:
name - the name of the property being sought
Returns:
returns the IMember corresponding to the provided name

getValue

public java.lang.String getValue(java.lang.Object instance,
                                 IAttribute attribute)
                          throws com.ibm.commons.iloader.node.NodeException
Returns the value of the given attribute in the provided model. In the case of a ComputedField the ComputedField will be queried directly for its value. In the case of all others instances of IAttribute the ILoader is queried for the value of the IAttribute.

Parameters:
instance - the model
attribute - the property whose value is sought
Returns:
returns the value of the given attribute
Throws:
NodeException

setValue

public void setValue(java.lang.Object instance,
                     IAttribute attribute,
                     java.lang.String value,
                     DataChangeNotifier notifier)
              throws com.ibm.commons.iloader.node.NodeException
Sets the value of the given attribute, with the given value. If the attribute provided is a ComputedField then the setValue method of the ComputedField will be called directly. In all other cases the setValue method of the ILoader will be called.

Parameters:
instance - the model
attribute - the attribute that is to be updated
value - the new value to set in the attribute
notifier - the notifier that is to notify listeners of the change
Throws:
NodeException

getObject

public java.lang.Object getObject(java.lang.Object instance,
                                  IAttribute attribute)
                           throws com.ibm.commons.iloader.node.NodeException
Returns an object based on a given attribute and model. Delegates to the ILoader to return the object requested.

Parameters:
instance - the model
attribute - the attributes whose value/object is requested.
Returns:
an object.
Throws:
NodeException

setObject

public void setObject(java.lang.Object instance,
                      IAttribute attribute,
                      java.lang.Object value,
                      DataChangeNotifier notifier)
               throws com.ibm.commons.iloader.node.NodeException
Sets an object value for a particular property in the model. The DataNode delegates to the ILoader to set the object value.

Parameters:
instance - the model
attribute - the property whose object value is to be set
value - the object value to set
notifier - a notifier who will notify listeners of the change.
Throws:
NodeException

getValueCollection

public IValueCollection getValueCollection(java.lang.Object instance,
                                           ICollection collection)
                                    throws com.ibm.commons.iloader.node.NodeException
Returns a value collection for a particular complex property. The DataNode delegates to the ILoader to return the IValueCollection instance for the requested property (ICollection).

Parameters:
instance - the model
collection - the property whose value is sought
Returns:
an instance of IValueCollection
Throws:
NodeException

getObjectCollection

public IObjectCollection getObjectCollection(java.lang.Object instance,
                                             ICollection collection)
                                      throws com.ibm.commons.iloader.node.NodeException
Returns an object collection for the given property. The DataNode delegates to the ILoader to return the IObjectCollection for the given property.

Parameters:
instance - the model
collection - the property whose object value is sought
Returns:
an instance of IObjectCollection for the given property
Throws:
NodeException

getFactory

public DataNode.Factory getFactory()
Returns the factory associated with the current DataNode, may be null.

Returns:
DataNode.Factory instance

setFactory

public void setFactory(DataNode.Factory factory)
Sets a Factory object to be used in conjunction with this DataNode. The Factory can be used in place of a IClassDef as a factory serves the same basic purpose as an IClassDef (to create new objects).

However it should be noted that a DataNode which only has a Factory object as opposed to having an associated IClassDef is very limited in capability. An IClassDef allows the DataNode to modify attributes of the model where as the Factory only allows the DataNode to create new objects in the model.

Parameters:
factory -

addComputedField

public void addComputedField(DataNode.ComputedField field)
Adds a computed field to the DataNode. The ComputedField can be thought of as a client injected property in the model. The computed field is made aware of changes to the model and can act on those changes. Conversely clients can modify the value of the computed field which in turn can update the underlying model.

Parameters:
field - the computed field to be added

getComputedFields

public java.util.ArrayList<DataNode.ComputedField> getComputedFields()
Returns all of the computed fields associated with this DataNode.

Returns:
an ArrayList of ComputedFields

removeComputedField

public void removeComputedField(DataNode.ComputedField field)
Removes a computed field from the DataNode.

Parameters:
field -

getDataProvider

public IObjectCollection getDataProvider()
Returns a direct link to the model that the DataNode is operating on.

Returns:
an instance of IObjectCollection

setDataProvider

public void setDataProvider(IObjectCollection dataProvider)
Sets the data model that the DataNode operates on. com.ibm.commons.iloader.node.DataNode.setClassDef(IClassDef) should be called after calling this method to ensure that the DataNode is propertly initialized.

Parameters:
dataProvider - an object that will provide data to the DataNode

isValidState

public boolean isValidState()
Returns if the DataNode is in a valid state. To be in a valid state getClassDef() must return a non-null value, the resulting IClassDef.getLoader() must return a non-null value and getDataProvider() must return a non-null value.

Returns:
true if all of the above criteria are met

getObjectCount

public int getObjectCount()
Get the number of available items.

Returns:
the number of items in the model

getObject

public java.lang.Object getObject(int index)
Returns the object at the given index.

Parameters:
index - the index of the item being sought
Returns:
the indexed object

getCurrentRow

public int getCurrentRow()
Get the current item index.

Returns:
the current item index, <0 if no item is currently selected.

getCurrentObject

public final java.lang.Object getCurrentObject()
Get the current object.

Returns:
the current object, null the current row < 0

isCurrent

public boolean isCurrent(int row)
Check if a row is the current one.

Parameters:
record - the record number to check
Returns:
true if on current row

getValue

public java.lang.String getValue(int index,
                                 IAttribute attribute)
                          throws com.ibm.commons.iloader.node.NodeException
Returns the value of the requested attribute at the requested index.

Parameters:
index - the desired index
attribute - the attribute to lookup
Returns:
the value of the given attribute
Throws:
NodeException

getValue

public java.lang.String getValue(IAttribute attribute)
                          throws com.ibm.commons.iloader.node.NodeException
Returns the value of the given attribute.

Parameters:
attribute - the attribute to lookup
Returns:
the attribute value
Throws:
NodeException

setValue

public final boolean setValue(int index,
                              IAttribute attribute,
                              java.lang.String value,
                              DataNodeListener exclude)
                       throws com.ibm.commons.iloader.node.NodeException
Sets the value of a given attribute at a given index in the model.

Parameters:
index - the index of the attribute to set
attribute - the attribute to set
value - the value the attribute to
exclude - the DataNodeLister to exclue from the event notification
Returns:
true if the operation succeeded
Throws:
NodeException

setValue

public final boolean setValue(IAttribute attribute,
                              java.lang.String value,
                              DataNodeListener exclude)
                       throws com.ibm.commons.iloader.node.NodeException
Sets the given value in the given attribute.

Parameters:
attribute - the attribute whose value we want to set
value - the new value of the attribute
exclude - a DataNodeListener that should be excluded for the event notificatio
Returns:
true if the operation succeeded
Throws:
NodeException

logicalToPhysical

public final int logicalToPhysical(int index)

physicalToLogical

public final int physicalToLogical(int index)

getFilter

public DataNode.Filter getFilter()
Returns the DataNode filter, may be null.

Returns:

setFilter

public void setFilter(DataNode.Filter filter)
Sets a filter on the DataNode.

Parameters:
filter -

getComparator

public DataNode.Comparator getComparator()
Returns an attribute comparator for the data node.

Returns:

setComparator

public void setComparator(DataNode.Comparator comparator)
Sets an attribute comparator for the data node.


initMapTable

protected void initMapTable()

getMapTable

protected final DataNode.MapTable getMapTable()

getRootNode

public final DataNode getRootNode()
Get the root node. The root node is used to store global information for a complete hiearchy of data node. If the data node is not linked to a parent, then it is considered has a root node. Else, it returns the root node of its parent.

Returns:
the root node

linkTo

public final void linkTo(DataNodeBinding parent,
                         java.lang.String propertyName)
Link to a parent node. The link is done using parent node as well as a property name.


getDataChangeNotifier

public DataChangeNotifier getDataChangeNotifier()
Returns the DataChangeNotifer for the current DataNode

Returns:

setDataChangeNotifier

public void setDataChangeNotifier(DataChangeNotifier notifier)
Sets the DataChangeNotifier for the current DataNode.

Parameters:
notifier -

getParentNode

public DataNode getParentNode()
Get the parent node. The parent node in the hierarchy. It is also used in order to retrieve the root node.

Returns:
the parent node

addDataNodeListener

public void addDataNodeListener(DataNodeListener listener)
Add a new listener. The listener is notified of a MetaDataChanged() in order to bind its data.

Parameters:
listener - the listener to add

removeDataNodeListener

public void removeDataNodeListener(DataNodeListener listener)
Remove an existing listener. The listener is notified of a MetaDataChanged() in order to unbind its data.

Parameters:
listener - the listener to remove

addDataNodeVetoListener

public void addDataNodeVetoListener(DataNodeVetoListener listener)
Add a new veto listener. A veto listener can veto certain events on the DataNode.

Parameters:
listener - the listener to add

removeDataNodeVetoListener

public void removeDataNodeVetoListener(DataNodeVetoListener listener)
Remove an existing veto listener.

Parameters:
listener - the listener to remove

addDataNodeUpdaterListener

public void addDataNodeUpdaterListener(DataNodeUpdaterListener listener)
Adds a DataNodeUpdateListener. The listener is notified before model updates are made.

Parameters:
listener - the listener to add

removeDataNodeUpdaterListener

public void removeDataNodeUpdaterListener(DataNodeUpdaterListener listener)
Removes the model listener.

Parameters:
listener - the listener to remove

setCurrentRow

public boolean setCurrentRow(int newCurrent,
                             DataNodeListener exclude)
                      throws com.ibm.commons.iloader.node.NodeException
Set the current item index. If something is currently edited in the datanode hierarchy, then the system tries to post the modications. If it fails, then nothing further is done.
If the previous operation succeeded, the current item changes. Note that an inherited class may override the doSetCurrentItem() method in order to control the process (upadte some internal state, disallow the change...).
The listeners are notified of the change.

Parameters:
newCurrent - the new logical current index
exclude - a listener that will not be notified of the change
Returns:
true if the operation succeed
Throws:
com.ibm.commons.iloader.node.NodeException

resetData

public void resetData()
Completely reset the data node. Clients are urged to take care before calling this method.


resetRow

public void resetRow(int row)
Notify listeners that a specific row have changed.


resetCurrentRow

public void resetCurrentRow()
Notify listeners that the current items have changed.


getDefaultCurrentRow

public int getDefaultCurrentRow()
Get the default index when the node is reset. Normally, it returns 0 but may be overrided to return another index (last row, current by date...).

Returns:
the default logical index for that node

setDefaultCurrentItem

public void setDefaultCurrentItem(int index)
Set the default static current item.

Parameters:
index - the current item index

canSetCurrentItem

public boolean canSetCurrentItem(int index)
Check if the system can be set to a specific item.

Returns:
true if the system can change the current item

canFirst

public final boolean canFirst()
Check if the data node can be positionned to the first item.

Returns:
true if that operation is available

canPrev

public final boolean canPrev()
Check if the data node current record can be set to the previous one.

Returns:
true if that operation is available

canNext

public final boolean canNext()
Check if the data node current record can be set to the next one.

Returns:
true if that operation is available

canLast

public final boolean canLast()
Check if the data node current record can be set to the last one.

Returns:
true if that operation is available

first

public final boolean first()
                    throws com.ibm.commons.iloader.node.NodeException
Set the new current record to the first one. The data node is set to the first one, if the operation is enabled

Returns:
true if the operation succeed
Throws:
com.ibm.commons.iloader.node.NodeException

prev

public final boolean prev()
                   throws com.ibm.commons.iloader.node.NodeException
Set the new current record to the previous one. The data node is set to the first one, if the operation is enabled

Returns:
true if the operation succeed
Throws:
com.ibm.commons.iloader.node.NodeException

next

public final boolean next()
                   throws com.ibm.commons.iloader.node.NodeException
Set the new current record to the next one. The data node is set to the first one, if the operation is enabled

Returns:
true if the operation succeed
Throws:
com.ibm.commons.iloader.node.NodeException

last

public final boolean last()
                   throws com.ibm.commons.iloader.node.NodeException
Set the new current record to the last one. The data node is set to the first one, if the operation is enabled

Returns:
true if the operation succeed
Throws:
com.ibm.commons.iloader.node.NodeException

flush

public final boolean flush(boolean force)
                    throws com.ibm.commons.iloader.node.NodeException
Throws:
com.ibm.commons.iloader.node.NodeException

canEdit

public final boolean canEdit()

edit

public final boolean edit(IEditor editor)
                   throws com.ibm.commons.iloader.node.NodeException
Throws:
com.ibm.commons.iloader.node.NodeException

doEdit

protected boolean doEdit()

canInsert

public final boolean canInsert(int index)

canInsert

public final boolean canInsert()

insert

public final boolean insert(int index,
                            java.lang.Object object,
                            DataNodeListener exclude)
                     throws com.ibm.commons.iloader.node.NodeException
Throws:
com.ibm.commons.iloader.node.NodeException

insert

public final boolean insert(int index,
                            java.lang.Object object)
                     throws com.ibm.commons.iloader.node.NodeException
Throws:
com.ibm.commons.iloader.node.NodeException

add

public final boolean add(java.lang.Object object,
                         DataNodeListener exclude)
                  throws com.ibm.commons.iloader.node.NodeException
Throws:
com.ibm.commons.iloader.node.NodeException

add

public final boolean add(java.lang.Object object)
                  throws com.ibm.commons.iloader.node.NodeException
Throws:
com.ibm.commons.iloader.node.NodeException

createObject

public final java.lang.Object createObject()
                                    throws com.ibm.commons.iloader.node.NodeException
Throws:
com.ibm.commons.iloader.node.NodeException

createObject

public final java.lang.Object createObject(java.lang.String namespaceUri,
                                           java.lang.String className)
                                    throws com.ibm.commons.iloader.node.NodeException
Throws:
com.ibm.commons.iloader.node.NodeException

canDelete

public final boolean canDelete(int index)

canDelete

public final boolean canDelete()

delete

public final boolean delete(int index,
                            DataNodeListener exclude)
                     throws com.ibm.commons.iloader.node.NodeException
Throws:
com.ibm.commons.iloader.node.NodeException

delete

public final boolean delete()
                     throws com.ibm.commons.iloader.node.NodeException
Throws:
com.ibm.commons.iloader.node.NodeException

canDeleteAll

public final boolean canDeleteAll()

doCanDeleteAll

public boolean doCanDeleteAll()

deleteAll

public boolean deleteAll(DataNodeListener exclude)
                  throws com.ibm.commons.iloader.node.NodeException
Delete all items in the datanode.

Throws:
com.ibm.commons.iloader.node.NodeException

deleteAll

public boolean deleteAll()
                  throws com.ibm.commons.iloader.node.NodeException
Throws:
com.ibm.commons.iloader.node.NodeException

delete

public boolean delete(int[] indexes,
                      DataNodeListener exclude)
               throws com.ibm.commons.iloader.node.NodeException
Delete a list of items in the datanode.

Throws:
com.ibm.commons.iloader.node.NodeException

isValidMetaData

public boolean isValidMetaData()
Check if an the datanode has a valid meta data.


isValidData

public boolean isValidData(int index)
Check if an item can be accessed safetly for reading.


isValidData

public boolean isValidData()
Check if the current item can be accessed safetly for reading.


isNotifyListeners

public boolean isNotifyListeners()
Indicates if the listeners must be notified of events. This allows temporary setting without a change and a flash to all listeners.


setNotifyListeners

public void setNotifyListeners(boolean notifyListeners)

notifyMetaDataChanged

public void notifyMetaDataChanged(DataNodeListener exclude)

notifyModifiedChanged

public void notifyModifiedChanged(DataNodeListener exclude)

notifyReadOnlyChanged

public void notifyReadOnlyChanged(DataNodeListener exclude)

notifyInvalidate

public void notifyInvalidate(DataNodeListener exclude)

notifyCurrentChanged

public void notifyCurrentChanged(DataNodeListener exclude)

notifyValueChanged

public void notifyValueChanged(int record,
                               java.lang.Object object,
                               IMember member,
                               DataNodeListener exclude)

notifyItemInserted

public void notifyItemInserted(int pos,
                               DataNodeListener exclude)

notifyItemRemoved

public void notifyItemRemoved(int pos,
                              DataNodeListener exclude)

notifyUserNotification

public void notifyUserNotification(java.lang.String key,
                                   java.lang.Object param,
                                   DataNodeListener exclude)

notifyCanSetCurrentItem

public boolean notifyCanSetCurrentItem(int newItem)

notifyCanSetValue

public boolean notifyCanSetValue(java.lang.String attributeName,
                                 java.lang.String value,
                                 java.lang.String oldValue)

notifyCanEdit

public boolean notifyCanEdit()

notifyCanInsert

public boolean notifyCanInsert(int index)

notifyCanDelete

public boolean notifyCanDelete(int index)

notifyCanDeleteAll

public boolean notifyCanDeleteAll()