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
af12d3fe9a
commit
1193910f52
@ -183,7 +183,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();
|
||||
|
||||
@ -207,6 +207,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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -355,6 +355,11 @@ import java.util.stream.IntStream;
|
||||
}
|
||||
}
|
||||
|
||||
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