KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > api > cintoo > messages > context > ContextMap


1 package api.cintoo.messages.context;
2
3 /**
4  * Store mappings from contexts to bundle names.
5  *
6  * @author Stephan J. Schmidt
7  * @version $id$
8  * @since 1.0
9  */

10 public interface ContextMap {
11   /**
12    * Store a mapping from a context to a bundle name in the map
13    *
14    * @param context context to store
15    * @param bundleName bundle name to store
16    */

17   public void put(Context context, String JavaDoc bundleName);
18
19   /**
20    * Get the bundle name for a context
21    *
22    * @param context context to get bundle name for
23    * @return bundle name for the given context
24    */

25   public String JavaDoc get(Context context);
26
27   /**
28    * Find the child context for a given context.
29    * Contexts can be organized hierarchically and
30    * then possess child and parent contexts.
31    *
32    * @param context context to get the chuld context for
33    * @return child context for the given context
34    */

35   public Context findChildContext(Context context);
36
37   /**
38    * Find the parent context for a given context.
39    * Contexts can be organized hierarchically and
40    * then possess child and parent contexts.
41    *
42    * @param context context to get the parent context for
43    * @return parent context for the given context
44    */

45   public Context findParentContext(Context context);
46
47   /**
48    * Find the closest matching context for a given context.
49    *
50    * @param context Context for which a matching context should be found
51    * @return closes matching context
52    */

53   public Context findMatchingContext(Context context);
54
55   /**
56    * Clear all stored mappings
57    */

58   public void clear();
59 }
60
Popular Tags