+++ /dev/null
-/*
- * Sone - ImageBuilderFactory.java - Copyright © 2013 David Roden
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.sone.database;
-
-/**
- * Factory for {@link ImageBuilder}s.
- *
- * @author <a href="mailto:d.roden@xplosion.de">David Roden</a>
- */
-public interface ImageBuilderFactory {
-
- ImageBuilder newImageBuilder();
-
-}
package net.pterodactylus.sone.database;
+import java.util.List;
+
+import net.pterodactylus.sone.data.Album;
import net.pterodactylus.sone.data.Image;
+import com.google.common.base.Optional;
+
/**
- * Combines an {@link ImageProvider}, an {@link ImageBuilderFactory}, and an
- * {@link ImageStore} into an image database.
+ * Database for handling {@link Image}s.
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
-public interface ImageDatabase extends ImageProvider, ImageStore {
+public interface ImageDatabase {
+
+ Optional<Image> getImage(String imageId);
+ List<Image> getImages(Album parent);
void moveUp(Image image);
void moveDown(Image image);
+ void storeImage(Image image);
+ void removeImage(Image image);
}
+++ /dev/null
-/*
- * Sone - ImageProvider.java - Copyright © 2013 David Roden
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.sone.database;
-
-import java.util.List;
-
-import net.pterodactylus.sone.data.Album;
-import net.pterodactylus.sone.data.Image;
-
-import com.google.common.base.Optional;
-
-/**
- * Provides {@link Image}.
- *
- * @author <a href="mailto:d.roden@xplosion.de">David Roden</a>
- */
-public interface ImageProvider {
-
- Optional<Image> getImage(String imageId);
-
- List<Image> getImages(Album parent);
-
-}
+++ /dev/null
-/*
- * Sone - ImageStore.java - Copyright © 2013 David Roden
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.sone.database;
-
-import net.pterodactylus.sone.data.Image;
-
-/**
- * Manages {@link Image} storage.
- *
- * @author <a href="mailto:d.roden@xplosion.de">David Roden</a>
- */
-public interface ImageStore {
-
- void storeImage(Image image);
-
- void removeImage(Image image);
-
-}