mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
App-mgt store removing device type specific impl
This commit is contained in:
parent
8186f6754e
commit
81f427f34f
@ -40,8 +40,6 @@ import java.util.List;
|
|||||||
public class SubscriptionManagerImpl implements SubscriptionManager {
|
public class SubscriptionManagerImpl implements SubscriptionManager {
|
||||||
|
|
||||||
private static final Log log = LogFactory.getLog(SubscriptionManagerImpl.class);
|
private static final Log log = LogFactory.getLog(SubscriptionManagerImpl.class);
|
||||||
final private String ANDROID = "android";
|
|
||||||
final private String IOS = "ios";
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DeviceIdentifier> installApplicationForDevices(String applicationUUID,
|
public List<DeviceIdentifier> installApplicationForDevices(String applicationUUID,
|
||||||
@ -101,8 +99,7 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|||||||
private List<DeviceIdentifier> installApplication(String applicationUUID, List<DeviceIdentifier> deviceList)
|
private List<DeviceIdentifier> installApplication(String applicationUUID, List<DeviceIdentifier> deviceList)
|
||||||
throws ApplicationManagementException {
|
throws ApplicationManagementException {
|
||||||
List<DeviceIdentifier> failedDeviceList = new ArrayList<>(deviceList);
|
List<DeviceIdentifier> failedDeviceList = new ArrayList<>(deviceList);
|
||||||
List<org.wso2.carbon.device.mgt.common.DeviceIdentifier> androidDevices = new ArrayList<>();
|
List<org.wso2.carbon.device.mgt.common.DeviceIdentifier> activeDeviceList = new ArrayList<>();
|
||||||
List<org.wso2.carbon.device.mgt.common.DeviceIdentifier> iosDevices = new ArrayList<>();
|
|
||||||
for (DeviceIdentifier device : deviceList) {
|
for (DeviceIdentifier device : deviceList) {
|
||||||
org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier = new org.wso2.carbon.device.mgt
|
org.wso2.carbon.device.mgt.common.DeviceIdentifier deviceIdentifier = new org.wso2.carbon.device.mgt
|
||||||
.common.DeviceIdentifier(device.getId(), device.getType());
|
.common.DeviceIdentifier(device.getId(), device.getType());
|
||||||
@ -114,11 +111,7 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
log.debug("Prepare application install to : " + device.getId());
|
log.debug("Prepare application install to : " + device.getId());
|
||||||
}
|
}
|
||||||
if (device.getType().equals(ANDROID)) {
|
activeDeviceList.add(deviceIdentifier);
|
||||||
androidDevices.add(deviceIdentifier);
|
|
||||||
} else {
|
|
||||||
iosDevices.add(deviceIdentifier);
|
|
||||||
}
|
|
||||||
DAOFactory.getSubscriptionDAO().addDeviceApplicationMapping(device.getId(), applicationUUID, false);
|
DAOFactory.getSubscriptionDAO().addDeviceApplicationMapping(device.getId(), applicationUUID, false);
|
||||||
failedDeviceList.remove(device);
|
failedDeviceList.remove(device);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user