projects
/
pnews.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cleanup and refactored to move to net.wpitchoune package
[pnews.git]
/
war
/
src
/
main
/
java
/
pnews
/
servlet
/
JSON.java
diff --git
a/war/src/main/java/pnews/servlet/JSON.java
b/war/src/main/java/pnews/servlet/JSON.java
index
13509ed
..
78379a4
100644
(file)
--- a/
war/src/main/java/pnews/servlet/JSON.java
+++ b/
war/src/main/java/pnews/servlet/JSON.java
@@
-9,8
+9,10
@@
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.rometools.rome.io.FeedException;
import com.google.gson.JsonObject;
import com.rometools.rome.io.FeedException;
-import pnews.Article;
-import pnews.Category;
+import net.wpitchoune.pnews.Article;
+import net.wpitchoune.pnews.ArticleStore;
+import net.wpitchoune.pnews.Category;
+import net.wpitchoune.pnews.Config;
public class JSON {
private static final Logger LOG = Logger.getLogger(JSON.class.getName());
public class JSON {
private static final Logger LOG = Logger.getLogger(JSON.class.getName());
@@
-30,15
+32,15
@@
public class JSON {
allArticles = ArticleStore.singleton.getArticles();
for (Article a: allArticles)
allArticles = ArticleStore.singleton.getArticles();
for (Article a: allArticles)
- if (a.
readCount.ge
t() > 0)
- jreadcounts.addProperty(a.
link, a.readCount
);
+ if (a.
getReadCoun
t() > 0)
+ jreadcounts.addProperty(a.
getLink(), a.getReadCount()
);
jcategories = new JsonObject();
jstats.add("categories", jcategories);
for (Category cat: config.getCategories())
try {
jcategories = new JsonObject();
jstats.add("categories", jcategories);
for (Category cat: config.getCategories())
try {
- articles = provider.getArticles(cat);
+ articles = provider.getArticles(cat
, null
);
jcategories.addProperty(cat.getLabel(),
articles.size());
} catch (IllegalArgumentException | FeedException | IOException e) {
jcategories.addProperty(cat.getLabel(),
articles.size());
} catch (IllegalArgumentException | FeedException | IOException e) {