public RecoveryProcessor() { List<NotificationSendingModule> notificationSendingModules = IdentityMgtConfig.getInstance().getNotificationSendingModules(); this.defaultModule = notificationSendingModules.get(0); for (NotificationSendingModule module : notificationSendingModules) { this.modules.put(module.getNotificationType(), module); } this.dataStore = IdentityMgtConfig.getInstance().getRecoveryDataStore(); this.notificationSender = new NotificationSender(); questionProcessor = new ChallengeQuestionProcessor(); }
public RecoveryProcessor() { List<NotificationSendingModule> notificationSendingModules = IdentityMgtConfig.getInstance().getNotificationSendingModules(); this.defaultModule = notificationSendingModules.get(0); for (NotificationSendingModule module : notificationSendingModules) { this.modules.put(module.getNotificationType(), module); } this.dataStore = IdentityMgtConfig.getInstance().getRecoveryDataStore(); this.notificationSender = new NotificationSender(); questionProcessor = new ChallengeQuestionProcessor(); }
Class clazz = Thread.currentThread().getContextClassLoader().loadClass(module); NotificationSendingModule sendingModule = (NotificationSendingModule) clazz.newInstance(); String type = sendingModule.getNotificationType(); if (type == null || type.trim().length() == 0) { log.error("Notification type can not be null. Module " + module + " is not loaded."); module.init(); this.sendingModules.add(module); this.notificationTypes.add(module.getNotificationType());
Class clazz = Thread.currentThread().getContextClassLoader().loadClass(module); NotificationSendingModule sendingModule = (NotificationSendingModule) clazz.newInstance(); String type = sendingModule.getNotificationType(); if (type == null || type.trim().length() == 0) { log.error("Notification type can not be null. Module " + module + " is not loaded."); module.init(); this.sendingModules.add(module); this.notificationTypes.add(module.getNotificationType());