Home | History | Annotate | Download | only in rss
      1 /*******************************************************************************
      2  * Copyright (c) 2005, 2006 IBM Corporation and others.
      3  * All rights reserved. This program and the accompanying materials
      4  * are made available under the terms of the Eclipse Public License v1.0
      5  * which accompanies this distribution, and is available at
      6  * http://www.eclipse.org/legal/epl-v10.html
      7  *
      8  * Contributors:
      9  *   IBM - Initial API and implementation
     10  *
     11  * </copyright>
     12  *
     13  * $Id: Messages.java,v 1.2 2006/09/19 15:53:51 kmoir Exp $
     14  * /
     15  *******************************************************************************/
     16 package org.eclipse.releng.util.rss;
     17 
     18 
     19 import java.util.MissingResourceException;
     20 import java.util.ResourceBundle;
     21 
     22 
     23 public class Messages
     24 {
     25   private static final String BUNDLE_NAME = "org.eclipse.releng.util.rss.messages"; //$NON-NLS-1$
     26 
     27   private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
     28 
     29   private Messages()
     30   {
     31   }
     32 
     33   public static String getString(String key)
     34   {
     35     try
     36     {
     37       return RESOURCE_BUNDLE.getString(key);
     38     }
     39     catch (MissingResourceException e)
     40     {
     41       return '!' + key + '!';
     42     }
     43   }
     44 }
     45