Improve the payload of enrollment notification

revert-70aa11f8
lasanthaDLPDS 6 years ago
parent e852c62663
commit 7975563530

@ -19,10 +19,6 @@ package org.wso2.carbon.device.mgt.common;
public class DeviceEnrollmentInfoNotification {
/***
* Enrollment Id
*/
private int id;
/***
* Enrollment timestamp
*/
@ -44,14 +40,6 @@ public class DeviceEnrollmentInfoNotification {
*/
private String owner;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public Long getDateOfEnrolment() {
return dateOfEnrolment;
}

@ -26,7 +26,7 @@ public class DeviceNotification {
@XmlAttribute(name = "id")
private int deviceId;
private String identifier;
@XmlElement(name = "name")
private String deviceName;
@XmlElement(name = "type")
@ -40,10 +40,10 @@ public class DeviceNotification {
public DeviceNotification(){}
public DeviceNotification(int deviceId, String deviceName, String deviceType, String description,
public DeviceNotification(String identifier, String deviceName, String deviceType, String description,
DevicePropertyNotification devicePropertyNotification,
DeviceEnrollmentInfoNotification deviceEnrollmentInfoNotification) {
this.deviceId = deviceId;
this.identifier = identifier;
this.deviceName = deviceName;
this.deviceType = deviceType;
this.description = description;

@ -2947,14 +2947,13 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
}
}
DeviceEnrollmentInfoNotification deviceEnrollmentInfoNotification = new DeviceEnrollmentInfoNotification();
deviceEnrollmentInfoNotification.setId(device.getEnrolmentInfo().getId());
deviceEnrollmentInfoNotification.setOwner(device.getEnrolmentInfo().getOwner());
deviceEnrollmentInfoNotification.setDateOfEnrolment(device.getEnrolmentInfo().getDateOfEnrolment());
deviceEnrollmentInfoNotification.setDateOfLastUpdate(device.getEnrolmentInfo().getDateOfLastUpdate());
deviceEnrollmentInfoNotification.setOwnership(device.getEnrolmentInfo().getOwnership().toString());
deviceEnrollmentInfoNotification.setStatus(device.getEnrolmentInfo().getStatus().toString());
DeviceNotification deviceNotification = new DeviceNotification(device.getId(), device.getName(),
DeviceNotification deviceNotification = new DeviceNotification(device.getDeviceIdentifier(), device.getName(),
device.getType(), device.getDescription(), devicePropertyNotification,
deviceEnrollmentInfoNotification);

Loading…
Cancel
Save