/** * Copyright (c) 2009 Farata Systems http://www.faratasystems.com * * Licensed under The MIT License * Re-distributions of files must retain the above copyright notice. * * @license http://www.opensource.org/licenses/mit-license.php The MIT License * */ package com.farata.cleardatabuilder.extjs.migration; import java.text.MessageFormat; import java.util.MissingResourceException; import java.util.ResourceBundle; public class Messages { private static final String BUNDLE_NAME = "com.farata.cleardatabuilder.extjs.migration.messages"; //$NON-NLS-1$ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle .getBundle(BUNDLE_NAME); private Messages() { } public static String getString(final String key) { try { return RESOURCE_BUNDLE.getString(key); } catch (final MissingResourceException e) { return '!' + key + '!'; } } public static String getString(final String key, final Object[] params) { try { return MessageFormat.format(RESOURCE_BUNDLE.getString(key), params); } catch (final MissingResourceException e) { return '!' + key + '!'; } } }