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