diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceEnrollmentInfoNotification.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceEnrollmentInfoNotification.java index f4b10218a1c..2d2e846c1f4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceEnrollmentInfoNotification.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceEnrollmentInfoNotification.java @@ -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; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceNotification.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceNotification.java index 46238b9a53c..d376344939d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceNotification.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/DeviceNotification.java @@ -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; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java index 37851dbb1c0..06794514dfc 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java @@ -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);