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/AndroidDeviceManagementService.java similarity index 91% rename from components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidDeviceManager.java rename to components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidDeviceManagementService.java index d5a37f84e..50aee44f7 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/AndroidDeviceManagementService.java @@ -21,10 +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.app.mgt.Application; +import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException; 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.common.spi.DeviceManagementService; 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; @@ -37,12 +37,12 @@ import java.util.List; /** * This represents the Android implementation of DeviceManagerService. */ -public class AndroidDeviceManager implements DeviceMgtService { +public class AndroidDeviceManagementService implements DeviceManagementService { private MobileDeviceManagementDAOFactory mobileDeviceManagementDAOFactory; - private static final Log log = LogFactory.getLog(AndroidDeviceManager.class); + private static final Log log = LogFactory.getLog(AndroidDeviceManagementService.class); - public AndroidDeviceManager() { + public AndroidDeviceManagementService() { mobileDeviceManagementDAOFactory = new AndroidDAOFactory(); } @@ -259,9 +259,27 @@ public class AndroidDeviceManager implements DeviceMgtService { return devices; } + @Override + public Application[] getApplications(String s, int i, int i2) throws ApplicationManagementException { + return new Application[0]; + } + + @Override + public void updateApplicationStatus(DeviceIdentifier deviceIdentifier, Application application, + String s) throws ApplicationManagementException { + + } + + @Override + public String getApplicationStatus(DeviceIdentifier deviceIdentifier, + Application application) throws ApplicationManagementException { + return null; + } + @Override public void installApplication(Operation operation, List deviceIdentifiers) - throws AppManagerConnectorException { + throws ApplicationManagementException { } + } 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/WindowsDeviceManagementService.java similarity index 77% rename from components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManager.java rename to components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManagementService.java index 1ceb7b128..f5b1e4960 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/WindowsDeviceManagementService.java @@ -21,10 +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.app.mgt.Application; +import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException; 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.common.spi.DeviceManagementService; 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; @@ -36,14 +36,14 @@ import java.util.List; /** * This represents the Windows implementation of DeviceManagerService. */ -public class WindowsDeviceManager implements DeviceMgtService { +public class WindowsDeviceManagementService implements DeviceManagementService { private MobileDeviceManagementDAOFactory mobileDeviceManagementDAOFactory; - public WindowsDeviceManager() { + public WindowsDeviceManagementService() { mobileDeviceManagementDAOFactory = new WindowsDAOFactory(); } - private static final Log log = LogFactory.getLog(WindowsDeviceManager.class); + private static final Log log = LogFactory.getLog(WindowsDeviceManagementService.class); @Override public String getProviderType() { @@ -123,8 +123,26 @@ public class WindowsDeviceManager implements DeviceMgtService { } @Override - public void installApplication(Operation operation, List deviceIdentifiers) - throws AppManagerConnectorException { + public Application[] getApplications(String s, int i, int i2) throws ApplicationManagementException { + return new Application[0]; + } + + @Override + public void updateApplicationStatus(DeviceIdentifier deviceIdentifier, + Application application, String s) throws ApplicationManagementException { + + } + + @Override + public String getApplicationStatus(DeviceIdentifier deviceIdentifier, + Application application) throws ApplicationManagementException { + return null; + } + + @Override + public void installApplication(Operation operation, + List deviceIdentifiers) throws ApplicationManagementException { } + } 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 34bcdf307..1e4d930f1 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 @@ -23,22 +23,17 @@ import org.apache.commons.logging.LogFactory; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceRegistration; import org.osgi.service.component.ComponentContext; -import org.wso2.carbon.device.mgt.common.DeviceManagementConstants; -import org.wso2.carbon.device.mgt.common.spi.DeviceMgtService; +import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; import org.wso2.carbon.device.mgt.mobile.common.MobileDeviceMgtPluginException; -import org.wso2.carbon.device.mgt.mobile.common.MobilePluginConstants; import org.wso2.carbon.device.mgt.mobile.config.MobileDeviceConfigurationManager; 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.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.windows.WindowsDeviceManager; -import org.wso2.carbon.device.mgt.mobile.impl.windows.dao.WindowsDAOFactory; +import org.wso2.carbon.device.mgt.mobile.impl.android.AndroidDeviceManagementService; +import org.wso2.carbon.device.mgt.mobile.impl.windows.WindowsDeviceManagementService; import org.wso2.carbon.ndatasource.core.DataSourceService; -import javax.sql.DataSource; import java.util.Map; /** @@ -99,9 +94,11 @@ public class MobileDeviceManagementServiceComponent { } androidServiceRegRef = - bundleContext.registerService(DeviceMgtService.class.getName(), new AndroidDeviceManager(), null); + bundleContext.registerService(DeviceManagementService.class.getName(), + new AndroidDeviceManagementService(), null); windowsServiceRegRef = - bundleContext.registerService(DeviceMgtService.class.getName(), new WindowsDeviceManager(), null); + bundleContext.registerService(DeviceManagementService.class.getName(), + new WindowsDeviceManagementService(), null); if (log.isDebugEnabled()) { log.debug("Mobile Device Management Service Component has been successfully activated");