View Javadoc

1   /*
2    * $Id: IClientDataCapability.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   * A tag used to associate data to a view.
11   * 
12   * @author Olivier Oeuillot (latest modification by $Author: jbmeslin $)
13   * @version $Revision: 1.18 $ $Date: 2011/06/16 09:29:40 $
14   */
15  public interface IClientDataCapability {
16  
17      /**
18       * Associates data to variable name.
19       * 
20       * @param name
21       *            the variable to associate data to
22       * @param data
23       *            the data to associate to the variable
24       * @return the data previously associated with the variable (empty if none)
25       */
26      String setClientData(String name, String data);
27  
28      /**
29       * Removes the variable name and the data associated to it
30       * 
31       * @param name
32       *            the variable to associate data to
33       * @return the data that was associated to the variable
34       */
35      String removeClientData(String name);
36  
37      /**
38       * Retrieves the data associated to a variable
39       * 
40       * @param name
41       *            the variable to associate data to
42       * @return the data associated to the variable
43       */
44      String getClientData(String name);
45  
46      /**
47       * Returns the list of variable associated to the component.
48       * 
49       * @return a list of variables
50       */
51      String[] listClientDataKeys();
52  
53      /**
54       * Returns the number of variable associated to the component.
55       * 
56       * @return number of variable
57       */
58      int getClientDataCount();
59  
60      /**
61       * Returns a map containing the couples variable-data
62       * 
63       * @return a map
64       */
65      Map getClientDataMap();
66  }