Add method to create a new album to Sone.
[Sone.git] / src / main / java / net / pterodactylus / sone / data / impl / DefaultSone.java
index f519ffa..61bd530 100644 (file)
@@ -36,6 +36,7 @@ import net.pterodactylus.sone.data.PostReply;
 import net.pterodactylus.sone.data.Profile;
 import net.pterodactylus.sone.data.Reply;
 import net.pterodactylus.sone.data.Sone;
+import net.pterodactylus.sone.database.AlbumBuilder;
 import net.pterodactylus.sone.freenet.wot.Identity;
 import net.pterodactylus.util.logging.Logging;
 
@@ -104,7 +105,7 @@ public class DefaultSone implements Sone {
        private final Set<String> likedReplyIds = new CopyOnWriteArraySet<String>();
 
        /** The root album containing all albums. */
-       private final Album rootAlbum = new DefaultAlbum(this, null);
+       private final DefaultAlbum rootAlbum = new DefaultAlbum(this, null);
 
        /** Sone-specific options. */
        private Options options = new Options();
@@ -664,6 +665,11 @@ public class DefaultSone implements Sone {
                this.options = options;
        }
 
+       @Override
+       public AlbumBuilder newAlbumBuilder() {
+               return new DefaultAlbumBuilder(this, rootAlbum);
+       }
+
        //
        // FINGERPRINTABLE METHODS
        //