fixing windows issues

merge-requests/1/head
hasuniea 8 years ago
parent 7697c3ca39
commit ece43f53bd

@ -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];

@ -236,7 +236,6 @@
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>joda-time</groupId>
@ -254,12 +253,10 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.logging</artifactId>
<scope>provided</scope>
</dependency>
<!--CDM dependancies-->
@ -345,13 +342,11 @@
<groupId>org.codehaus.jettison.wso2</groupId>
<artifactId>jettison</artifactId>
<version>1.1.wso2v1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.json.wso2</groupId>
<artifactId>json</artifactId>
<version>2.0.0.wso2v1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.swagger</groupId>

@ -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);
}
}
}
}

Loading…
Cancel
Save