mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
minor refactoring for getTenantId
This commit is contained in:
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…
Reference in New Issue
Block a user