/** The logger. */
private static final Logger logger = Logging.getLogger(Core.class);
- /** The start time. */
- private final long startupTime = System.currentTimeMillis();
-
/** The options. */
private final Options options = new Options();
//
/**
- * Returns the time Sone was started.
- *
- * @return The startup time (in milliseconds since Jan 1, 1970 UTC)
- */
- public long getStartupTime() {
- return startupTime;
- }
-
- /**
* Sets the configuration to use. This will automatically save the current
* configuration to the given configuration.
*
}
}
- /**
- * Returns whether the target Sone is trusted by the origin Sone.
- *
- * @param origin
- * The origin Sone
- * @param target
- * The target Sone
- * @return {@code true} if the target Sone is trusted by the origin Sone
- */
- public boolean isSoneTrusted(Sone origin, Sone target) {
- checkNotNull(origin, "origin must not be null");
- checkNotNull(target, "target must not be null");
- checkArgument(origin.getIdentity() instanceof OwnIdentity, "origin’s identity must be an OwnIdentity");
- return trustedIdentities.containsEntry(origin.getIdentity(), target.getIdentity());
- }
-
@Override
public Optional<PostReply> getPostReply(String replyId) {
return database.getPostReply(replyId);
}
/**
- * Bookmarks the given post.
- *
- * @param post
- * The post to bookmark
- */
- public void bookmark(Post post) {
- bookmarkPost(post.getId());
- }
-
- /**
* Bookmarks the post with the given ID.
*
* @param id
*
* @param image
* The image to delete
- * @see #deleteTemporaryImage(TemporaryImage)
+ * @see #deleteTemporaryImage(String)
*/
public void deleteImage(Image image) {
checkNotNull(image, "image must not be null");
}
/**
- * Deletes the given temporary image.
- *
- * @param temporaryImage
- * The temporary image to delete
- */
- public void deleteTemporaryImage(TemporaryImage temporaryImage) {
- checkNotNull(temporaryImage, "temporaryImage must not be null");
- deleteTemporaryImage(temporaryImage.getId());
- }
-
- /**
* Deletes the temporary image with the given ID.
*
* @param imageId