removed device Id from notification bean

revert-dabc3590
ayyoob 9 years ago
parent bf1e00f472
commit 61d88f77b6

@ -145,10 +145,9 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
notification.setOperationId(operation.getId());
notification.setStatus(org.wso2.carbon.device.mgt.common.notification.mgt.Notification.
Status.NEW.toString());
notification.setDeviceIdentifier(id);
notification.setDescription("Operation " + operation.getCode() + " failed to execute on device " +
deviceName + ". Device ID : " + deviceId);
AndroidAPIUtils.getNotificationManagementService().addNotification(notification);
AndroidAPIUtils.getNotificationManagementService().addNotification(id, notification);
}
if (log.isDebugEnabled()) {
log.debug("Updating operation '" + operation.toString() + "'");

@ -87,10 +87,9 @@ public class OperationUtils {
Notification lockResetNotification = new Notification();
lockResetNotification.setOperationId(status.getCommandReference());
lockResetNotification.setStatus(String.valueOf(Notification.Status.NEW));
lockResetNotification.setDeviceIdentifier(deviceIdentifier);
lockResetNotification.setDescription(
Constants.SyncMLResponseCodes.LOCKRESET_NOTIFICATION);
nmService.addNotification(lockResetNotification);
nmService.addNotification(deviceIdentifier, lockResetNotification);
} catch (NotificationManagementException e) {
throw new WindowsOperationException("Failure occurred in getting notification service", e);
}
@ -156,10 +155,9 @@ public class OperationUtils {
Notification lockResetNotification = new Notification();
lockResetNotification.setOperationId(status.getCommandReference());
lockResetNotification.setStatus(String.valueOf(Notification.Status.NEW));
lockResetNotification.setDeviceIdentifier(deviceIdentifier);
lockResetNotification.setDescription(Constants.SyncMLResponseCodes.LOCKRESET_NOTIFICATION);
nmService.addNotification(lockResetNotification);
nmService.addNotification(deviceIdentifier, lockResetNotification);
} catch (NotificationManagementException e) {
String msg = "Failure occurred in getting notification service";
log.error(msg, e);
@ -404,10 +402,9 @@ public class OperationUtils {
Notification notification = new Notification();
notification.setDescription("Auto generated DevicePin : " + pinValue);
notification.setOperationId(result.getCommandReference());
notification.setDeviceIdentifier(deviceIdentifier);
notification.setStatus(String.valueOf(Notification.Status.NEW));
try {
nmService.addNotification(notification);
nmService.addNotification(deviceIdentifier, notification);
} catch (NotificationManagementException e) {
String msg = "Failure Occurred in getting notification service.";
log.error(msg, e);

Loading…
Cancel
Save