protected static String getString(AutomatedInstallData automatedInstallData, String key) { return automatedInstallData.getMessages().get(key); } }
/** * Add the contents of a custom langpack to the default langpack, if it exists. * * @param installData the install data to be used */ public static void addCustomLangpack(AutomatedInstallData installData, Locales locales) { // We try to load and add a custom langpack. try { installData.getMessages().add(locales.getMessages(Resources.CUSTOM_TRANSLATIONS_RESOURCE_NAME)); logger.fine("Found custom langpack for " + installData.getLocaleISO3()); } catch (ResourceNotFoundException exception) { logger.fine("No custom langpack for " + installData.getLocaleISO3() + " available"); } }
private void handleError(IzPackException ize) throws IzPackException { Messages messages = installData.getMessages(); // Enable continuing subsequent actions on warnings only switch (ize.getPromptType()) { case WARNING: AbstractUIHandler handler = new PromptUIHandler(prompt); if (handler.askWarningQuestion(null, AbstractPrompt.getThrowableMessage(ize) + "\n" + messages.get("installer.continueQuestion"), AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_NO) != AbstractUIHandler.ANSWER_YES) { throw new InstallerException(messages.get("installer.cancelled")); } break; default: throw ize; } }
System.out.println(installData.getMessages().get("AutomatedInstaller.permissionError"));