diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/notification/mgt/Notification.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/notification/mgt/Notification.java index c5c2656fc62..3a383b19dc9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/notification/mgt/Notification.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/notification/mgt/Notification.java @@ -21,7 +21,6 @@ package org.wso2.carbon.device.mgt.common.notification.mgt; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.wso2.carbon.device.mgt.common.DeviceIdentifier; /** * DTO of Notification object which is used to communicate Operation notifications to MDM core. @@ -58,6 +57,16 @@ public class Notification { "CHECKED: The message is in the read state.", required = true) private Status status; + @JsonProperty(value = "deviceIdentifier", required = false) + @ApiModelProperty(name = "deviceIdentifier", value = "Defines the device ID related to the notification.", + required = false) + private String deviceIdentifier; + + @JsonProperty(value = "devieType", required = false) + @ApiModelProperty(name = "devieType", value = "Defines the device type related to the notification.", + required = false) + private String deviceType; + public Status getStatus() { return status; } @@ -90,6 +99,22 @@ public class Notification { this.operationId = operationId; } + public String getDeviceIdentifier() { + return deviceIdentifier; + } + + public void setDeviceIdentifier(String deviceIdentifier) { + this.deviceIdentifier = deviceIdentifier; + } + + public String getDevcieType() { + return deviceType; + } + + public void setDeviceType(String devieType) { + this.deviceType = devieType; + } + @Override public String toString() { return "notification {" + @@ -97,6 +122,8 @@ public class Notification { ", status=" + status + ", description='" + description + '\'' + ", operationId='" + operationId + '\'' + + ", deviceIdentifier='" + deviceIdentifier + '\'' + + ", deviceType='" + deviceType + '\'' + '}'; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/notification/mgt/dao/util/NotificationDAOUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/notification/mgt/dao/util/NotificationDAOUtil.java index 36f7df6be0a..daa5c37d29c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/notification/mgt/dao/util/NotificationDAOUtil.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/notification/mgt/dao/util/NotificationDAOUtil.java @@ -131,6 +131,8 @@ public class NotificationDAOUtil { notification.setOperationId(rs.getInt("OPERATION_ID")); notification.setDescription(rs.getString("DESCRIPTION")); notification.setStatus(rs.getString("STATUS")); + notification.setDeviceIdentifier(rs.getString("DEVICE_IDENTIFICATION")); + notification.setDeviceType(rs.getString("DEVICE_TYPE")); return notification; } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.notification.listing/public/templates/notification-listing.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.notification.listing/public/templates/notification-listing.hbs index 39d96b17e8b..4f98c03e9be 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.notification.listing/public/templates/notification-listing.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.notification.listing/public/templates/notification-listing.hbs @@ -19,7 +19,7 @@