Package net.pterodactylus.sone.database

Examples of net.pterodactylus.sone.database.PostReplyBuilder.build()


        }
        try {
          PostReplyBuilder postReplyBuilder = core.postReplyBuilder();
          /* TODO - parse time correctly. */
          postReplyBuilder.withId(replyId).from(sone.getId()).to(replyPostId).withTime(Long.parseLong(replyTime)).withText(replyText);
          replies.add(postReplyBuilder.build());
        } catch (NumberFormatException nfe1) {
          /* TODO - mark Sone as bad. */
          logger.log(Level.WARNING, String.format("Downloaded reply for Sone %s with invalid time: %s", sone, replyTime));
          return null;
        }
View Full Code Here


      if ((postId == null) || (replyTime == 0) || (replyText == null)) {
        logger.log(Level.WARNING, "Invalid reply found, aborting load!");
        return;
      }
      PostReplyBuilder postReplyBuilder = postReplyBuilder().withId(replyId).from(sone.getId()).to(postId).withTime(replyTime).withText(replyText);
      replies.add(postReplyBuilder.build());
    }

    /* load post likes. */
    Set<String> likedPostIds = new HashSet<String>();
    while (true) {
View Full Code Here

      logger.log(Level.FINE, String.format("Tried to create reply for non-local Sone: %s", sone));
      return null;
    }
    PostReplyBuilder postReplyBuilder = postReplyBuilder();
    postReplyBuilder.randomId().from(sone.getId()).to(post.getId()).currentTime().withText(text.trim());
    final PostReply reply = postReplyBuilder.build();
    database.storePostReply(reply);
    eventBus.post(new NewPostReplyFoundEvent(reply));
    sone.addReply(reply);
    touchConfiguration();
    localElementTicker.schedule(new Runnable() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.