KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > archie > sync > Synchronizer


1 package org.sapia.archie.sync;
2
3 import org.sapia.archie.Name;
4 import org.sapia.archie.NamePart;
5
6 /**
7  * @author Yanick Duchesne
8  * <dl>
9  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2003 <a HREF="http://www.sapia-oss.org">Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
10  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
11  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
12  * </dl>
13  */

14 public interface Synchronizer {
15   
16   /**
17    * Called by a <code>SynchronizedNode</code> when a value could not be found
18    * for a given name. This method should return the object that corresponds
19    * to the given name, or <code>null</code> if it cannot find an object for
20    * the given name.
21    *
22    * @param nodeAbsolutePath the <code>Name</code> corresponding to the absolute path of the node that
23    * could not find a value for the given name.
24    *
25    * @param valueName the <code>NamePart</code> corresponding to the name of the searched object.
26    * @return the <code>Object</code> corresponding to the given name, or <code>null</code> if
27    * no object could be found for the given name.
28    *
29    * @see org.sapia.archie.Node#getValue(NamePart)
30    *
31    */

32   public Object JavaDoc onGetValue(Name nodeAbsolutePath, NamePart valueName);
33   
34   /**
35    * Called when the <code>putValue()</code> method has been called on the
36    * node that owns this instance.
37    *
38    * @param nodeAbsolutePath the <code>Name</code> corresponding to the absolute path of the node
39    * in which a value was put.
40    *
41    * @param valueName the <code>NamePart</code> corresponding to the name of object that was put
42    * into the node.
43    *
44    * @param obj the <code>Object</code> that was put into the node.
45    *
46    * @see org.sapia.archie.Node#putValue(NamePart, Object, boolean)
47    */

48   public void onPutValue(Name nodeAbsolutePath, NamePart valueName, Object JavaDoc obj, boolean overwrite);
49   
50   /**
51    * Called when the <code>removeValue()</code> method has been called on the
52    * node that owns this instance.
53    *
54    * @param nodeAbsolutePath the <code>Name</code> corresponding to the absolute path of the node
55    * from which a value was removed.
56    *
57    * @param valueName the <code>NamePart</code> corresponding to the name of object that was removed
58    * from the node.
59    *
60    * @see org.sapia.archie.Node#removeValue(NamePart)
61    */

62   public void onRemoveValue(Name nodeAbsolutePath, NamePart valueName);
63 }
64
Popular Tags