From ece43f53bd523a7df6bb8bb6663e7c5142aa3bc2 Mon Sep 17 00:00:00 2001 From: hasuniea Date: Fri, 23 Sep 2016 22:06:14 +0530 Subject: [PATCH] fixing windows issues --- .../public/js/operation-mod.js | 6 +++--- .../pom.xml | 5 ----- .../windows/api/operations/util/OperationHandler.java | 10 ++++------ 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-mod/public/js/operation-mod.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-mod/public/js/operation-mod.js index 09d23212ff..735e05321e 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-mod/public/js/operation-mod.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-mod/public/js/operation-mod.js @@ -1195,9 +1195,9 @@ var operationModule = function () { var featureMap = { "DEVICE_LOCK": "lock-devices", "DISENROLL": "disenroll", - "DEVICE_RING": "ring-devices", - "LOCK_RESET": "lock-reset-devices", - "WIPE_DATA": "wipe-devices" + "DEVICE_RING": "ring-device", + "LOCK_RESET": "lock-reset", + "WIPE_DATA": "wipe-data" }; //return "/mdm-windows-agent/services/windows/operation/" + featureMap[operationCode]; return "/api/device-mgt/windows/v1.0/services/windows/admin/devices/" + featureMap[operationCode]; diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml index ffd0170867..046ffce88c 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/pom.xml @@ -236,7 +236,6 @@ commons-codec commons-codec - provided joda-time @@ -254,12 +253,10 @@ org.testng testng - test org.wso2.carbon org.wso2.carbon.logging - provided @@ -345,13 +342,11 @@ org.codehaus.jettison.wso2 jettison 1.1.wso2v1 - provided org.json.wso2 json 2.0.0.wso2v1 - provided io.swagger diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/OperationHandler.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/OperationHandler.java index 3e050f7eed..4b1bbaa7bd 100644 --- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/OperationHandler.java +++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.api/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/api/operations/util/OperationHandler.java @@ -353,7 +353,7 @@ public class OperationHandler { for (ItemTag item : results) { for (OperationCode.Info info : OperationCode.Info.values()) { if (item.getSource().getLocURI().equals(info.getCode()) && - PluginConstants.OperationCodes.CAMERA_STATUS.equals(info.name())) { + PluginConstants.OperationCodes.CAMERA_STATUS.equals(info.name())) { Profile cameraProfile = new Profile(); cameraProfile.setFeatureCode(PluginConstants.OperationCodes.CAMERA); cameraProfile.setData(item.getData()); @@ -365,7 +365,7 @@ public class OperationHandler { profiles.add(cameraProfile); } if (item.getSource().getLocURI().equals(info.getCode()) && - PluginConstants.OperationCodes.ENCRYPT_STORAGE_STATUS.equals(info.name())) { + PluginConstants.OperationCodes.ENCRYPT_STORAGE_STATUS.equals(info.name())) { Profile encryptStorage = new Profile(); encryptStorage.setFeatureCode(PluginConstants.OperationCodes.ENCRYPT_STORAGE); encryptStorage.setData(item.getData()); @@ -377,7 +377,7 @@ public class OperationHandler { profiles.add(encryptStorage); } if (item.getSource().getLocURI().equals(info.getCode()) && - PluginConstants.OperationCodes.DEVICE_PASSWORD_STATUS.equals(info.name())) { + PluginConstants.OperationCodes.DEVICE_PASSWORD_STATUS.equals(info.name())) { Profile encryptStorage = new Profile(); encryptStorage.setFeatureCode(PluginConstants.OperationCodes.PASSCODE_POLICY); encryptStorage.setData(item.getData()); @@ -394,7 +394,6 @@ public class OperationHandler { Notification notification = new Notification(); notification.setDescription("Auto generated DevicePin : " + pinValue); notification.setOperationId(result.getCommandReference()); -// notification.setDeviceIdentifier(deviceIdentifier); notification.setStatus(String.valueOf(Notification.Status.NEW)); try { nmService.addNotification(deviceIdentifier, notification); @@ -476,7 +475,7 @@ public class OperationHandler { } } WindowsAPIUtils.getPolicyManagerService().checkPolicyCompliance(deviceIdentifier, - complianceFeatures); + complianceFeatures); } } catch (JSONException e) { throw new WindowsOperationException("Error occurred while parsing json object.", e); @@ -486,6 +485,5 @@ public class OperationHandler { throw new WindowsOperationException("Error occurred while getting effective policy.", e); } } - } }