import java.util.MissingResourceException;
import java.util.ResourceBundle;
/**
* This is a utility class designed to deal directly with the com/sportsbetting/affiliate/web/messages/messages.properties resource bundle.
* More work is expected to introduce internationalization handling.
* @author Affiliates
*
*/
public abstract class Messages {
public static final String BUNDLE_NAME = “com.sportsbetting.affiliateadmin.web.messages.messages”; //$NON-NLS-1$
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
.getBundle(BUNDLE_NAME);
/**
* @param key
* @return key-value
*/
public static String getString(String key) {
// TODO Auto-generated method stub
try {
return RESOURCE_BUNDLE.getString(key);
} catch (MissingResourceException e) {
return ‘!’ + key + ‘!’;
}
}
———-
//using this get the value from messages.properties file
Messages.getString(MSGK_SUCC_FEED_UPDATED)