KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > ccm > trace > OpenCCM_Topics


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2003 USTL - LIFL - GOAL
5 Contact: openccm-team@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Jerome Offroy.
23 Contributor(s): ______________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.ccm.trace;
28
29 import java.util.MissingResourceException JavaDoc;
30 import java.util.ResourceBundle JavaDoc;
31
32 public class OpenCCM_Topics {
33
34     /**
35      * name of the bundle of String
36      */

37     private static final String JavaDoc BUNDLE_NAME = "org.objectweb.ccm.trace.topicsBase";
38
39     /**
40      * ResourceBundle containing Reference Topics for
41      */

42     private static final ResourceBundle JavaDoc RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
43
44     
45     /**
46      * getPreTopic coresponding to key
47      * @param key
48      * @return String
49      */

50     public static String JavaDoc getPreTopic(String JavaDoc key) {
51         try {
52             return RESOURCE_BUNDLE.getString(key);
53         } catch (MissingResourceException JavaDoc e) {
54             return '!' + key + '!';
55         }
56     }
57 }
58
Popular Tags