View Javadoc

1   /*
2    * $Id: IServerDataCapability.java,v 1.18 2011/06/16 09:29:40 jbmeslin Exp $
3    * 
4    */
5   package org.rcfaces.core.component.capability;
6   
7   import java.util.Map;
8   
9   /**
10   * @author Olivier Oeuillot (latest modification by $Author: jbmeslin $)
11   * @version $Revision: 1.18 $ $Date: 2011/06/16 09:29:40 $
12   */
13  public interface IServerDataCapability {
14  
15      /**
16       * Associates and object to a key for the component on the server side
17       * 
18       * @param name
19       *            key used to retrieve the object associated
20       * @param data
21       *            object to associate
22       * @return the object previously associated to teh key (null if none)
23       */
24      Object setServerData(String name, Object data);
25  
26      /**
27       * Removes a key and the data object associated to it
28       * 
29       * @param name
30       *            the key to remove
31       * @return the data object that was associated to the key (null if none)
32       */
33      Object removeServerData(String name);
34  
35      /**
36       * Retrieves an object data associated to a key
37       * 
38       * @param name
39       *            the key to retrieve
40       * @return the data object associated to the key
41       */
42      Object getServerData(String name);
43  
44      /**
45       * Returns a list of the keys defined for the component
46       * 
47       * @return list of keys
48       */
49      String[] listServerDataKeys();
50  
51      /**
52       * Returns the number of keys associated to the component.
53       * 
54       * @return number of keys
55       */
56      int getServerDataCount();
57  
58      /**
59       * Returns a Map object containing keys and associated data objects
60       * 
61       * @return a map
62       */
63      Map getServerDataMap();
64  }