/** * This function builds the required configuration object for Notification sender and pass it * to the notification sender with the relevant event. * * @param operation Type or operation took place in user operation listener * @param username username of the subjected user for attribute change */ private void sendNotification(String operation, String username) { NotificationSender notificationSender = IdentityMgtServiceComponent.getNotificationSender(); if (notificationSender != null) { try { PublisherEvent event = new PublisherEvent(eventName); event.addEventProperty(operationLabel, operation); event.addEventProperty(usernameLabel, username); if (log.isDebugEnabled()) { log.debug("Invoking notification sender"); } notificationSender.invoke(event); } catch (NotificationManagementException e) { log.error("Error while sending notifications on user operations", e); } } else { log.error("No registered notification sender found. Notification sending aborted"); } } }
/** * This function builds the required configuration object for Notification sender and pass it * to the notification sender with the relevant event. * * @param operation Type or operation took place in user operation listener * @param username username of the subjected user for attribute change */ private void sendNotification(String operation, String username) { NotificationSender notificationSender = IdentityMgtServiceComponent.getNotificationSender(); if (notificationSender != null) { try { PublisherEvent event = new PublisherEvent(eventName); event.addEventProperty(operationLabel, operation); event.addEventProperty(usernameLabel, username); if (log.isDebugEnabled()) { log.debug("Invoking notification sender"); } notificationSender.invoke(event); } catch (NotificationManagementException e) { log.error("Error while sending notifications on user operations", e); } } else { log.error("No registered notification sender found. Notification sending aborted"); } } }
try { PublisherEvent event = new PublisherEvent(eventName); event.addEventProperty(NotificationConstants.TARGET_ID_PROPERTY_LABEL, statusHolder.getKey()); event.addEventProperty(NotificationConstants.USERNAME_PROPERTY_LABEL, statusHolder.getUser()); event.addEventProperty(NotificationConstants.TARGET_PROPERTY_LABEL, statusHolder.getTarget()); event.addEventProperty(NotificationConstants.ACTION_PROPERTY_LABEL, action); if (log.isDebugEnabled()) { log.debug("Invoking notification sender");
try { PublisherEvent event = new PublisherEvent(eventName); event.addEventProperty(NotificationConstants.TARGET_ID_PROPERTY_LABEL, statusHolder.getKey()); event.addEventProperty(NotificationConstants.USERNAME_PROPERTY_LABEL, statusHolder.getUser()); event.addEventProperty(NotificationConstants.TARGET_PROPERTY_LABEL, statusHolder.getTarget()); event.addEventProperty(NotificationConstants.ACTION_PROPERTY_LABEL, action); if (log.isDebugEnabled()) { log.debug("Invoking notification sender");
try { PublisherEvent event = new PublisherEvent(eventName); event.addEventProperty(NotificationConstants.TARGET_ID_PROPERTY_LABEL, statusHolder.getKey()); event.addEventProperty(NotificationConstants.USERNAME_PROPERTY_LABEL, statusHolder.getUser()); event.addEventProperty(NotificationConstants.TARGET_PROPERTY_LABEL, statusHolder.getTarget()); event.addEventProperty(NotificationConstants.ACTION_PROPERTY_LABEL, action); if (log.isDebugEnabled()) { log.debug("Invoking notification sender");