mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Merge pull request #286 from ayyoob/rest-api-improvements
removed device Id from notification bean
This commit is contained in:
commit
bb5de7c174
@ -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…
Reference in New Issue
Block a user