From de7e87af626ac49dedb6844effd68e0c1cd68c54 Mon Sep 17 00:00:00 2001 From: Dilshan Edirisuriya Date: Thu, 19 Feb 2015 19:02:30 +0530 Subject: [PATCH] Modify Enrollment implemented --- .../mobile/impl/ios/IOSDeviceManagerService.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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 0fa0a2e4e..d39bc806d 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 @@ -59,7 +59,21 @@ public class IOSDeviceManagerService implements DeviceManagerService { @Override public boolean modifyEnrollment(Device device) throws DeviceManagementException { - return true; + boolean status; + MobileDevice mobileDevice = MobileDeviceManagementUtil.convertToMobileDevice(device); + try { + if (log.isDebugEnabled()) { + log.debug("Modifying the iOS device enrollment data"); + } + status = MobileDeviceManagementDAOFactory.getMobileDeviceDAO() + .updateMobileDevice(mobileDevice); + } catch (MobileDeviceManagementDAOException e) { + String msg = "Error while updating the enrollment of the iOS device : " + + device.getDeviceIdentifier(); + log.error(msg, e); + throw new DeviceManagementException(msg, e); + } + return status; } @Override