1 4 package com.tc; 5 6 import org.dijon.DictionaryResource; 7 8 import com.tc.util.ResourceBundleHelper; 9 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 } 51 | Popular Tags |