|
|
@ -217,13 +217,14 @@ public class ApplicationManagerProviderServiceImpl implements ApplicationManagem
|
|
|
|
appIdsToRemove.add(installedApp.getId());
|
|
|
|
appIdsToRemove.add(installedApp.getId());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
applicationMappingDAO.removeApplicationMapping(device.getId(), appIdsToRemove, tenantId);
|
|
|
|
Application installedApp;
|
|
|
|
Application installedApp;
|
|
|
|
List<Integer> applicationIds = new ArrayList<>();
|
|
|
|
List<Integer> applicationIds = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
for (Application application : applications) {
|
|
|
|
for (Application application : applications) {
|
|
|
|
if (!installedAppList.contains(application)) {
|
|
|
|
if (!installedAppList.contains(application)) {
|
|
|
|
installedApp = applicationDAO.getApplication(application.getApplicationIdentifier(), tenantId);
|
|
|
|
installedApp = applicationDAO.getApplication(application.getApplicationIdentifier(),
|
|
|
|
|
|
|
|
application.getVersion(), tenantId);
|
|
|
|
if (installedApp == null) {
|
|
|
|
if (installedApp == null) {
|
|
|
|
appsToAdd.add(application);
|
|
|
|
appsToAdd.add(application);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -244,7 +245,7 @@ public class ApplicationManagerProviderServiceImpl implements ApplicationManagem
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
log.debug("num of remove app Ids:" + appIdsToRemove.size());
|
|
|
|
log.debug("num of remove app Ids:" + appIdsToRemove.size());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
applicationMappingDAO.removeApplicationMapping(device.getId(), appIdsToRemove, tenantId);
|
|
|
|
|
|
|
|
DeviceManagementDAOFactory.commitTransaction();
|
|
|
|
DeviceManagementDAOFactory.commitTransaction();
|
|
|
|
} catch (DeviceManagementDAOException e) {
|
|
|
|
} catch (DeviceManagementDAOException e) {
|
|
|
|
DeviceManagementDAOFactory.rollbackTransaction();
|
|
|
|
DeviceManagementDAOFactory.rollbackTransaction();
|
|
|
|