1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
package org.mule.example.stockquote; |
8 | |
|
9 | |
import org.mule.config.i18n.MessageFactory; |
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | 0 | public class LocaleMessage extends MessageFactory |
17 | |
{ |
18 | 0 | private static final LocaleMessage factory = new LocaleMessage(); |
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | |
|
24 | |
private static final String BUNDLE_PATH = "messages.stockquote-example-messages"; |
25 | |
|
26 | |
public static String getStockQuoteMessage(String symbol, String name, String date, String last, |
27 | |
String change, String open, String high, String low, String volume, String previousClose) |
28 | |
{ |
29 | 0 | String[] params = { symbol, name, date, last, change, open, high, |
30 | |
low, volume, previousClose }; |
31 | 0 | return factory.getString(BUNDLE_PATH, 1, params); |
32 | |
} |
33 | |
|
34 | |
@Override |
35 | |
protected ClassLoader getClassLoader() |
36 | |
{ |
37 | 0 | return getClass().getClassLoader(); |
38 | |
} |
39 | |
} |