class NoteService {

  @Transactional
  public void deleteNote(Long noteId, User user) {
    Note note = findById(noteId);

    noteRepository.deleteById(noteId);

    activityService.createActivity(user, note, Action.DELETED);
    logger.info("Deleted Note with id " + noteId);
  }

  @Autowired public  NoteService(NoteRepository noteRepository, ActivityService activityService);

}