/*
- * Sone - ViewSonePage.java - Copyright © 2010 David Roden
+ * Sone - ViewSonePage.java - Copyright © 2010–2012 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
package net.pterodactylus.sone.web;
+import java.net.URI;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Set;
import net.pterodactylus.sone.data.Post;
-import net.pterodactylus.sone.data.Reply;
+import net.pterodactylus.sone.data.PostReply;
import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.sone.template.SoneAccessor;
import net.pterodactylus.sone.web.page.FreenetRequest;
Pagination<Post> postPagination = new Pagination<Post>(sonePosts, webInterface.getCore().getPreferences().getPostsPerPage()).setPage(Numbers.safeParseInteger(request.getHttpRequest().getParam("postPage"), 0));
templateContext.set("postPagination", postPagination);
templateContext.set("posts", postPagination.getItems());
- Set<Reply> replies = sone.getReplies();
- final Map<Post, List<Reply>> repliedPosts = new HashMap<Post, List<Reply>>();
- for (Reply reply : replies) {
+ Set<PostReply> replies = sone.getReplies();
+ final Map<Post, List<PostReply>> repliedPosts = new HashMap<Post, List<PostReply>>();
+ for (PostReply reply : replies) {
Post post = reply.getPost();
if (repliedPosts.containsKey(post) || sone.equals(post.getSone()) || (sone.equals(post.getRecipient()))) {
continue;
templateContext.set("repliedPosts", repliedPostPagination.getItems());
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isLinkExcepted(URI link) {
+ return true;
+ }
+
}