Пример #1
0
 public Article loadArticle(ArticleRef ref, OperationObserver observer) throws ParseException {
   String html = articlePagesCache.loadFromCache(ref.getPageRef(), observer);
   if (html != null) {
     Article article = TestDe.parseArticle(ref, html);
     if (!article.containsLockedSubArticles()) return article;
     if (loginDataProvider.getLoginData() == null) return article;
     if (!TestDe.http.isInternetAvailable()) return article;
     articlePagesCache.delete(ref.getPageRef());
   }
   loginIfAvailable(observer);
   html = articlePagesCache.load(ref.getPageRef(), observer);
   return TestDe.parseArticle(ref, html);
 }