| //------------------------------------------------------------------------------ |
| // Copyright (c) 2004, 2005 IBM Corporation. All Rights Reserved. |
| //------------------------------------------------------------------------------ |
| package org.eclipse.epf.export.msp; |
| |
| import java.util.ResourceBundle; |
| |
| import org.eclipse.epf.common.utils.I18nUtil; |
| |
| /** |
| * The Planning UI message resource bundle accessor class. |
| * |
| * @author Bingxue Xu |
| * @since 1.0 |
| */ |
| public class ExportMspResources { |
| |
| private final static ResourceBundle RESOURCE_BUNDLE = ResourceBundle |
| .getBundle(ExportMspResources.class.getPackage().getName() |
| + ".Resources"); //$NON-NLS-1$ |
| |
| /** |
| * Private constructor to prevent this class from being instantiated. |
| */ |
| private ExportMspResources() { |
| super(); |
| } |
| |
| /** |
| * Returns the localized string associated with a resource key. |
| * |
| * @param key |
| * A resource key. |
| * @return A localized string. |
| */ |
| public static String getString(String key) { |
| return I18nUtil.getString(RESOURCE_BUNDLE, key); |
| } |
| |
| /** |
| * Returns the localized string associated with a resource key and formatted |
| * with a given string. |
| * |
| * @param key |
| * A resource key. |
| * @param data |
| * An object. |
| * @return A formatted localized string. |
| */ |
| public static String formatString(String key, Object data) { |
| return I18nUtil.formatString(RESOURCE_BUNDLE, key, data); |
| } |
| |
| /** |
| * Returns the localized string associated with a resource key and formatted |
| * with a given string. |
| * |
| * @param key |
| * A resource key. |
| * @param data |
| * An array of objects. |
| * @return A formatted localized string. |
| */ |
| public static String formatString(String key, Object[] data) { |
| return I18nUtil.formatString(RESOURCE_BUNDLE, key, data); |
| } |
| |
| } |