@View
public Response index(ApplicationContext applicationContext, UserContext userContext){
if (! CommonsUtils.isFeatureActive(NotificationUtils.FEATURE_NAME)) {
return redirectToHomePage();
}
this.locale = userContext.getLocale();
ResourceBundle rs = applicationContext.resolveBundle(this.locale);
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("_ctx", new Context(rs));
List<GroupProvider> groups = pluginSettingService.getGroupPlugins();
parameters.put("groups", groups);
parameters.put("channels", getChannels());
SettingValue<?> senderName = settingService.get(org.exoplatform.commons.api.settings.data.Context.GLOBAL,
Scope.GLOBAL, NotificationPluginUtils.NOTIFICATION_SENDER_NAME);
SettingValue<?> senderEmail = settingService.get(org.exoplatform.commons.api.settings.data.Context.GLOBAL,
Scope.GLOBAL, NotificationPluginUtils.NOTIFICATION_SENDER_EMAIL);
parameters.put("senderName", senderName != null ? (String)senderName.getValue() : System.getProperty("exo.notifications.portalname", "eXo"));
parameters.put("senderEmail", senderEmail != null ? (String)senderEmail.getValue() : System.getProperty("gatein.email.smtp.from", "noreply@exoplatform.com"));
return index.ok(parameters);
}