/** * Convert notification. * * @param notificationDto the notification dto * @return the notification */ private static Notification convertNotification(NotificationDto notificationDto) { Notification notification = new Notification(); notification.setBody(ByteBuffer.wrap(notificationDto.getBody())); notification.setTopicId(notificationDto.getTopicId()); switch (notificationDto.getType()) { case SYSTEM: notification.setType(NotificationType.SYSTEM); break; case USER: notification.setType(NotificationType.CUSTOM); break; default: break; } if (notificationDto.getSecNum() >= 0) { notification.setSeqNumber(notificationDto.getSecNum()); } else { // unicast notification notification.setUid(notificationDto.getId()); } return notification; }