/** * Method to save the send settings. * * @param request The current request. * @param notificationSettings The settings to save. * @param result The result to bind errors and so on to. * @return The ModelAndView to use. */ @RequestMapping(method = RequestMethod.POST) public ModelAndView saveSettings( HttpServletRequest request, @ModelAttribute("command") ClientProfileNotificationsForm notificationSettings, BindingResult result) { Map<ClientConfigurationPropertyConstant, String> settings = new HashMap<ClientConfigurationPropertyConstant, String>(); settings.put( ClientProperty.NOTIFICATION_RENDER_ATTACHMENTLINKS, Boolean.toString(notificationSettings.isRenderAttachmentLinks())); settings.put( ClientProperty.NOTIFICATION_RENDER_PERMALINKS, Boolean.toString(notificationSettings.isRenderPermalinks())); settings.put( ClientProperty.INVITATION_RENDER_BLOG_PERMALINK, Boolean.toString(notificationSettings.isRenderBlogPermalinkInInvitation())); settings.put( ClientProperty.MAX_NUMBER_OF_MENTIONED_USERS, Integer.toString(notificationSettings.getMaxUsersToMention())); CommunoteRuntime.getInstance() .getConfigurationManager() .updateClientConfigurationProperties(settings); MessageHelper.saveMessageFromKey(request, "client.profile.notifications.success"); return get(); }