| org.blojsom.fetcher.Fetcher
All known Subclasses: org.blojsom.fetcher.database.DatabaseFetcher,
Fetcher | public interface Fetcher (Code) | | Fetcher
author: David Czarnecki since: blojsom 3.0 version: $Id: Fetcher.java,v 1.20 2007/01/17 02:35:17 czarneckid Exp $ |
Method Summary | |
public Integer | countEntries(Blog blog) | public void | deleteBlog(Blog blog) | public void | deleteCategory(Blog blog, Category category) | public void | deleteComment(Blog blog, Comment comment) | public void | deleteEntry(Blog blog, Entry entry) | public void | deletePingback(Blog blog, Pingback pingback) | public void | deleteTrackback(Blog blog, Trackback trackback) | public void | deleteUser(Blog blog, Integer userID) | public void | destroy() | public Category[] | fetchCategories(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Blog blog, String flavor, Map context) | public Entry[] | fetchEntries(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Blog blog, String flavor, Map context) Fetch a set of
Entry objects. | public Entry[] | findEntries(Blog blog, String query) | public Entry[] | findEntriesBetweenDates(Blog blog, Date startDate, Date endDate) | public Entry[] | findEntriesByMetadataKeyValue(Blog blog, String metadataKey, String metadataValue, boolean pre, boolean post) | public Entry[] | findEntriesWithMetadataKey(Blog blog, String metadataKey) | public List | findResponsesByQuery(Blog blog, String query) Find the responses (comments, trackbacks, pingbacks) for a given
Blog matching some query
Parameters: blog - Blog Parameters: query - Query which will match on various items such as commenter name, e-mail, IP address, etc. | public List | findResponsesByStatus(Blog blog, String[] status) | public User[] | getUsers(Blog blog) | public void | init() Initialize this fetcher. | public Category[] | loadAllCategories(Blog blog) | public Entry[] | loadAllEntriesForCategory(Blog blog, Integer categoryId) | public Blog | loadBlog(String blogId) | public Blog | loadBlog(Integer id) | public String[] | loadBlogIDs() | public Category | loadCategory(Blog blog, Integer categoryId) | public Category | loadCategory(Blog blog, String name) | public void | loadCategory(Blog blog, Category category) | public void | loadComment(Blog blog, Comment comment) | public Entry[] | loadEntries(Blog blog, int pageSize, int page) | public Entry[] | loadEntries(int pageSize, int page, Category specificCategory, Category[] defaultCategories) | public Entry[] | loadEntriesForCategory(Blog blog, Integer categoryId, Integer limit) | public Entry | loadEntry(Blog blog, Integer entryId) | public Entry | loadEntry(Blog blog, String postSlug) | public void | loadEntry(Blog blog, Entry entry) | public void | loadPingback(Blog blog, Pingback pingback) | public Pingback | loadPingback(Blog blog, String sourceURI, String targetURI) | public List | loadRecentComments(Blog blog) | public List | loadRecentPingbacks(Blog blog) | public List | loadRecentTrackbacks(Blog blog) | public void | loadTrackback(Blog blog, Trackback trackback) | public User | loadUser(Blog blog, String userLogin) | public User | loadUser(Blog blog, Integer userID) | public Blog | newBlog() | public Category | newCategory() | public Comment | newComment() | public Entry | newEntry() | public Pingback | newPingback() | public Trackback | newTrackback() | public User | newUser() | public void | saveBlog(Blog blog) | public void | saveCategory(Blog blog, Category category) | public void | saveComment(Blog blog, Comment comment) | public void | saveEntry(Blog blog, Entry entry) | public void | savePingback(Blog blog, Pingback pingback) | public void | saveTrackback(Blog blog, Trackback trackback) | public User | saveUser(Blog blog, User user) |
fetchCategories | public Category[] fetchCategories(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Blog blog, String flavor, Map context) throws FetcherException(Code) | | Fetch a set of
Category objects
Parameters: httpServletRequest - Request Parameters: httpServletResponse - Response Parameters: blog - Blog instance Parameters: flavor - Flavor Parameters: context - Context Blog categories retrieved for the particular request throws: FetcherException - If there is an error retrieving the blog categories for the request |
fetchEntries | public Entry[] fetchEntries(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Blog blog, String flavor, Map context) throws FetcherException(Code) | | Fetch a set of
Entry objects.
Parameters: httpServletRequest - Request Parameters: httpServletResponse - Response Parameters: blog - Blog instance Parameters: flavor - Flavor Parameters: context - Context Blog entries retrieved for the particular request throws: FetcherException - If there is an error retrieving the blog entries for the request |
findEntries | public Entry[] findEntries(Blog blog, String query) throws FetcherException(Code) | | Find entries which have the search query in their title or description
Parameters: blog - Blog Parameters: query - Search query Blog entries which have the search query in their title or descirption throws: FetcherException - If there is an error searching through entries |
findEntriesBetweenDates | public Entry[] findEntriesBetweenDates(Blog blog, Date startDate, Date endDate) throws FetcherException(Code) | | Find entries between a start and end date
Parameters: blog - Blog Parameters: startDate - Start date Parameters: endDate - End date Entries between a start and end date throws: FetcherException - If there is an error searching for entries between the dates |
findEntriesByMetadataKeyValue | public Entry[] findEntriesByMetadataKeyValue(Blog blog, String metadataKey, String metadataValue, boolean pre, boolean post) throws FetcherException(Code) | | Find entries by a metadata key/value pair
Parameters: blog - Blog Parameters: metadataKey - Metadata key Parameters: metadataValue - Metadata value Parameters: pre - If the search should use % before the metadata value (match anything before) Parameters: post - If the search should use % after the metadata value (match antthing after) Entries matching metadata key and value using LIKE syntax for metadata value throws: FetcherException - If there is an error searching through entries |
findEntriesWithMetadataKey | public Entry[] findEntriesWithMetadataKey(Blog blog, String metadataKey) throws FetcherException(Code) | | Find entries with a given metadata key
Parameters: blog - Blog Parameters: metadataKey - Metadata key Entries with the given metadata key throws: FetcherException - If there is an error searching through entries |
findResponsesByQuery | public List findResponsesByQuery(Blog blog, String query) throws FetcherException(Code) | | Find the responses (comments, trackbacks, pingbacks) for a given
Blog matching some query
Parameters: blog - Blog Parameters: query - Query which will match on various items such as commenter name, e-mail, IP address, etc. List of responses (comments, trackbacks, pingbacks) matching query throws: FetcherException - If there is an error loading the responses |
findResponsesByStatus | public List findResponsesByStatus(Blog blog, String[] status) throws FetcherException(Code) | | Find the responses (comments, trackbacks, pingbacks) for a given
Blog matching one of a set of status codes
Parameters: blog - Blog Parameters: status - List of status codes to search List of responses (comments, trackbacks, pingbacks) matching one of a set of status codes throws: FetcherException - If there is an error loading the responses |
getUsers | public User[] getUsers(Blog blog)(Code) | | Retrieve the users for a given blog
Parameters: blog - Blog List of Users for a blog |
init | public void init() throws FetcherException(Code) | | Initialize this fetcher. This method only called when the fetcher is instantiated.
throws: FetcherException - If there is an error initializing the fetcher |
loadAllEntriesForCategory | public Entry[] loadAllEntriesForCategory(Blog blog, Integer categoryId) throws FetcherException(Code) | | Load all the entries for a given category
Parameters: blog - Blog Parameters: categoryId - Category ID Blog entries for a given category throws: FetcherException - If there is an error loading the entries |
loadEntries | public Entry[] loadEntries(Blog blog, int pageSize, int page) throws FetcherException(Code) | | Load a set of entries using a given page size and page in which to retrieve the entries
Parameters: blog - Blog Parameters: pageSize - Page size Parameters: page - Page Blog entries throws: FetcherException - If there is an error loading the entries |
loadEntries | public Entry[] loadEntries(int pageSize, int page, Category specificCategory, Category[] defaultCategories) throws FetcherException(Code) | | Load a set of entries using a given page size and page in which to retrieve the entries
Parameters: pageSize - Page size Parameters: page - Page Parameters: specificCategory - Category Parameters: defaultCategories - Default categories to use for requesting entries from the blogs Blog entries throws: FetcherException - If there is an error loading the entries |
loadEntriesForCategory | public Entry[] loadEntriesForCategory(Blog blog, Integer categoryId, Integer limit) throws FetcherException(Code) | | Load all the entries for a given category
Parameters: blog - Blog Parameters: categoryId - Category ID Parameters: limit - Limit on number of entries to return Blog entries for a given category throws: FetcherException - If there is an error loading the entries |
loadPingback | public Pingback loadPingback(Blog blog, String sourceURI, String targetURI) throws FetcherException(Code) | | Load a pingback given the source URI and target URI
Parameters: blog - Blog Parameters: sourceURI - Source URI Parameters: targetURI - Target URI Pingback given the source and target URIs or null if not found throws: FetcherException - If there was an erorr loading the pingback |
loadRecentComments | public List loadRecentComments(Blog blog) throws FetcherException(Code) | | Load the recent comments for a blog
Parameters: blog - Blog List of recent comment throws: FetcherException - If there is an error retrieving the recent comments |
loadRecentPingbacks | public List loadRecentPingbacks(Blog blog) throws FetcherException(Code) | | Load the recent pingbacks for a blog
Parameters: blog - Blog List of recent pingbacks throws: FetcherException - If there is an error retrieving the recent pingbacks |
loadRecentTrackbacks | public List loadRecentTrackbacks(Blog blog) throws FetcherException(Code) | | Load the recent trackbacks for a blog
Parameters: blog - Blog List of recent trackbacks throws: FetcherException - If there is an error retrieving the recent trackbacks |
newEntry | public Entry newEntry()(Code) | | Return a new
Entry instance
Blog entry instance |
|
|