Add multiple device dis-enrollment support #279
Merged
pahansith
merged 2 commits from pramilaniroshan/device-mgt-core:rm-9970-dis
into master
1 year ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'pramilaniroshan/device-mgt-core:rm-9970-dis'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Purpose
Allow users to dis-enroll multiple devices with one request
related issue - https://roadmap.entgra.net/issues/9970
produces = MediaType.APPLICATION_JSON,
httpMethod = "PUT",
value = "Remove Multiple Devices Specified by Device IDs and Device Type",
notes = "Deletes multiple devices of the specified device type specified by their device IDs and returns the status of the deletion operation.",
Format the line
})
Response disenrollMultipleDevices(@ApiParam(
name = "deviceTypeWithDeviceIds",
value = "The properties to advanced search devices.",
Change the value to match with the context
Map<String, List<String>> list = deviceTypeWithDeviceIds.getDeviceTypeWithDeviceIds();
for (Map.Entry<String, List<String>> entry : list.entrySet()) {
String deviceType = entry.getKey();
Declare these variables out of the loop for memory optimization
failedToDisenrollDevices.add(deviceIdentifier);
}
} else {
failedToDisenrollDevices.add(deviceIdentifier);
Better to put debug logs here to identify the cause of failing the disenrollment. If the persisted device returns null, it should be due to the user sent an invalid device identifiers.
95a257ecc6
into master 1 year agoReviewers
95a257ecc6
.