mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Improve the payload of enrollment notification
This commit is contained in:
parent
e852c62663
commit
7975563530
@ -19,10 +19,6 @@ package org.wso2.carbon.device.mgt.common;
|
|||||||
|
|
||||||
public class DeviceEnrollmentInfoNotification {
|
public class DeviceEnrollmentInfoNotification {
|
||||||
|
|
||||||
/***
|
|
||||||
* Enrollment Id
|
|
||||||
*/
|
|
||||||
private int id;
|
|
||||||
/***
|
/***
|
||||||
* Enrollment timestamp
|
* Enrollment timestamp
|
||||||
*/
|
*/
|
||||||
@ -44,14 +40,6 @@ public class DeviceEnrollmentInfoNotification {
|
|||||||
*/
|
*/
|
||||||
private String owner;
|
private String owner;
|
||||||
|
|
||||||
public int getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(int id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getDateOfEnrolment() {
|
public Long getDateOfEnrolment() {
|
||||||
return dateOfEnrolment;
|
return dateOfEnrolment;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,7 @@ public class DeviceNotification {
|
|||||||
|
|
||||||
|
|
||||||
@XmlAttribute(name = "id")
|
@XmlAttribute(name = "id")
|
||||||
private int deviceId;
|
private String identifier;
|
||||||
@XmlElement(name = "name")
|
@XmlElement(name = "name")
|
||||||
private String deviceName;
|
private String deviceName;
|
||||||
@XmlElement(name = "type")
|
@XmlElement(name = "type")
|
||||||
@ -40,10 +40,10 @@ public class DeviceNotification {
|
|||||||
|
|
||||||
public 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,
|
DevicePropertyNotification devicePropertyNotification,
|
||||||
DeviceEnrollmentInfoNotification deviceEnrollmentInfoNotification) {
|
DeviceEnrollmentInfoNotification deviceEnrollmentInfoNotification) {
|
||||||
this.deviceId = deviceId;
|
this.identifier = identifier;
|
||||||
this.deviceName = deviceName;
|
this.deviceName = deviceName;
|
||||||
this.deviceType = deviceType;
|
this.deviceType = deviceType;
|
||||||
this.description = description;
|
this.description = description;
|
||||||
|
|||||||
@ -2947,14 +2947,13 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
DeviceEnrollmentInfoNotification deviceEnrollmentInfoNotification = new DeviceEnrollmentInfoNotification();
|
DeviceEnrollmentInfoNotification deviceEnrollmentInfoNotification = new DeviceEnrollmentInfoNotification();
|
||||||
deviceEnrollmentInfoNotification.setId(device.getEnrolmentInfo().getId());
|
|
||||||
deviceEnrollmentInfoNotification.setOwner(device.getEnrolmentInfo().getOwner());
|
deviceEnrollmentInfoNotification.setOwner(device.getEnrolmentInfo().getOwner());
|
||||||
deviceEnrollmentInfoNotification.setDateOfEnrolment(device.getEnrolmentInfo().getDateOfEnrolment());
|
deviceEnrollmentInfoNotification.setDateOfEnrolment(device.getEnrolmentInfo().getDateOfEnrolment());
|
||||||
deviceEnrollmentInfoNotification.setDateOfLastUpdate(device.getEnrolmentInfo().getDateOfLastUpdate());
|
deviceEnrollmentInfoNotification.setDateOfLastUpdate(device.getEnrolmentInfo().getDateOfLastUpdate());
|
||||||
deviceEnrollmentInfoNotification.setOwnership(device.getEnrolmentInfo().getOwnership().toString());
|
deviceEnrollmentInfoNotification.setOwnership(device.getEnrolmentInfo().getOwnership().toString());
|
||||||
deviceEnrollmentInfoNotification.setStatus(device.getEnrolmentInfo().getStatus().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,
|
device.getType(), device.getDescription(), devicePropertyNotification,
|
||||||
deviceEnrollmentInfoNotification);
|
deviceEnrollmentInfoNotification);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user