01: package org.osbl.client.wings.shell;
02:
03: import org.osbl.client.ClientResourceProvider;
04: import org.conform.format.ResourceProvider;
05: import org.wings.session.SessionManager;
06:
07: import java.util.List;
08: import java.util.Locale;
09:
10: public class WingsClientResourceProvider implements
11: ClientResourceProvider {
12: ResourceProvider delegate;
13:
14: public void setDelegate(ResourceProvider delegate) {
15: this .delegate = delegate;
16: }
17:
18: /**
19: * Resolves a message code with optional arguments.
20:
21: * @param code The message code of the label.
22: * @param args The optional message arguments.
23: * @return A localized message.
24: */
25: public String getMessage(String code, Object... args) {
26: return delegate.getMessage(SessionManager.getSession()
27: .getLocale(), code, args);
28: }
29:
30: public String getMessage(Locale locale, String code, Object... args) {
31: return delegate.getMessage(locale, code, args);
32: }
33:
34: public List<Locale> getSupportedLocales() {
35: return delegate.getSupportedLocales();
36: }
37: }
|