1 /*
2 * $Id: LocaleMessage.java 8023 2007-08-23 07:40:46Z dirk.olmes $
3 * --------------------------------------------------------------------------------------
4 * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.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.samples.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 public class LocaleMessage extends MessageFactory
21 {
22 private static final String BUNDLE_PATH = "messages.hello-example-messages";
23
24 public static String getGreetingPart2()
25 {
26 return getString(BUNDLE_PATH, 1);
27 }
28
29 public static String getGreetingPart1()
30 {
31 return getString(BUNDLE_PATH, 2);
32 }
33
34 public static String getPrompt()
35 {
36 return getString(BUNDLE_PATH, 3);
37 }
38
39 public static String getInvalidUserNameError()
40 {
41 return getString(BUNDLE_PATH, 4);
42 }
43 }