01: /*
02: * Created on May 29, 2006
03: */
04: package uk.org.ponder.rsac;
05:
06: import java.util.Locale;
07:
08: import uk.org.ponder.localeutil.LocaleGetter;
09:
10: /** Yet another final, interfaceless class in the JDK! This class bridges
11: * Locales from request-scope. **/
12:
13: public class RSACLocaleBridge implements LocaleGetter {
14:
15: private RSACBeanLocator rsacbl;
16: private String targetbean;
17:
18: public void setRSACBeanLocator(RSACBeanLocator rsacbl) {
19: this .rsacbl = rsacbl;
20: }
21:
22: public void setTargetBeanName(String targetbean) {
23: this .targetbean = targetbean;
24: }
25:
26: public Locale get() {
27: Locale value = (Locale) rsacbl.getBeanLocator().locateBean(
28: targetbean);
29: return value;
30: }
31: }
|