Search in sources :

Example 1 with PutRoleMembershipNotificationTask

use of com.yahoo.athenz.zms.notification.PutRoleMembershipNotificationTask in project athenz by yahoo.

the class ZMSImpl method sendMembershipApprovalNotification.

void sendMembershipApprovalNotification(final String domain, final String org, final String roleName, final String member, final String auditRef, final String principal, final Role role) {
    Map<String, String> details = new HashMap<>();
    details.put(NOTIFICATION_DETAILS_DOMAIN, domain);
    details.put(NOTIFICATION_DETAILS_ROLE, roleName);
    details.put(NOTIFICATION_DETAILS_MEMBER, member);
    details.put(NOTIFICATION_DETAILS_REASON, auditRef);
    details.put(NOTIFICATION_DETAILS_REQUESTER, principal);
    if (LOG.isDebugEnabled()) {
        LOG.debug("Sending Membership Approval notification after putMembership");
    }
    List<Notification> notifications = new PutRoleMembershipNotificationTask(domain, org, role, details, dbService, userDomainPrefix, notificationToEmailConverterCommon).getNotifications();
    notificationManager.sendNotifications(notifications);
}
Also used : ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) PutRoleMembershipNotificationTask(com.yahoo.athenz.zms.notification.PutRoleMembershipNotificationTask) Notification(com.yahoo.athenz.common.server.notification.Notification)

Aggregations

Notification (com.yahoo.athenz.common.server.notification.Notification)1 PutRoleMembershipNotificationTask (com.yahoo.athenz.zms.notification.PutRoleMembershipNotificationTask)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1