|
|
|
@ -1722,7 +1722,6 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
|
}
|
|
|
|
|
ApplicationDTO applicationDTO = this.applicationDAO.getAppWithRelatedRelease(uuid, tenantId);
|
|
|
|
|
int appReleaseId = applicationReleaseDTO.getId();
|
|
|
|
|
int deviceTypeId = applicationDTO.getDeviceTypeId();
|
|
|
|
|
List<SubscriptionsDTO> groupDetailsWithDevices = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
List<GroupSubscriptionDTO> groupDetails =
|
|
|
|
@ -1738,7 +1737,8 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
|
|
|
|
|
|
// Retrieve group details and device IDs for the group using the service layer
|
|
|
|
|
GroupDetailsDTO groupDetailWithDevices =
|
|
|
|
|
groupManagementProviderService.getGroupDetailsWithDevices(groupName, deviceTypeId, offset, limit);
|
|
|
|
|
groupManagementProviderService.getGroupDetailsWithDevices(groupName, applicationDTO.getDeviceTypeId(),
|
|
|
|
|
offset, limit);
|
|
|
|
|
|
|
|
|
|
SubscriptionsDTO groupDetailDTO = new SubscriptionsDTO();
|
|
|
|
|
groupDetailDTO.setId(groupDetailWithDevices.getGroupId());
|
|
|
|
@ -1913,7 +1913,6 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
|
}
|
|
|
|
|
ApplicationDTO applicationDTO = this.applicationDAO.getAppWithRelatedRelease(uuid, tenantId);
|
|
|
|
|
int appReleaseId = applicationReleaseDTO.getId();
|
|
|
|
|
int deviceTypeId = applicationDTO.getDeviceTypeId();
|
|
|
|
|
List<SubscriptionsDTO> userSubscriptionsWithDevices = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
List<SubscriptionsDTO> userSubscriptions =
|
|
|
|
@ -1929,7 +1928,7 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
|
|
|
|
|
|
// Retrieve owner details and device IDs for the user using the service layer
|
|
|
|
|
OwnerWithDeviceDTO ownerDetailsWithDevices =
|
|
|
|
|
deviceManagementProviderService.getOwnersWithDeviceIds(userName, deviceTypeId);
|
|
|
|
|
deviceManagementProviderService.getOwnersWithDeviceIds(userName, applicationDTO.getDeviceTypeId());
|
|
|
|
|
|
|
|
|
|
SubscriptionsDTO userSubscriptionDTO = new SubscriptionsDTO();
|
|
|
|
|
userSubscriptionDTO.setName(userSubscription.getName());
|
|
|
|
@ -2101,7 +2100,6 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
|
}
|
|
|
|
|
ApplicationDTO applicationDTO = this.applicationDAO.getAppWithRelatedRelease(uuid, tenantId);
|
|
|
|
|
int appReleaseId = applicationReleaseDTO.getId();
|
|
|
|
|
int deviceTypeId = applicationDTO.getDeviceTypeId();
|
|
|
|
|
List<SubscriptionsDTO> roleSubscriptionsWithDevices = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
List<SubscriptionsDTO> roleSubscriptions =
|
|
|
|
@ -2142,7 +2140,7 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
|
for (String user : users) {
|
|
|
|
|
OwnerWithDeviceDTO ownerDetailsWithDevices;
|
|
|
|
|
try {
|
|
|
|
|
ownerDetailsWithDevices = deviceManagementProviderService.getOwnersWithDeviceIds(user, deviceTypeId);
|
|
|
|
|
ownerDetailsWithDevices = deviceManagementProviderService.getOwnersWithDeviceIds(user, applicationDTO.getDeviceTypeId());
|
|
|
|
|
} catch (DeviceManagementDAOException e) {
|
|
|
|
|
throw new ApplicationManagementException("Error retrieving owner details with devices for user: " + user, e);
|
|
|
|
|
}
|
|
|
|
@ -2312,7 +2310,6 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
|
}
|
|
|
|
|
ApplicationDTO applicationDTO = this.applicationDAO.getAppWithRelatedRelease(uuid, tenantId);
|
|
|
|
|
int appReleaseId = applicationReleaseDTO.getId();
|
|
|
|
|
int deviceTypeId = applicationDTO.getDeviceTypeId();
|
|
|
|
|
|
|
|
|
|
DeviceManagementProviderService deviceManagementProviderService = HelperUtil.getDeviceManagementProviderService();
|
|
|
|
|
List<DeviceSubscriptionDTO> deviceSubscriptions =
|
|
|
|
@ -2326,7 +2323,7 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<DeviceDetailsDTO> allDevices =
|
|
|
|
|
deviceManagementProviderService.getDevicesByTenantId(tenantId, deviceTypeId);
|
|
|
|
|
deviceManagementProviderService.getDevicesByTenantId(tenantId, applicationDTO.getDeviceTypeId());
|
|
|
|
|
|
|
|
|
|
List<Integer> deviceIds = allDevices.stream()
|
|
|
|
|
.map(DeviceDetailsDTO::getDeviceId)
|
|
|
|
@ -2500,7 +2497,6 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
|
}
|
|
|
|
|
ApplicationDTO applicationDTO = this.applicationDAO.getAppWithRelatedRelease(uuid, tenantId);
|
|
|
|
|
int appReleaseId = applicationReleaseDTO.getId();
|
|
|
|
|
int deviceTypeId = applicationDTO.getDeviceTypeId();
|
|
|
|
|
|
|
|
|
|
List<DeviceSubscriptionDTO> allSubscriptions =
|
|
|
|
|
subscriptionDAO.getAllSubscriptionsDetails(appReleaseId, unsubscribe, tenantId, offset, limit);
|
|
|
|
@ -2529,7 +2525,7 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
|
statusCounts.put("NEW", 0);
|
|
|
|
|
|
|
|
|
|
List<DeviceDetailsDTO> allDevices =
|
|
|
|
|
deviceManagementProviderService.getDevicesByTenantId(tenantId, deviceTypeId);
|
|
|
|
|
deviceManagementProviderService.getDevicesByTenantId(tenantId, applicationDTO.getDeviceTypeId());
|
|
|
|
|
|
|
|
|
|
for (DeviceDetailsDTO device : allDevices) {
|
|
|
|
|
Integer deviceId = device.getDeviceId();
|
|
|
|
|