String msg = "Error in retrieving the tenant from the tenant manager.";
log.error(msg);
throw new Exception(msg, e);
}
TenantInfoBean bean = TenantMgtUtil.initializeTenantInfoBean(tenantId, tenant);
// retrieve first and last names from the UserStoreManager
bean.setFirstname(ClaimsMgtUtil.getFirstNamefromUserStoreManager(
TenantMgtServiceComponent.getRealmService(), tenantId));
bean.setLastname(ClaimsMgtUtil.getLastNamefromUserStoreManager(
TenantMgtServiceComponent.getRealmService(), tenantId));
//getting the subscription plan
String activePlan = "";
if(TenantMgtServiceComponent.getBillingService() != null){
activePlan = TenantMgtServiceComponent.getBillingService().
getActiveUsagePlan(tenantDomain);
}
if(activePlan != null && activePlan.trim().length() > 0){
bean.setUsagePlan(activePlan);
}else{
bean.setUsagePlan("");
}
return bean;
}