KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > SessionIntegratorContext


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc;
5
6 import org.dijon.DictionaryResource;
7
8 import com.tc.util.ResourceBundleHelper;
9
10 import java.util.prefs.Preferences JavaDoc;
11
12 public class SessionIntegratorContext {
13   public SessionIntegrator client;
14   public SessionIntegratorFrame frame;
15   public ResourceBundleHelper bundleHelper;
16   public DictionaryResource topRes;
17   public Preferences JavaDoc prefs;
18
19   public String JavaDoc getMessage(String JavaDoc id) {
20     return getString(id);
21   }
22
23   public String JavaDoc getString(String JavaDoc id) {
24     return bundleHelper.getString(id);
25   }
26   
27   public String JavaDoc[] getMessages(String JavaDoc[] ids) {
28     String JavaDoc[] result = null;
29
30     if(ids != null && ids.length > 0) {
31       int count = ids.length;
32
33       result = new String JavaDoc[count];
34
35       for(int i = 0; i < count; i++) {
36         result[i] = getMessage(ids[i]);
37       }
38     }
39
40     return result;
41   }
42
43   public Object JavaDoc getObject(String JavaDoc id) {
44     return bundleHelper.getObject(id);
45   }
46
47   public void toConsole(String JavaDoc msg) {
48     client.toConsole(msg);
49   }
50 }
51
Popular Tags