*/
public List<Reply> getReplies(Post post) {
Set<Sone> sones = getSones();
+ @SuppressWarnings("hiding")
List<Reply> replies = new ArrayList<Reply>();
for (Sone sone : sones) {
for (Reply reply : sone.getReplies()) {
* @return All bookmarked posts
*/
public Set<Post> getBookmarkedPosts() {
+ @SuppressWarnings("hiding")
Set<Post> posts = new HashSet<Post>();
synchronized (bookmarkedPosts) {
for (String bookmarkedPostId : bookmarkedPosts) {
/* initialize options. */
sone.getOptions().addBooleanOption("AutoFollow", new DefaultOption<Boolean>(false));
+ sone.getOptions().addBooleanOption("EnableSoneInsertNotifications", new DefaultOption<Boolean>(false));
/* load Sone. */
String sonePrefix = "Sone/" + sone.getId();
}
/* load posts. */
+ @SuppressWarnings("hiding")
Set<Post> posts = new HashSet<Post>();
while (true) {
String postPrefix = sonePrefix + "/Posts/" + posts.size();
}
/* load replies. */
+ @SuppressWarnings("hiding")
Set<Reply> replies = new HashSet<Reply>();
while (true) {
String replyPrefix = sonePrefix + "/Replies/" + replies.size();
/* load options. */
sone.getOptions().getBooleanOption("AutoFollow").set(configuration.getBooleanValue(sonePrefix + "/Options/AutoFollow").getValue(null));
+ sone.getOptions().getBooleanOption("EnableSoneInsertNotifications").set(configuration.getBooleanValue(sonePrefix + "/Options/EnableSoneInsertNotifications").getValue(null));
/* if we’re still here, Sone was loaded successfully. */
synchronized (sone) {
/* save options. */
configuration.getBooleanValue(sonePrefix + "/Options/AutoFollow").setValue(sone.getOptions().getBooleanOption("AutoFollow").getReal());
+ configuration.getBooleanValue(sonePrefix + "/Options/EnableSoneInsertNotifications").setValue(sone.getOptions().getBooleanOption("EnableSoneInsertNotifications").getReal());
configuration.save();
logger.log(Level.INFO, "Sone %s saved.", sone);