merge-requests/7/head
harshanl 8 years ago
commit 6554368bfa

@ -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 + '\'' +
'}';
}

@ -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;
}
}

@ -19,7 +19,7 @@
<tr data-type="selectable" data-id="{{id}}">
<td data-display="{{description}}" data-grid-label="Description">{{description}}</td>
<td style="text-align: center;">
<a href="device?type={{deviceIdentifier.type}}&id={{deviceIdentifier.id}}" data-id="{{id}}" data-url="device/{{deviceIdentifier.type}}?id={{deviceIdentifier.id}}" class="new-notification" data-click-event="remove-form">
<a href="device/{{deviceType}}?id={{deviceIdentifier}}" data-id="{{id}}" data-url="device/{{deviceType}}?id={{deviceIdentifier}}" class="new-notification" data-click-event="remove-form">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-view fw-stack-1x"></i>
@ -57,7 +57,7 @@
<tr data-type="selectable" data-id="{{id}}">
<td data-display="{{description}}" data-grid-label="Description">{{description}}</td>
<td style="text-align: center;">
<a href="device?type={{deviceIdentifier.type}}&id={{deviceIdentifier.id}}" data-click-event="remove-form">
<a href="device/{{deviceType}}?id={{deviceIdentifier}}" data-click-event="remove-form">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-view fw-stack-1x"></i>

Loading…
Cancel
Save