/** * Convert unicast notification. * * @param unicastNotification the unicast notification * @return the notification dto */ private NotificationDto convertUnicastNotification(EndpointNotificationDto unicastNotification) { NotificationDto dto = unicastNotification.getNotificationDto(); dto.setId(unicastNotification.getId()); return dto; }
LOG.trace("[{}] notification expiration time is {}({}) which is later then {}", endpointId, date.getTime(), date, now); notificationDto.setId(unicastNotification.getId()); notifications.add(notificationDto);
@Override public UpdateNotificationDto<NotificationDto> saveNotification(NotificationDto dto) { validateObject(dto, "Can't save notification. Invalid notification object"); dto.setId(null); UpdateNotificationDto<NotificationDto> updateNotificationDto = null; String schemaId = dto.getSchemaId();
@Override public NotificationDto toDto() { NotificationDto dto = new NotificationDto(); dto.setId(id); dto.setApplicationId(applicationId); dto.setSchemaId(schemaId); dto.setTopicId(topicId); dto.setLastTimeModify(lastModifyTime); dto.setNfVersion(nfVersion); dto.setType(type); dto.setBody(getArrayCopy(body)); dto.setExpiredAt(expiredAt); dto.setSecNum(secNum); return dto; } }
@Override public NotificationDto toDto() { NotificationDto dto = new NotificationDto(); dto.setId(getStringId()); dto.setApplicationId(applicationId); dto.setSchemaId(schemaId); dto.setTopicId(topicId); dto.setLastTimeModify(lastModifyTime); dto.setNfVersion(nfVersion); dto.setType(type); dto.setBody(body != null ? getBytes(body) : null); dto.setExpiredAt(expiredAt); dto.setSecNum(seqNum); return dto; }
throw new IncorrectParameterException("Invalid endpointKeyHash: " + endpointKeyHash); notificationDto.setId(null); notificationDto.setTopicId(topicId); notificationDto.setSecNum(-1);