Search in sources :

Example 1 with DefaultNotificationChannelManager

use of org.wso2.carbon.identity.governance.internal.service.impl.notification.DefaultNotificationChannelManager in project identity-governance by wso2-extensions.

the class IdentityMgtServiceComponent method activate.

@Activate
protected void activate(ComponentContext context) {
    try {
        IdentityMgtEventListener listener = new IdentityMgtEventListener();
        context.getBundleContext().registerService(UserOperationEventListener.class, listener, null);
        context.getBundleContext().registerService(UserOperationEventListener.class, new IdentityStoreEventListener(), null);
        IdentityGovernanceServiceImpl identityGovernanceService = new IdentityGovernanceServiceImpl();
        context.getBundleContext().registerService(IdentityGovernanceService.class, identityGovernanceService, null);
        IdentityMgtServiceDataHolder.getInstance().setIdentityGovernanceService(identityGovernanceService);
        DefaultNotificationChannelManager defaultNotificationChannelManager = new DefaultNotificationChannelManager();
        context.getBundleContext().registerService(NotificationChannelManager.class.getName(), defaultNotificationChannelManager, null);
        if (log.isDebugEnabled()) {
            log.debug("Identity Management Listener is enabled");
        }
    } catch (Exception e) {
        log.error("Error while activating identity governance component.", e);
    }
}
Also used : DefaultNotificationChannelManager(org.wso2.carbon.identity.governance.internal.service.impl.notification.DefaultNotificationChannelManager) NotificationChannelManager(org.wso2.carbon.identity.governance.service.notification.NotificationChannelManager) IdentityMgtEventListener(org.wso2.carbon.identity.governance.listener.IdentityMgtEventListener) IdentityStoreEventListener(org.wso2.carbon.identity.governance.listener.IdentityStoreEventListener) IdentityGovernanceServiceImpl(org.wso2.carbon.identity.governance.IdentityGovernanceServiceImpl) DefaultNotificationChannelManager(org.wso2.carbon.identity.governance.internal.service.impl.notification.DefaultNotificationChannelManager) Activate(org.osgi.service.component.annotations.Activate)

Aggregations

Activate (org.osgi.service.component.annotations.Activate)1 IdentityGovernanceServiceImpl (org.wso2.carbon.identity.governance.IdentityGovernanceServiceImpl)1 DefaultNotificationChannelManager (org.wso2.carbon.identity.governance.internal.service.impl.notification.DefaultNotificationChannelManager)1 IdentityMgtEventListener (org.wso2.carbon.identity.governance.listener.IdentityMgtEventListener)1 IdentityStoreEventListener (org.wso2.carbon.identity.governance.listener.IdentityStoreEventListener)1 NotificationChannelManager (org.wso2.carbon.identity.governance.service.notification.NotificationChannelManager)1