|
|
@ -196,8 +196,10 @@ public class GroupBasedSubscriptionManagementHelperServiceImpl implements Subscr
|
|
|
|
List<Device> devices = HelperUtil.getGroupManagementProviderService().
|
|
|
|
List<Device> devices = HelperUtil.getGroupManagementProviderService().
|
|
|
|
getAllDevicesOfGroup(subscriptionInfo.getIdentifier(), false);
|
|
|
|
getAllDevicesOfGroup(subscriptionInfo.getIdentifier(), false);
|
|
|
|
List<Integer> removedIds = devices.stream()
|
|
|
|
List<Integer> removedIds = devices.stream()
|
|
|
|
.filter(device -> {String status = String.valueOf(device.getEnrolmentInfo().getStatus());
|
|
|
|
.filter(device -> {
|
|
|
|
return "REMOVED".equalsIgnoreCase(status) || "DELETED".equalsIgnoreCase(status);})
|
|
|
|
String status = String.valueOf(device.getEnrolmentInfo().getStatus());
|
|
|
|
|
|
|
|
return "REMOVED".equalsIgnoreCase(status) || "DELETED".equalsIgnoreCase(status);
|
|
|
|
|
|
|
|
})
|
|
|
|
.map(device -> device.getEnrolmentInfo().getId()).collect(Collectors.toList());
|
|
|
|
.map(device -> device.getEnrolmentInfo().getId()).collect(Collectors.toList());
|
|
|
|
List<Integer> enrollmentIdsOwnByGroup = devices.stream().map(device -> device.getEnrolmentInfo().getId()).collect(Collectors.toList());
|
|
|
|
List<Integer> enrollmentIdsOwnByGroup = devices.stream().map(device -> device.getEnrolmentInfo().getId()).collect(Collectors.toList());
|
|
|
|
enrollmentIdsOwnByGroup.removeAll(removedIds);
|
|
|
|
enrollmentIdsOwnByGroup.removeAll(removedIds);
|
|
|
|