diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/pom.xml index 9724e4eaf..c66a4f9e1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/pom.xml @@ -70,6 +70,7 @@ !org.wso2.carbon.device.mgt.mobile.internal, + !org.wso2.carbon.device.mgt.mobile.impl, org.wso2.carbon.device.mgt.mobile.*, diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/dao/MobileDeviceManagementDAOFactory.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/dao/MobileDeviceManagementDAOFactory.java index 331e96941..1e8d60742 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/dao/MobileDeviceManagementDAOFactory.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/dao/MobileDeviceManagementDAOFactory.java @@ -25,8 +25,6 @@ import org.wso2.carbon.device.mgt.mobile.common.MobileDeviceMgtPluginException; import org.wso2.carbon.device.mgt.mobile.config.datasource.JNDILookupDefinition; import org.wso2.carbon.device.mgt.mobile.config.datasource.MobileDataSourceConfig; import org.wso2.carbon.device.mgt.mobile.dao.util.MobileDeviceManagementDAOUtil; -import org.wso2.carbon.device.mgt.mobile.impl.ios.dao.FeatureManagementDAOException; - import javax.sql.DataSource; import java.sql.Connection; import java.sql.SQLException; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidDeviceManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidDeviceManager.java index fa5d56f7b..925d6b1e1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidDeviceManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidDeviceManager.java @@ -21,7 +21,10 @@ package org.wso2.carbon.device.mgt.mobile.impl.android; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.device.mgt.common.*; +import org.wso2.carbon.device.mgt.common.app.mgt.AppManagerConnectorException; +import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.spi.DeviceManager; +import org.wso2.carbon.device.mgt.common.spi.DeviceMgtService; import org.wso2.carbon.device.mgt.mobile.dao.MobileDeviceManagementDAOException; import org.wso2.carbon.device.mgt.mobile.dao.MobileDeviceManagementDAOFactory; import org.wso2.carbon.device.mgt.mobile.dto.MobileDevice; @@ -34,7 +37,7 @@ import java.util.List; /** * This represents the Android implementation of DeviceManagerService. */ -public class AndroidDeviceManager implements DeviceManager { +public class AndroidDeviceManager implements DeviceMgtService { private MobileDeviceManagementDAOFactory mobileDeviceManagementDAOFactory; private static final Log log = LogFactory.getLog(AndroidDeviceManager.class); @@ -209,4 +212,9 @@ public class AndroidDeviceManager implements DeviceManager { return devices; } + @Override + public void installApplication(Operation operation, List deviceIdentifiers) + throws AppManagerConnectorException { + + } } \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/dao/impl/AndroidFeatureDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/dao/impl/AndroidFeatureDAOImpl.java index b3c3dfa49..96991d0b7 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/dao/impl/AndroidFeatureDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/dao/impl/AndroidFeatureDAOImpl.java @@ -46,8 +46,7 @@ public class AndroidFeatureDAOImpl implements MobileFeatureDAO { } @Override - public boolean addFeature(MobileFeature mobileFeature) throws - MobileDeviceManagementDAOException { + public boolean addFeature(MobileFeature mobileFeature) throws MobileDeviceManagementDAOException { PreparedStatement stmt = null; boolean status = false; Connection conn = null; @@ -73,8 +72,7 @@ public class AndroidFeatureDAOImpl implements MobileFeatureDAO { } @Override - public boolean updateFeature(MobileFeature mobileFeature) throws - MobileDeviceManagementDAOException { + public boolean updateFeature(MobileFeature mobileFeature) throws MobileDeviceManagementDAOException { boolean status = false; Connection conn = null; PreparedStatement stmt = null; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManager.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManager.java index 79980100a..9209cc20a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManager.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManager.java @@ -21,7 +21,10 @@ package org.wso2.carbon.device.mgt.mobile.impl.windows; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.device.mgt.common.*; +import org.wso2.carbon.device.mgt.common.app.mgt.AppManagerConnectorException; +import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.spi.DeviceManager; +import org.wso2.carbon.device.mgt.common.spi.DeviceMgtService; import org.wso2.carbon.device.mgt.mobile.dao.MobileDeviceManagementDAOException; import org.wso2.carbon.device.mgt.mobile.dao.MobileDeviceManagementDAOFactory; import org.wso2.carbon.device.mgt.mobile.dto.MobileDevice; @@ -33,7 +36,7 @@ import java.util.List; /** * This represents the Windows implementation of DeviceManagerService. */ -public class WindowsDeviceManager implements DeviceManager { +public class WindowsDeviceManager implements DeviceMgtService { private MobileDeviceManagementDAOFactory mobileDeviceManagementDAOFactory; @@ -114,4 +117,9 @@ public class WindowsDeviceManager implements DeviceManager { return status; } + @Override + public void installApplication(Operation operation, List deviceIdentifiers) + throws AppManagerConnectorException { + + } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/internal/MobileDeviceManagementBundleActivator.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/internal/MobileDeviceManagementBundleActivator.java index e2482e692..ba1149454 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/internal/MobileDeviceManagementBundleActivator.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/internal/MobileDeviceManagementBundleActivator.java @@ -28,7 +28,6 @@ import org.wso2.carbon.device.mgt.mobile.config.MobileDeviceManagementConfig; import org.wso2.carbon.device.mgt.mobile.config.datasource.MobileDataSourceConfig; import org.wso2.carbon.device.mgt.mobile.dao.MobileDeviceManagementDAOFactory; import org.wso2.carbon.device.mgt.mobile.impl.android.AndroidDeviceManager; -import org.wso2.carbon.device.mgt.mobile.impl.ios.IOSDeviceManager; import org.wso2.carbon.device.mgt.mobile.impl.windows.WindowsDeviceManager; import java.util.ArrayList; @@ -41,7 +40,6 @@ import java.util.Map; public class MobileDeviceManagementBundleActivator implements BundleActivator, BundleListener { private ServiceRegistration androidServiceRegRef; - private ServiceRegistration iOSServiceRegRef; private ServiceRegistration windowsServiceRegRef; private static List dataSourceListeners = @@ -70,9 +68,6 @@ public class MobileDeviceManagementBundleActivator implements BundleActivator, B androidServiceRegRef = bundleContext.registerService(DeviceManager.class.getName(), new AndroidDeviceManager(), null); - iOSServiceRegRef = - bundleContext.registerService(DeviceManager.class.getName(), - new IOSDeviceManager(), null); windowsServiceRegRef = bundleContext.registerService(DeviceManager.class.getName(), new WindowsDeviceManager(), null); @@ -92,7 +87,6 @@ public class MobileDeviceManagementBundleActivator implements BundleActivator, B } try { androidServiceRegRef.unregister(); - iOSServiceRegRef.unregister(); windowsServiceRegRef.unregister(); bundleContext.removeBundleListener(this); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/internal/MobileDeviceManagementServiceComponent.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/internal/MobileDeviceManagementServiceComponent.java index 2c47e5bff..9f8228e46 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/internal/MobileDeviceManagementServiceComponent.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/internal/MobileDeviceManagementServiceComponent.java @@ -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.impl.android.AndroidDeviceManager; 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.ndatasource.core.DataSourceService; @@ -59,7 +57,6 @@ public class MobileDeviceManagementServiceComponent { private ServiceRegistration serverStartupObserverRef; private ServiceRegistration androidServiceRegRef; - private ServiceRegistration iOSServiceRegRef; private ServiceRegistration windowsServiceRegRef; private static final Log log = LogFactory.getLog(MobileDeviceManagementServiceComponent.class); @@ -78,8 +75,7 @@ public class MobileDeviceManagementServiceComponent { Map dsConfigMap = config.getMobileDeviceMgtRepository().getMobileDataSourceConfigMap(); MobileDeviceManagementDAOFactory.setMobileDataSourceConfigMap(dsConfigMap); - IOSDAOFactory.init(dsConfigMap.get(DeviceManagementConstants.MobileDeviceTypes. - MOBILE_DEVICE_TYPE_IOS)); + AndroidDAOFactory .init(dsConfigMap.get(DeviceManagementConstants.MobileDeviceTypes. MOBILE_DEVICE_TYPE_ANDROID)); @@ -105,8 +101,6 @@ public class MobileDeviceManagementServiceComponent { androidServiceRegRef = bundleContext.registerService(DeviceManager.class.getName(), new AndroidDeviceManager(), null); - iOSServiceRegRef = - bundleContext.registerService(DeviceManager.class.getName(), new IOSDeviceManager(), null); windowsServiceRegRef = bundleContext.registerService(DeviceManager.class.getName(), new WindowsDeviceManager(), null); @@ -126,9 +120,6 @@ public class MobileDeviceManagementServiceComponent { if (androidServiceRegRef != null) { androidServiceRegRef.unregister(); } - if (iOSServiceRegRef != null) { - iOSServiceRegRef.unregister(); - } if (windowsServiceRegRef != null) { windowsServiceRegRef.unregister(); }