use of org.wso2.carbon.identity.claim.metadata.mgt.listener.ClaimMetadataTenantMgtListener in project carbon-identity-framework by wso2.
the class IdentityClaimManagementServiceComponent method activate.
@Activate
protected void activate(ComponentContext ctxt) {
try {
BundleContext bundleCtx = ctxt.getBundleContext();
IdentityClaimManagementServiceDataHolder.getInstance().setBundleContext(bundleCtx);
if (IdentityClaimManagementServiceDataHolder.getInstance().getClaimConfigInitDAO() == null) {
IdentityClaimManagementServiceDataHolder.getInstance().setClaimConfigInitDAO(new DefaultClaimConfigInitDAO());
}
ClaimMetadataStoreFactory claimMetadataStoreFactory = new ClaimMetadataStoreFactory();
bundleCtx.registerService(ClaimManagerFactory.class.getName(), claimMetadataStoreFactory, null);
ClaimMetadataManagementService claimManagementService = new ClaimMetadataManagementServiceImpl();
bundleCtx.registerService(ClaimMetadataManagementService.class.getName(), claimManagementService, null);
IdentityClaimManagementServiceDataHolder.getInstance().setClaimManagementService(claimManagementService);
bundleCtx.registerService(TenantMgtListener.class.getName(), new ClaimMetadataTenantMgtListener(), null);
registerClaimConfigListener(bundleCtx);
// Register claim operation event handler implementation.
bundleCtx.registerService(AbstractEventHandler.class.getName(), new ClaimMetadataManagementAuditLogger(), null);
if (log.isDebugEnabled()) {
log.debug("ClaimMetadataManagementAuditLogger is successfully registered.");
log.debug("Identity Claim Management Core bundle is activated");
}
} catch (Throwable e) {
log.error("Error occurred while activating Identity Claim Management Service Component", e);
}
}
Aggregations