minor refactoring for getTenantId

feature/appm-store/pbac
inoshperera 5 years ago
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…
Cancel
Save