package diskfiles; import com.raghuraman.rbcore.keycontrol.msg.ints.frozen.MsgWithReloadableCacheAndOneLocale; public class MessagesDlMsg { /** * name of the resource bundle */ private static final String resouceBundleName = "diskfiles.Messages"; /** * The messenger field is a convenience field used by this class */ private static final MsgWithReloadableCacheAndOneLocale dlMessenger = new MsgWithReloadableCacheAndOneLocale(resouceBundleName); /** * standard example - DISK_FILES * @param diskName * @param noOfFiles * @return diskFilesMsg */ public static final String getDiskFilesMsg(String diskName, int noOfFiles) { return dlMessenger.getMessage(Nested.DISK_FILES.ordinal(), diskName, noOfFiles); } public static final String getDiskNameMsg() { return dlMessenger.getMessage(Nested.DISK_NAME.ordinal()); } public static final String getInstructionMsg() { return dlMessenger.getMessage(Nested.INSTRUCTION.ordinal()); } public static final String getSubmitMsg() { return dlMessenger.getMessage(Nested.SUBMIT.ordinal()); } public static final String getErrorMsg() { return dlMessenger.getMessage(Nested.ERROR.ordinal()); } public static final String getNoOfFilesMsg() { return dlMessenger.getMessage(Nested.NO_OF_FILES.ordinal()); } public static final String getSelectLocaleMsg() { return dlMessenger.getMessage(Nested.SELECT_LOCALE.ordinal()); } /** * All constructors are private to prevent unnecessary instantiation of this class */ private MessagesDlMsg() { } /** * Currently this method simply reloads the cache and returns true. In case reloading is not needed it * may be turned off from the general settings page of the rb editor. * @return A boolean flag to indicate whether reloading of the cache was attempted */ public static final boolean reloadDlMessengerCache() { dlMessenger.updateCache(resouceBundleName); return true; } protected static enum Nested { DISK_FILES, DISK_NAME, INSTRUCTION, SUBMIT, ERROR, NO_OF_FILES, SELECT_LOCALE } }