org.blojsom.fetcher
Interface BlojsomFetcher

All Known Implementing Classes:
StandardFetcher

public interface BlojsomFetcher

BlojsomFetcher

Since:
blojsom 1.8
Version:
$Id: BlojsomFetcher.java,v 1.7 2006/01/04 16:59:54 czarneckid Exp $
Author:
David Czarnecki

Field Summary
static java.lang.String FETCHER_CATEGORY
           
static java.lang.String FETCHER_FLAVOR
           
static java.lang.String FETCHER_NUM_POSTS_INTEGER
           
static java.lang.String FETCHER_PERMALINK
           
 
Method Summary
 void destroy()
          Called when BlojsomServlet is taken out of service
 BlogCategory[] fetchCategories(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, BlogUser user, java.lang.String flavor, java.util.Map context)
          Fetch a set of BlogCategory objects
 BlogCategory[] fetchCategories(java.util.Map fetchParameters, BlogUser user)
          Fetch a set of BlogCategory objects.
 BlogEntry[] fetchEntries(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, BlogUser user, java.lang.String flavor, java.util.Map context)
          Fetch a set of BlogEntry objects.
 BlogEntry[] fetchEntries(java.util.Map fetchParameters, BlogUser user)
          Fetch a set of BlogEntry objects.
 void init(javax.servlet.ServletConfig servletConfig, BlojsomConfiguration blojsomConfiguration)
          Initialize this fetcher.
 BlogCategory newBlogCategory()
          Return a new blog category instance
 BlogComment newBlogComment()
          Return a new BlogComment instance
 BlogEntry newBlogEntry()
          Return a new blog entry instance
 Pingback newPingback()
          Return a new Pingback instance
 Trackback newTrackback()
          Return a new Trackback instance
 

Field Detail

FETCHER_CATEGORY

public static final java.lang.String FETCHER_CATEGORY
See Also:
Constant Field Values

FETCHER_PERMALINK

public static final java.lang.String FETCHER_PERMALINK
See Also:
Constant Field Values

FETCHER_NUM_POSTS_INTEGER

public static final java.lang.String FETCHER_NUM_POSTS_INTEGER
See Also:
Constant Field Values

FETCHER_FLAVOR

public static final java.lang.String FETCHER_FLAVOR
See Also:
Constant Field Values
Method Detail

init

public void init(javax.servlet.ServletConfig servletConfig,
                 BlojsomConfiguration blojsomConfiguration)
          throws BlojsomFetcherException
Initialize this fetcher. This method only called when the fetcher is instantiated.

Parameters:
servletConfig - Servlet config object for the plugin to retrieve any initialization parameters
blojsomConfiguration - blojsom configuration information
Throws:
BlojsomFetcherException - If there is an error initializing the fetcher

newBlogEntry

public BlogEntry newBlogEntry()
Return a new blog entry instance

Returns:
Blog entry instance
Since:
blojsom 1.9

newBlogComment

public BlogComment newBlogComment()
Return a new BlogComment instance

Returns:
BlogComment
Since:
blojsom 2.26

newTrackback

public Trackback newTrackback()
Return a new Trackback instance

Returns:
Trackback
Since:
blojsom 2.26

newPingback

public Pingback newPingback()
Return a new Pingback instance

Returns:
Pingback
Since:
blojsom 2.26

newBlogCategory

public BlogCategory newBlogCategory()
Return a new blog category instance

Returns:
Blog category instance
Since:
blojsom 1.9.1

fetchEntries

public BlogEntry[] fetchEntries(javax.servlet.http.HttpServletRequest httpServletRequest,
                                javax.servlet.http.HttpServletResponse httpServletResponse,
                                BlogUser user,
                                java.lang.String flavor,
                                java.util.Map context)
                         throws BlojsomFetcherException
Fetch a set of BlogEntry objects.

Parameters:
httpServletRequest - Request
httpServletResponse - Response
user - BlogUser instance
flavor - Flavor
context - Context
Returns:
Blog entries retrieved for the particular request
Throws:
BlojsomFetcherException - If there is an error retrieving the blog entries for the request

fetchEntries

public BlogEntry[] fetchEntries(java.util.Map fetchParameters,
                                BlogUser user)
                         throws BlojsomFetcherException
Fetch a set of BlogEntry objects. This method is intended to be used for other components such as the XML-RPC handlers that cannot generate servlet request and response objects, but still need to be able to fetch entries. Implementations of this method must be explicit about the exact parameter names and types that are expected to return an appropriate set of BlogEntry objects.

Parameters:
fetchParameters - Parameters which will be used to retrieve blog entries
user - BlogUser instance
Returns:
Blog entries retrieved for the particular request
Throws:
BlojsomFetcherException - If there is an error retrieving the blog entries for the request

fetchCategories

public BlogCategory[] fetchCategories(javax.servlet.http.HttpServletRequest httpServletRequest,
                                      javax.servlet.http.HttpServletResponse httpServletResponse,
                                      BlogUser user,
                                      java.lang.String flavor,
                                      java.util.Map context)
                               throws BlojsomFetcherException
Fetch a set of BlogCategory objects

Parameters:
httpServletRequest - Request
httpServletResponse - Response
user - BlogUser instance
flavor - Flavor
context - Context
Returns:
Blog categories retrieved for the particular request
Throws:
BlojsomFetcherException - If there is an error retrieving the blog categories for the request

fetchCategories

public BlogCategory[] fetchCategories(java.util.Map fetchParameters,
                                      BlogUser user)
                               throws BlojsomFetcherException
Fetch a set of BlogCategory objects. This method is intended to be used for other components such as the XML-RPC handlers that cannot generate servlet request and response objects, but still need to be able to fetch categories. Implementations of this method must be explicit about the exact parameter names and types that are expected to return an appropriate set of BlogCategory objects.

Parameters:
fetchParameters - Parameters which will be used to retrieve blog entries
user - BlogUser instance
Returns:
Blog categories retrieved for the particular request
Throws:
BlojsomFetcherException - If there is an error retrieving the blog categories for the request

destroy

public void destroy()
             throws BlojsomFetcherException
Called when BlojsomServlet is taken out of service

Throws:
BlojsomFetcherException - If there is an error in finalizing this fetcher