01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc;
05:
06: import org.dijon.DictionaryResource;
07:
08: import com.tc.util.ResourceBundleHelper;
09:
10: import java.util.prefs.Preferences;
11:
12: public class SessionIntegratorContext {
13: public SessionIntegrator client;
14: public SessionIntegratorFrame frame;
15: public ResourceBundleHelper bundleHelper;
16: public DictionaryResource topRes;
17: public Preferences prefs;
18:
19: public String getMessage(String id) {
20: return getString(id);
21: }
22:
23: public String getString(String id) {
24: return bundleHelper.getString(id);
25: }
26:
27: public String[] getMessages(String[] ids) {
28: String[] result = null;
29:
30: if (ids != null && ids.length > 0) {
31: int count = ids.length;
32:
33: result = new String[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 getObject(String id) {
44: return bundleHelper.getObject(id);
45: }
46:
47: public void toConsole(String msg) {
48: client.toConsole(msg);
49: }
50: }
|