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
Collaborator

Purpose

Allow users to dis-enroll multiple devices with one request

related issue - https://roadmap.entgra.net/issues/9970

## Purpose Allow users to dis-enroll multiple devices with one request related issue - https://roadmap.entgra.net/issues/9970
pramilaniroshan added 1 commit 1 year ago
pahansith requested changes 1 year ago
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.",
Owner

Format the line

Format the line
pramilaniroshan marked this conversation as resolved
})
Response disenrollMultipleDevices(@ApiParam(
name = "deviceTypeWithDeviceIds",
value = "The properties to advanced search devices.",
Owner

Change the value to match with the context

Change the value to match with the context
pramilaniroshan marked this conversation as resolved
Map<String, List<String>> list = deviceTypeWithDeviceIds.getDeviceTypeWithDeviceIds();
for (Map.Entry<String, List<String>> entry : list.entrySet()) {
String deviceType = entry.getKey();
Owner

Declare these variables out of the loop for memory optimization

Declare these variables out of the loop for memory optimization
pramilaniroshan marked this conversation as resolved
failedToDisenrollDevices.add(deviceIdentifier);
}
} else {
failedToDisenrollDevices.add(deviceIdentifier);
Owner

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.

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.
pramilaniroshan marked this conversation as resolved
pramilaniroshan added 1 commit 1 year ago
pahansith merged commit 95a257ecc6 into master 1 year ago

Reviewers

pahansith requested changes 1 year ago
The pull request has been merged as 95a257ecc6.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: community/device-mgt-core#279
Loading…
There is no content yet.