View Javadoc
1   /* 
2    * Created on Jun 19, 2004
3    * 
4    * This library is free software; you can redistribute it and/or
5    * modify it under the terms of the GNU Lesser General Public
6    * License as published by the Free Software Foundation; either
7    * version 2.1 of the License, or (at your option) any later version.
8    * 
9    * This library is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12   * Lesser General Public License for more details.
13   * 
14   * Full GNU LGPL license terms : http://www.gnu.org/copyleft/lesser.txt
15   * 
16   * Project : iky-container
17   * Package : net.wmind.commons
18   * Author : mchaplin@users.sourceforge.net
19   */
20  package net.mchaplin.commons.i18n;
21  
22  import java.util.Map;
23  import java.util.ResourceBundle;
24  
25  /***
26   * @author mchaplin@users.sourceforge.net
27   * 
28   * $Header: 
29   * $Revision: 
30   * $Date:
31   *
32   */
33  public interface PropertyResourceHelperI {
34      
35      String getMessage(String key);
36  
37      /***
38       * Retrieve a message in a properties file according to
39       * the given key
40       * 
41       * @param propsFile name of the property file to load message from
42       * @param key name of the key identifying the message
43       * @return message identified by key or ""
44       */
45      String getMessage(String propsFile, String key);
46  
47      /***
48       * Retrieve a message in a properties file according to
49       * the given key & locale
50       * 
51       * @param propsFile name of the property file to load message from
52       * @param key name of the key identifying the message
53       * @param locale ISO-639 locale to use
54       * @return message identified by key or ""
55       */
56      String getMessage(String propsFile, String key, String locale);
57  
58      Map<String, ResourceBundle> getMessageResources();
59  
60      /***
61       * For container use
62       * 
63       * @see net.mchaplin.ioc.component.ComponentI#reset()
64       */
65      void reset();
66  }