Example #1
0
 @Override
 public void addComment(Long newsItemId, String commenter, String content) {
   NewsItem newsItem = newsItemRepository.obtainNewsItemById(newsItemId);
   newsItem.addComment(commenter, content);
 }
Example #2
0
 @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);
 }
Example #3
0
 @Override
 public NewsItem obtainNewsItem(Long newsId) {
   return newsItemRepository.obtainNewsItemById(newsId);
 }
Example #4
0
 @Override
 public List<NewsItem> listAllNewsItems() {
   return newsItemRepository.listAllNewsItems();
 }