package chainOfResponsibility;
import java.
util.
logging.
Logger;
public class NewsPage {
DAO_I data;
public NewsPage(DAO_I data) {
super();
this.data = data;
}
public void Draw() {
try {
News latest = data.GetLatestNews();
DrawHeader(latest);
Logger.
getLogger("root").
warning("ошибка выборки последних новостей");
}
List<News> allNews = data.
GetAllNews(new Date());
for (Iterator<News> iter = allNews.iterator(); iter.hasNext();) {
News one = iter.next();
// ...
}
}
protected void DrawHeader(News latest) {
// ...
}
}