org.sapia.archie.sync
Interface Synchronizer

All Known Implementing Classes:
SynchronizerAdapter

public interface Synchronizer

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2003 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site

Method Summary
 java.lang.Object onGetValue(Name nodeAbsolutePath, NamePart valueName)
          Called by a SynchronizedNode when a value could not be found for a given name.
 void onPutValue(Name nodeAbsolutePath, NamePart valueName, java.lang.Object obj, boolean overwrite)
          Called when the putValue() method has been called on the node that owns this instance.
 void onRemoveValue(Name nodeAbsolutePath, NamePart valueName)
          Called when the removeValue() method has been called on the node that owns this instance.
 

Method Detail

onGetValue

java.lang.Object onGetValue(Name nodeAbsolutePath,
                            NamePart valueName)
Called by a SynchronizedNode when a value could not be found for a given name. This method should return the object that corresponds to the given name, or null if it cannot find an object for the given name.

Parameters:
nodeAbsolutePath - the Name corresponding to the absolute path of the node that could not find a value for the given name.
valueName - the NamePart corresponding to the name of the searched object.
Returns:
the Object corresponding to the given name, or null if no object could be found for the given name.
See Also:
Node.getValue(NamePart)

onPutValue

void onPutValue(Name nodeAbsolutePath,
                NamePart valueName,
                java.lang.Object obj,
                boolean overwrite)
Called when the putValue() method has been called on the node that owns this instance.

Parameters:
nodeAbsolutePath - the Name corresponding to the absolute path of the node in which a value was put.
valueName - the NamePart corresponding to the name of object that was put into the node.
obj - the Object that was put into the node.
See Also:
Node.putValue(NamePart, Object, boolean)

onRemoveValue

void onRemoveValue(Name nodeAbsolutePath,
                   NamePart valueName)
Called when the removeValue() method has been called on the node that owns this instance.

Parameters:
nodeAbsolutePath - the Name corresponding to the absolute path of the node from which a value was removed.
valueName - the NamePart corresponding to the name of object that was removed from the node.
See Also:
Node.removeValue(NamePart)


Copyright © 2010 Sapia OSS. All Rights Reserved.