Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
 private String loadSubArticleHtml(String pageRef, OperationObserver observer) {
   return articlePagesCache.load(pageRef, observer);
 }
Ejemplo n.º 3
0
 public void clearSubArticle(SubArticleRef subArticleRef) {
   articlePagesCache.delete(subArticleRef.getPageRef());
 }
Ejemplo n.º 4
0
 public void clearArticle(ArticleRef articleRef) {
   articlePagesCache.delete(articleRef.getPageRef());
 }