Package net.pterodactylus.sone.database

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


          /* TODO - parse time correctly. */
          postBuilder.withId(postId).from(sone.getId()).withTime(Long.parseLong(postTime)).withText(postText);
          if ((postRecipientId != null) && (postRecipientId.length() == 43)) {
            postBuilder.to(postRecipientId);
          }
          posts.add(postBuilder.build());
        } catch (NumberFormatException nfe1) {
          /* TODO - mark Sone as bad. */
          logger.log(Level.WARNING, String.format("Downloaded post for Sone %s with invalid time: %s", sone, postTime));
          return null;
        }
View Full Code Here


      }
      PostBuilder postBuilder = postBuilder().withId(postId).from(sone.getId()).withTime(postTime).withText(postText);
      if ((postRecipientId != null) && (postRecipientId.length() == 43)) {
        postBuilder.to(postRecipientId);
      }
      posts.add(postBuilder.build());
    }

    /* load replies. */
    Set<PostReply> replies = new HashSet<PostReply>();
    while (true) {
View Full Code Here

    PostBuilder postBuilder = database.newPostBuilder();
    postBuilder.from(sone.getId()).randomId().withTime(time).withText(text.trim());
    if (recipient.isPresent()) {
      postBuilder.to(recipient.get().getId());
    }
    final Post post = postBuilder.build();
    database.storePost(post);
    eventBus.post(new NewPostFoundEvent(post));
    sone.addPost(post);
    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.