|
|
@ -33,8 +33,6 @@ import org.wso2.carbon.device.mgt.mobile.dao.MobileDeviceManagementDAOFactory;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.dao.util.MobileDeviceManagementDAOUtil;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.dao.util.MobileDeviceManagementDAOUtil;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.impl.android.AndroidDeviceManager;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.impl.android.AndroidDeviceManager;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.impl.android.dao.AndroidDAOFactory;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.impl.android.dao.AndroidDAOFactory;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.impl.ios.IOSDeviceManager;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.impl.ios.dao.IOSDAOFactory;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.impl.windows.WindowsDeviceManager;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.impl.windows.WindowsDeviceManager;
|
|
|
|
import org.wso2.carbon.ndatasource.core.DataSourceService;
|
|
|
|
import org.wso2.carbon.ndatasource.core.DataSourceService;
|
|
|
|
|
|
|
|
|
|
|
@ -59,7 +57,6 @@ public class MobileDeviceManagementServiceComponent {
|
|
|
|
|
|
|
|
|
|
|
|
private ServiceRegistration serverStartupObserverRef;
|
|
|
|
private ServiceRegistration serverStartupObserverRef;
|
|
|
|
private ServiceRegistration androidServiceRegRef;
|
|
|
|
private ServiceRegistration androidServiceRegRef;
|
|
|
|
private ServiceRegistration iOSServiceRegRef;
|
|
|
|
|
|
|
|
private ServiceRegistration windowsServiceRegRef;
|
|
|
|
private ServiceRegistration windowsServiceRegRef;
|
|
|
|
|
|
|
|
|
|
|
|
private static final Log log = LogFactory.getLog(MobileDeviceManagementServiceComponent.class);
|
|
|
|
private static final Log log = LogFactory.getLog(MobileDeviceManagementServiceComponent.class);
|
|
|
@ -78,8 +75,7 @@ public class MobileDeviceManagementServiceComponent {
|
|
|
|
Map<String, MobileDataSourceConfig> dsConfigMap =
|
|
|
|
Map<String, MobileDataSourceConfig> dsConfigMap =
|
|
|
|
config.getMobileDeviceMgtRepository().getMobileDataSourceConfigMap();
|
|
|
|
config.getMobileDeviceMgtRepository().getMobileDataSourceConfigMap();
|
|
|
|
MobileDeviceManagementDAOFactory.setMobileDataSourceConfigMap(dsConfigMap);
|
|
|
|
MobileDeviceManagementDAOFactory.setMobileDataSourceConfigMap(dsConfigMap);
|
|
|
|
IOSDAOFactory.init(dsConfigMap.get(DeviceManagementConstants.MobileDeviceTypes.
|
|
|
|
|
|
|
|
MOBILE_DEVICE_TYPE_IOS));
|
|
|
|
|
|
|
|
AndroidDAOFactory
|
|
|
|
AndroidDAOFactory
|
|
|
|
.init(dsConfigMap.get(DeviceManagementConstants.MobileDeviceTypes.
|
|
|
|
.init(dsConfigMap.get(DeviceManagementConstants.MobileDeviceTypes.
|
|
|
|
MOBILE_DEVICE_TYPE_ANDROID));
|
|
|
|
MOBILE_DEVICE_TYPE_ANDROID));
|
|
|
@ -105,8 +101,6 @@ public class MobileDeviceManagementServiceComponent {
|
|
|
|
|
|
|
|
|
|
|
|
androidServiceRegRef =
|
|
|
|
androidServiceRegRef =
|
|
|
|
bundleContext.registerService(DeviceManager.class.getName(), new AndroidDeviceManager(), null);
|
|
|
|
bundleContext.registerService(DeviceManager.class.getName(), new AndroidDeviceManager(), null);
|
|
|
|
iOSServiceRegRef =
|
|
|
|
|
|
|
|
bundleContext.registerService(DeviceManager.class.getName(), new IOSDeviceManager(), null);
|
|
|
|
|
|
|
|
windowsServiceRegRef =
|
|
|
|
windowsServiceRegRef =
|
|
|
|
bundleContext.registerService(DeviceManager.class.getName(), new WindowsDeviceManager(), null);
|
|
|
|
bundleContext.registerService(DeviceManager.class.getName(), new WindowsDeviceManager(), null);
|
|
|
|
|
|
|
|
|
|
|
@ -126,9 +120,6 @@ public class MobileDeviceManagementServiceComponent {
|
|
|
|
if (androidServiceRegRef != null) {
|
|
|
|
if (androidServiceRegRef != null) {
|
|
|
|
androidServiceRegRef.unregister();
|
|
|
|
androidServiceRegRef.unregister();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (iOSServiceRegRef != null) {
|
|
|
|
|
|
|
|
iOSServiceRegRef.unregister();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (windowsServiceRegRef != null) {
|
|
|
|
if (windowsServiceRegRef != null) {
|
|
|
|
windowsServiceRegRef.unregister();
|
|
|
|
windowsServiceRegRef.unregister();
|
|
|
|
}
|
|
|
|
}
|
|
|
|