fixing formatting issues

revert-dabc3590
Hasunie 7 years ago
parent 792cfeea79
commit eed8293ea5

@ -231,7 +231,7 @@ public class OperationHandler {
}
}
public void updateDisenrollOperation(DeviceIdentifier deviceIdentifier) throws OperationManagementException {
public void updateDisenrollOperationStatus(DeviceIdentifier deviceIdentifier) throws OperationManagementException {
List<? extends Operation> pendingDeviceInfoOperations;
try {
pendingDeviceInfoOperations = WindowsAPIUtils.getPendingOperations(deviceIdentifier);

@ -390,12 +390,10 @@ public class EnrollmentServiceImpl implements EnrollmentService {
deviceInfoProperties.setValue(windowsDevice.getWindowsType());
String deviceInfo = gson.toJson(deviceInfoProperties);
Device.Property winDeviceType = new Device.Property();
winDeviceType.setName(PluginConstants.SyncML.DEVICE_INFO);
winDeviceType.setValue(deviceInfo);
List<Device.Property> propertyList = new ArrayList<>();
propertyList.add(OSVersionProperty);
propertyList.add(IMSEIProperty);
@ -407,7 +405,6 @@ public class EnrollmentServiceImpl implements EnrollmentService {
enrolmentInfo.setOwnership(EnrolmentInfo.OwnerShip.BYOD);
enrolmentInfo.setStatus(EnrolmentInfo.Status.ACTIVE);
generatedDevice.setEnrolmentInfo(enrolmentInfo);
generatedDevice.setDeviceIdentifier(windowsDevice.getDeviceId());
generatedDevice.setProperties(propertyList);

@ -140,7 +140,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
syncmlDocument, pendingOperations)).build();
} else {
if (WindowsAPIUtils.getDeviceManagementService().getDevice(deviceIdentifier, false) != null) {
operationHandler.updateDisenrollOperation(deviceIdentifier);
operationHandler.updateDisenrollOperationStatus(deviceIdentifier);
WindowsAPIUtils.getDeviceManagementService().disenrollDevice(deviceIdentifier);
return Response.ok().entity(operationReply.generateReply(syncmlDocument, null)).build();
} else {

Loading…
Cancel
Save