From 7ebb6fba4d8d458eece79d1dfe9986d459d01d58 Mon Sep 17 00:00:00 2001 From: prabathabey Date: Thu, 4 Dec 2014 18:29:59 +0530 Subject: [PATCH] Fixing mobile related implementations of DeviceManagerService SPI to be able to support newly added getProviderType method --- .../impl/android/AndroidDeviceManagerService.java | 9 ++++++++- .../mgt/mobile/impl/ios/IOSDeviceManagerService.java | 10 +++++++++- .../impl/windows/WindowsDeviceManagerService.java | 12 ++++++++++-- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidDeviceManagerService.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidDeviceManagerService.java index 74a046cba..aa10e1886 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidDeviceManagerService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/AndroidDeviceManagerService.java @@ -27,7 +27,14 @@ import java.util.List; */ public class AndroidDeviceManagerService implements DeviceManagerService { - @Override + private static final String DEVICE_MANAGER_ANDROID = "android"; + + @Override + public String getProviderType() { + return DEVICE_MANAGER_ANDROID; + } + + @Override public void enrollDevice(Device device) throws DeviceManagementException { } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/ios/IOSDeviceManagerService.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/ios/IOSDeviceManagerService.java index 1907f2636..cf174c5cf 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/ios/IOSDeviceManagerService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/ios/IOSDeviceManagerService.java @@ -26,7 +26,15 @@ import java.util.List; * This represents the iOS implementation of DeviceManagerService. * */ public class IOSDeviceManagerService implements DeviceManagerService { - @Override + + private static final String DEVICE_MANAGER_IOS = "ios"; + + @Override + public String getProviderType() { + return DEVICE_MANAGER_IOS; + } + + @Override public void enrollDevice(Device device) throws DeviceManagementException { } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManagerService.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManagerService.java index 98a339448..9efa62bb0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManagerService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/windows/WindowsDeviceManagerService.java @@ -25,8 +25,16 @@ import java.util.List; /** * This represents the Windows implementation of DeviceManagerService. */ -public class WindowsDeviceManagerService implements DeviceManagerService{ - @Override +public class WindowsDeviceManagerService implements DeviceManagerService { + + private static final String DEVICE_MANAGER_WINDOWS = "windows"; + + @Override + public String getProviderType() { + return DEVICE_MANAGER_WINDOWS; + } + + @Override public void enrollDevice(Device device) throws DeviceManagementException { }