X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FSone.java;h=441112a99f1a78cd84aa58e0e72724ab9db29f23;hb=df0abbdc635a8b927474515bb100882e6d850336;hp=e64a388f14959cf67b984662bab02e76f1d67112;hpb=a80191ba660bd732bbd852197cd2d10f619af9d6;p=Sone.git
diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java
index e64a388..441112a 100644
--- a/src/main/java/net/pterodactylus/sone/data/Sone.java
+++ b/src/main/java/net/pterodactylus/sone/data/Sone.java
@@ -35,6 +35,7 @@ import net.pterodactylus.sone.freenet.wot.Identity;
import net.pterodactylus.sone.freenet.wot.OwnIdentity;
import net.pterodactylus.sone.template.SoneAccessor;
+import com.google.common.base.Optional;
import freenet.keys.FreenetURI;
import com.google.common.base.Function;
@@ -47,7 +48,7 @@ import com.google.common.primitives.Ints;
*
* @author David âBombeâ Roden
*/
-public interface Sone extends Identified, Fingerprintable, Comparable {
+public interface Sone extends Fingerprintable, Comparable {
/**
* Enumeration for the possible states of a {@link Sone}.
@@ -188,6 +189,15 @@ public interface Sone extends Identified, Fingerprintable, Comparable {
}
};
+ Function> toAllPosts = new Function>() {
+ @Override
+ public Collection apply(@Nullable Sone sone) {
+ return (sone != null) ? sone.getPosts() : Collections.emptyList();
+ }
+ };
+
+ String getId();
+
/**
* Returns the identity of this Sone.
*
@@ -502,6 +512,7 @@ public interface Sone extends Identified, Fingerprintable, Comparable {
* @return The root album of this Sone
*/
Album getRootAlbum();
+ Optional getImageByInternalId(final String internalId);
/**
* Returns Sone-specific options.