minor refactoring for getTenantId

feature/appm-store/pbac
inoshperera 5 years ago
parent d7355cef55
commit 8df21f8af1

@ -182,7 +182,7 @@ public class DeviceInformationManagerImpl implements DeviceInformationManager {
DeviceDetailsWrapper deviceDetailsWrapper = new DeviceDetailsWrapper();
deviceDetailsWrapper.setDevice(device);
deviceDetailsWrapper.setDeviceInfo(deviceInfo);
deviceDetailsWrapper.getJSONString();
deviceDetailsWrapper.setTenantId(DeviceManagerUtil.getTenantId());
GroupManagementProviderService groupManagementService = DeviceManagementDataHolder
.getInstance().getGroupManagementProviderService();
@ -206,6 +206,11 @@ public class DeviceInformationManagerImpl implements DeviceInformationManager {
} catch (UserStoreException e) {
log.error("Error occurred while getting role list", e);
}
} else {
if(log.isTraceEnabled()) {
log.trace("Event publishing is not enabled for tenant "
+ DeviceManagerUtil.getTenantId());
}
}
}

@ -350,6 +350,11 @@ public final class DeviceManagerUtil {
}
}
public static int getTenantId() {
return PrivilegedCarbonContext
.getThreadLocalCarbonContext().getTenantId();
}
public static int validateActivityListPageSize(int limit) throws OperationManagementException {
if (limit == 0) {
DeviceManagementConfig deviceManagementConfig = DeviceConfigurationManager.getInstance().

Loading…
Cancel
Save