1 20 21 package org.apache.directory.ldapstudio; 22 23 24 import java.util.MissingResourceException ; 25 import java.util.ResourceBundle ; 26 27 import org.apache.log4j.Logger; 28 29 30 36 public class Messages 37 { 38 private static Logger logger = Logger.getLogger( Messages.class ); 40 41 private static final String BUNDLE_NAME = "org.apache.directory.ldapstudio.messages"; 43 private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME ); 44 45 46 49 private Messages() 50 { 51 } 52 53 54 59 public static String getString( String key ) 60 { 61 try 62 { 63 return RESOURCE_BUNDLE.getString( key ); 64 } 65 catch ( MissingResourceException e ) 66 { 67 logger.warn( "Associated ressource not found for key {}", key ); return '!' + key + '!'; 69 } 70 } 71 } 72 | Popular Tags |