@Override public void addComment(Long newsItemId, String commenter, String content) { NewsItem newsItem = newsItemRepository.obtainNewsItemById(newsItemId); newsItem.addComment(commenter, content); }
@Override public void createNewsItem( String author, Date publicationDate, String title, String introduction, String item) { NewsItem newsItem = new NewsItem(author, publicationDate, title, introduction, item); newsItemRepository.addNewsItem(newsItem); }
@Override public NewsItem obtainNewsItem(Long newsId) { return newsItemRepository.obtainNewsItemById(newsId); }
@Override public List<NewsItem> listAllNewsItems() { return newsItemRepository.listAllNewsItems(); }