From ef95ac4621dd98aafc97b8ba74242e8d6869ed83 Mon Sep 17 00:00:00 2001 From: prabathabey Date: Fri, 5 Dec 2014 13:28:32 +0530 Subject: [PATCH] Making all the implementations of DeviceManagerService interface compatible with the changes introduced into the same --- .../android/AndroidDeviceManagerService.java | 56 +++++++++---------- .../impl/ios/IOSDeviceManagerService.java | 56 +++++++++---------- .../windows/WindowsDeviceManagerService.java | 56 +++++++++---------- 3 files changed, 81 insertions(+), 87 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 aa10e18869..754a0a1bba 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 @@ -17,6 +17,7 @@ package org.wso2.carbon.device.mgt.mobile.impl.android; import org.wso2.carbon.device.mgt.common.Device; +import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.spi.DeviceManagerService; @@ -44,42 +45,39 @@ public class AndroidDeviceManagerService implements DeviceManagerService { } - @Override - public void disEnrollDevice(String type, String deviceId) - throws DeviceManagementException { + @Override + public void disenrollDevice(DeviceIdentifier deviceId) throws DeviceManagementException { - } + } - @Override - public boolean isRegistered(String type, String deviceId) - throws DeviceManagementException { - return false; - } + @Override + public boolean isRegistered(DeviceIdentifier deviceId) throws DeviceManagementException { + return false; + } - @Override - public boolean isActive(String type, String deviceId) - throws DeviceManagementException { - return false; - } + @Override + public boolean isActive(DeviceIdentifier deviceId) throws DeviceManagementException { + return false; + } - @Override - public void setActive(boolean status) throws DeviceManagementException { + @Override + public void setActive(boolean status) throws DeviceManagementException { - } + } - @Override - public List getAllDeviceInfo(String type) throws DeviceManagementException { - return null; - } + @Override + public List getAllDevices(String type) throws DeviceManagementException { + return null; + } - @Override - public Device getDeviceInfo(String type, String deviceId) - throws DeviceManagementException { - return null; - } + @Override + public Device getDevice(DeviceIdentifier deviceId) throws DeviceManagementException { + return null; + } - @Override - public void setOwnership(String ownershipType) throws DeviceManagementException { + @Override + public void setOwnership(DeviceIdentifier deviceId, String ownershipType) 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 cf174c5cf2..7f2226d713 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 @@ -17,6 +17,7 @@ package org.wso2.carbon.device.mgt.mobile.impl.ios; import org.wso2.carbon.device.mgt.common.Device; +import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.spi.DeviceManagerService; @@ -44,42 +45,39 @@ public class IOSDeviceManagerService implements DeviceManagerService { } - @Override - public void disEnrollDevice(String type, String deviceId) - throws DeviceManagementException { + @Override + public void disenrollDevice(DeviceIdentifier deviceId) throws DeviceManagementException { - } + } - @Override - public boolean isRegistered(String type, String deviceId) - throws DeviceManagementException { - return false; - } + @Override + public boolean isRegistered(DeviceIdentifier deviceId) throws DeviceManagementException { + return false; + } - @Override - public boolean isActive(String type, String deviceId) - throws DeviceManagementException { - return false; - } + @Override + public boolean isActive(DeviceIdentifier deviceId) throws DeviceManagementException { + return false; + } - @Override - public void setActive(boolean status) throws DeviceManagementException { + @Override + public void setActive(boolean status) throws DeviceManagementException { - } + } - @Override - public List getAllDeviceInfo(String type) throws DeviceManagementException { - return null; - } + @Override + public List getAllDevices(String type) throws DeviceManagementException { + return null; + } - @Override - public Device getDeviceInfo(String type, String deviceId) - throws DeviceManagementException { - return null; - } + @Override + public Device getDevice(DeviceIdentifier deviceId) throws DeviceManagementException { + return null; + } - @Override - public void setOwnership(String ownershipType) throws DeviceManagementException { + @Override + public void setOwnership(DeviceIdentifier deviceId, String ownershipType) 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 9efa62bb02..575219c901 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 @@ -17,6 +17,7 @@ package org.wso2.carbon.device.mgt.mobile.impl.windows; import org.wso2.carbon.device.mgt.common.Device; +import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.spi.DeviceManagerService; @@ -44,42 +45,39 @@ public class WindowsDeviceManagerService implements DeviceManagerService { } - @Override - public void disEnrollDevice(String type, String deviceId) - throws DeviceManagementException { + @Override + public void disenrollDevice(DeviceIdentifier deviceId) throws DeviceManagementException { - } + } - @Override - public boolean isRegistered(String type, String deviceId) - throws DeviceManagementException { - return false; - } + @Override + public boolean isRegistered(DeviceIdentifier deviceId) throws DeviceManagementException { + return false; + } - @Override - public boolean isActive(String type, String deviceId) - throws DeviceManagementException { - return false; - } + @Override + public boolean isActive(DeviceIdentifier deviceId) throws DeviceManagementException { + return false; + } - @Override - public void setActive(boolean status) throws DeviceManagementException { + @Override + public void setActive(boolean status) throws DeviceManagementException { - } + } - @Override - public List getAllDeviceInfo(String type) throws DeviceManagementException { - return null; - } + @Override + public List getAllDevices(String type) throws DeviceManagementException { + return null; + } - @Override - public Device getDeviceInfo(String type, String deviceId) - throws DeviceManagementException { - return null; - } + @Override + public Device getDevice(DeviceIdentifier deviceId) throws DeviceManagementException { + return null; + } - @Override - public void setOwnership(String ownershipType) throws DeviceManagementException { + @Override + public void setOwnership(DeviceIdentifier deviceId, String ownershipType) throws DeviceManagementException { + + } - } }