mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
removed device Id from notification bean
This commit is contained in:
parent
bf1e00f472
commit
61d88f77b6
@ -145,10 +145,9 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
|
|||||||
notification.setOperationId(operation.getId());
|
notification.setOperationId(operation.getId());
|
||||||
notification.setStatus(org.wso2.carbon.device.mgt.common.notification.mgt.Notification.
|
notification.setStatus(org.wso2.carbon.device.mgt.common.notification.mgt.Notification.
|
||||||
Status.NEW.toString());
|
Status.NEW.toString());
|
||||||
notification.setDeviceIdentifier(id);
|
|
||||||
notification.setDescription("Operation " + operation.getCode() + " failed to execute on device " +
|
notification.setDescription("Operation " + operation.getCode() + " failed to execute on device " +
|
||||||
deviceName + ". Device ID : " + deviceId);
|
deviceName + ". Device ID : " + deviceId);
|
||||||
AndroidAPIUtils.getNotificationManagementService().addNotification(notification);
|
AndroidAPIUtils.getNotificationManagementService().addNotification(id, notification);
|
||||||
}
|
}
|
||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
log.debug("Updating operation '" + operation.toString() + "'");
|
log.debug("Updating operation '" + operation.toString() + "'");
|
||||||
|
|||||||
@ -87,10 +87,9 @@ public class OperationUtils {
|
|||||||
Notification lockResetNotification = new Notification();
|
Notification lockResetNotification = new Notification();
|
||||||
lockResetNotification.setOperationId(status.getCommandReference());
|
lockResetNotification.setOperationId(status.getCommandReference());
|
||||||
lockResetNotification.setStatus(String.valueOf(Notification.Status.NEW));
|
lockResetNotification.setStatus(String.valueOf(Notification.Status.NEW));
|
||||||
lockResetNotification.setDeviceIdentifier(deviceIdentifier);
|
|
||||||
lockResetNotification.setDescription(
|
lockResetNotification.setDescription(
|
||||||
Constants.SyncMLResponseCodes.LOCKRESET_NOTIFICATION);
|
Constants.SyncMLResponseCodes.LOCKRESET_NOTIFICATION);
|
||||||
nmService.addNotification(lockResetNotification);
|
nmService.addNotification(deviceIdentifier, lockResetNotification);
|
||||||
} catch (NotificationManagementException e) {
|
} catch (NotificationManagementException e) {
|
||||||
throw new WindowsOperationException("Failure occurred in getting notification service", e);
|
throw new WindowsOperationException("Failure occurred in getting notification service", e);
|
||||||
}
|
}
|
||||||
@ -156,10 +155,9 @@ public class OperationUtils {
|
|||||||
Notification lockResetNotification = new Notification();
|
Notification lockResetNotification = new Notification();
|
||||||
lockResetNotification.setOperationId(status.getCommandReference());
|
lockResetNotification.setOperationId(status.getCommandReference());
|
||||||
lockResetNotification.setStatus(String.valueOf(Notification.Status.NEW));
|
lockResetNotification.setStatus(String.valueOf(Notification.Status.NEW));
|
||||||
lockResetNotification.setDeviceIdentifier(deviceIdentifier);
|
|
||||||
lockResetNotification.setDescription(Constants.SyncMLResponseCodes.LOCKRESET_NOTIFICATION);
|
lockResetNotification.setDescription(Constants.SyncMLResponseCodes.LOCKRESET_NOTIFICATION);
|
||||||
|
|
||||||
nmService.addNotification(lockResetNotification);
|
nmService.addNotification(deviceIdentifier, lockResetNotification);
|
||||||
} catch (NotificationManagementException e) {
|
} catch (NotificationManagementException e) {
|
||||||
String msg = "Failure occurred in getting notification service";
|
String msg = "Failure occurred in getting notification service";
|
||||||
log.error(msg, e);
|
log.error(msg, e);
|
||||||
@ -404,10 +402,9 @@ public class OperationUtils {
|
|||||||
Notification notification = new Notification();
|
Notification notification = new Notification();
|
||||||
notification.setDescription("Auto generated DevicePin : " + pinValue);
|
notification.setDescription("Auto generated DevicePin : " + pinValue);
|
||||||
notification.setOperationId(result.getCommandReference());
|
notification.setOperationId(result.getCommandReference());
|
||||||
notification.setDeviceIdentifier(deviceIdentifier);
|
|
||||||
notification.setStatus(String.valueOf(Notification.Status.NEW));
|
notification.setStatus(String.valueOf(Notification.Status.NEW));
|
||||||
try {
|
try {
|
||||||
nmService.addNotification(notification);
|
nmService.addNotification(deviceIdentifier, notification);
|
||||||
} catch (NotificationManagementException e) {
|
} catch (NotificationManagementException e) {
|
||||||
String msg = "Failure Occurred in getting notification service.";
|
String msg = "Failure Occurred in getting notification service.";
|
||||||
log.error(msg, e);
|
log.error(msg, e);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user