* @param tenantId, tenant id
* @param tenant, tenant
* @return TenantInfoBean.
*/
public static TenantInfoBean getTenantInfoBeanfromTenant(int tenantId, Tenant tenant) {
TenantInfoBean bean = new TenantInfoBean();
if (tenant != null) {
bean.setTenantId(tenantId);
bean.setTenantDomain(tenant.getDomain());
bean.setEmail(tenant.getEmail());
/*gets the created date*/
Calendar createdDate = Calendar.getInstance();
createdDate.setTimeInMillis(tenant.getCreatedDate().getTime());
bean.setCreatedDate(createdDate);
bean.setActive(tenant.isActive());
if(log.isDebugEnabled()) {
log.debug("The TenantInfoBean object has been created from the tenant.");
}
} else {
if(log.isDebugEnabled()) {