X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Flibrary%2FBasicLibrary.java;h=78d20d654afee85ec8e1f0826abd156576fe821e;hb=efdbabcde03fdcdac05c917e1fbc671d621a93a3;hp=8ec4e5620655ad148fb6b4b47b2c16d0f4284ee8;hpb=97b36d32a43b7fbbd4938c95c4b40db0c68daa71;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/library/BasicLibrary.java b/src/be/nikiroo/fanfix/library/BasicLibrary.java index 8ec4e56..78d20d6 100644 --- a/src/be/nikiroo/fanfix/library/BasicLibrary.java +++ b/src/be/nikiroo/fanfix/library/BasicLibrary.java @@ -119,6 +119,31 @@ abstract public class BasicLibrary { return null; } + /** + * Return the cover image associated to this author. + *
+ * By default, return the custom cover if any, and if not, return the cover
+ * of the first story with this author.
+ *
+ * @param author
+ * the author
+ *
+ * @return the cover image or NULL
+ */
+ public Image getAuthorCover(String author) {
+ Image custom = getCustomAuthorCover(author);
+ if (custom != null) {
+ return custom;
+ }
+
+ List
@@ -134,7 +159,21 @@ abstract public class BasicLibrary {
}
/**
- * Fix the source cover to the given story cover.
+ * Return the custom cover image associated to this author.
+ *
+ * By default, return NULL.
+ *
+ * @param author
+ * the author to look for
+ *
+ * @return the custom cover or NULL if none
+ */
+ public Image getCustomAuthorCover(@SuppressWarnings("unused") String author) {
+ return null;
+ }
+
+ /**
+ * Set the source cover to the given story cover.
*
* @param source
* the source to change
@@ -143,6 +182,16 @@ abstract public class BasicLibrary {
*/
public abstract void setSourceCover(String source, String luid);
+ /**
+ * Set the author cover to the given story cover.
+ *
+ * @param source
+ * the author to change
+ * @param luid
+ * the story LUID
+ */
+ public abstract void setAuthorCover(String author, String luid);
+
/**
* Return the list of stories (represented by their {@link MetaData}, which
* MAY not have the cover included).