Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
LocaleMessage |
|
| 1.0;1 |
1 | /* | |
2 | * $Id: LocaleMessage.java 19191 2010-08-25 21:05:23Z tcarlson $ | |
3 | * -------------------------------------------------------------------------------------- | |
4 | * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com | |
5 | * | |
6 | * The software in this package is published under the terms of the CPAL v1.0 | |
7 | * license, a copy of which has been included with this distribution in the | |
8 | * LICENSE.txt file. | |
9 | */ | |
10 | ||
11 | package org.mule.example.hello; | |
12 | ||
13 | import org.mule.config.i18n.MessageFactory; | |
14 | ||
15 | /** | |
16 | * <code>LocaleMessage</code> is a convenience interface for retrieving | |
17 | * internationalised strings from resource bundles. The actual work is done by | |
18 | * the MessageFactory in core. | |
19 | */ | |
20 | 0 | public class LocaleMessage extends MessageFactory |
21 | { | |
22 | 0 | private static final LocaleMessage factory = new LocaleMessage(); |
23 | ||
24 | private static final String BUNDLE_PATH = "messages.hello-example-messages"; | |
25 | ||
26 | public static String getGreetingPart2() | |
27 | { | |
28 | 0 | return factory.getString(BUNDLE_PATH, 1); |
29 | } | |
30 | ||
31 | public static String getGreetingPart1() | |
32 | { | |
33 | 0 | return factory.getString(BUNDLE_PATH, 2); |
34 | } | |
35 | ||
36 | public static String getPrompt() | |
37 | { | |
38 | 0 | return factory.getString(BUNDLE_PATH, 3); |
39 | } | |
40 | ||
41 | public static String getInvalidUserNameError() | |
42 | { | |
43 | 0 | return factory.getString(BUNDLE_PATH, 4); |
44 | } | |
45 | } |