/** * Appends info messages to a main StringBuilder message for an easier display to the user * * @param responseMessage Response message to return to the user * @param messageKey i18 key * @param bundleId Current bundle * @param failure True for failures, false otherwise * @throws LanguageException If fails using the i18 massage key */ private void appendMessage( StringBuilder responseMessage, String messageKey, String bundleId, Boolean failure) throws LanguageException { String message = LanguageUtil.format(getUser().getLocale(), messageKey, new String[] {bundleId}, false); if (responseMessage.length() > 0) { responseMessage.append("<br>"); } if (failure) { responseMessage.append("FAILURE: ").append(message); } else { responseMessage.append(message); } }