X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fsearchable%2FBasicSearchable.java;h=1e5e9da67298e37874600f449700db154f0b1786;hb=refs%2Fheads%2Fsearch;hp=ebc509611856b0a6f6d699a64c7a96592a68428a;hpb=70ee499b74323435ac7ac7dc8676d42c2e9048db;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/searchable/BasicSearchable.java b/src/be/nikiroo/fanfix/searchable/BasicSearchable.java index ebc5096..1e5e9da 100644 --- a/src/be/nikiroo/fanfix/searchable/BasicSearchable.java +++ b/src/be/nikiroo/fanfix/searchable/BasicSearchable.java @@ -85,6 +85,20 @@ public abstract class BasicSearchable { */ abstract public void fillTag(SearchableTag tag) throws IOException; + /** + * Search for the given term and return the number of pages of results of + * stories satisfying this search term. + * + * @param search + * the term to search for + * + * @return a number of pages + * + * @throws IOException + * in case of I/O error + */ + abstract public int searchPages(String search) throws IOException; + /** * Search for the given term and return a list of stories satisfying this * search term. @@ -96,13 +110,16 @@ public abstract class BasicSearchable { * * @param search * the term to search for + * @param page + * the page to use for result pagination, index is 1-based * * @return a list of stories that satisfy that search term * * @throws IOException * in case of I/O error */ - abstract public List search(String search) throws IOException; + abstract public List search(String search, int page) + throws IOException; /** * Search for the given tag and return a list of stories satisfying this @@ -113,7 +130,7 @@ public abstract class BasicSearchable { *

* URL is guaranteed to be usable, LUID will always be NULL. * - * @param tagId + * @param tag * the tag to search for * @param page * the page to use for result pagination (see