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