|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Fetcher
Method Summary | |
java.lang.Integer |
countEntries(Blog blog)
Count the number of entries for a blog |
java.lang.Integer |
countEntriesForCategory(Blog blog,
Category category)
Count the number of entries for a blog category |
void |
deleteBlog(Blog blog)
Delete a blog |
void |
deleteCategory(Blog blog,
Category category)
Delete a given Category |
void |
deleteComment(Blog blog,
Comment comment)
Delete a given Comment |
void |
deleteEntry(Blog blog,
Entry entry)
Delete a given Entry |
void |
deletePingback(Blog blog,
Pingback pingback)
Delete a given Pingback |
void |
deleteTrackback(Blog blog,
Trackback trackback)
Delete a given Trackback |
void |
deleteUser(Blog blog,
java.lang.Integer userID)
Delete a given user from a blog |
void |
destroy()
Called when BlojsomServlet is taken out of service |
Category[] |
fetchCategories(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse,
Blog blog,
java.lang.String flavor,
java.util.Map context)
Fetch a set of Category objects |
Entry[] |
fetchEntries(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse,
Blog blog,
java.lang.String flavor,
java.util.Map context)
Fetch a set of Entry objects. |
Entry[] |
findEntries(Blog blog,
java.lang.String query)
Find entries which have the search query in their title or description |
Entry[] |
findEntriesBetweenDates(Blog blog,
java.util.Date startDate,
java.util.Date endDate)
Find entries between a start and end date |
Entry[] |
findEntriesByMetadataKeyValue(Blog blog,
java.lang.String metadataKey,
java.lang.String metadataValue,
boolean pre,
boolean post)
Find entries by a metadata key/value pair |
Entry[] |
findEntriesWithMetadataKey(Blog blog,
java.lang.String metadataKey)
Find entries with a given metadata key |
java.util.List |
findResponsesByQuery(Blog blog,
java.lang.String query)
Find the responses (comments, trackbacks, pingbacks) for a given Blog matching some query |
java.util.List |
findResponsesByStatus(Blog blog,
java.lang.String[] status)
Find the responses (comments, trackbacks, pingbacks) for a given Blog matching one of a set of status codes |
User[] |
getUsers(Blog blog)
Retrieve the users for a given blog |
void |
init()
Initialize this fetcher. |
Category[] |
loadAllCategories(Blog blog)
Load each Category for a given blog |
Entry[] |
loadAllEntriesForCategory(Blog blog,
java.lang.Integer categoryId)
Load all the entries for a given category |
Blog |
loadBlog(java.lang.Integer id)
Load the Blog given the ID |
Blog |
loadBlog(java.lang.String blogId)
Load the Blog given the blog ID |
java.lang.String[] |
loadBlogIDs()
Load the blog IDs |
void |
loadCategory(Blog blog,
Category category)
Load a given Category |
Category |
loadCategory(Blog blog,
java.lang.Integer categoryId)
Load the Category for a given category ID |
Category |
loadCategory(Blog blog,
java.lang.String name)
Load the Category for a given category name |
void |
loadComment(Blog blog,
Comment comment)
Load a given Comment |
Entry[] |
loadEntries(Blog blog,
int pageSize,
int page)
Load a set of entries using a given page size and page in which to retrieve the entries |
Entry[] |
loadEntries(int pageSize,
int page,
Category specificCategory,
Category[] defaultCategories)
Load a set of entries using a given page size and page in which to retrieve the entries |
Entry[] |
loadEntriesForCategory(Blog blog,
java.lang.Integer categoryId,
java.lang.Integer limit)
Load all the entries for a given category |
void |
loadEntry(Blog blog,
Entry entry)
Load a given Entry |
Entry |
loadEntry(Blog blog,
java.lang.Integer entryId)
Load an Entry for a given entry ID |
Entry |
loadEntry(Blog blog,
java.lang.String postSlug)
Load an Entry given a post slug |
void |
loadPingback(Blog blog,
Pingback pingback)
Load a given Pingback |
Pingback |
loadPingback(Blog blog,
java.lang.String sourceURI,
java.lang.String targetURI)
Load a pingback given the source URI and target URI |
Entry[] |
loadPreviousEntries(Blog blog,
Entry entry,
int numPreviousEntries)
Loads the previous entries of a specified entry |
java.util.List |
loadRecentComments(Blog blog)
Load the recent comments for a blog |
java.util.List |
loadRecentPingbacks(Blog blog)
Load the recent pingbacks for a blog |
java.util.List |
loadRecentTrackbacks(Blog blog)
Load the recent trackbacks for a blog |
void |
loadTrackback(Blog blog,
Trackback trackback)
Load a given Trackback |
User |
loadUser(Blog blog,
java.lang.Integer userID)
Load a given User from a blog given their ID |
User |
loadUser(Blog blog,
java.lang.String userLogin)
Load a User from a blog |
Blog |
newBlog()
Return a new Blog instance |
Category |
newCategory()
Return a new Category instance |
Comment |
newComment()
Return a new Comment instance |
Entry |
newEntry()
Return a new Entry instance |
Pingback |
newPingback()
Return a new Pingback instance |
Trackback |
newTrackback()
Return a new Trackback instance |
User |
newUser()
Return a new User instance |
void |
saveBlog(Blog blog)
Save a Blog |
void |
saveCategory(Blog blog,
Category category)
Save a given Category |
void |
saveComment(Blog blog,
Comment comment)
Save a given Comment |
void |
saveEntry(Blog blog,
Entry entry)
Save a given Entry |
void |
savePingback(Blog blog,
Pingback pingback)
Save a given Pingback |
void |
saveTrackback(Blog blog,
Trackback trackback)
Save a given Trackback |
User |
saveUser(Blog blog,
User user)
Save a given User to the blog |
Method Detail |
public void init() throws FetcherException
FetcherException
- If there is an error initializing the fetcherpublic Entry newEntry()
Entry
instance
public Comment newComment()
Comment
instance
Comment
commentpublic Trackback newTrackback()
Trackback
instance
Trackback
trackbackpublic Pingback newPingback()
Pingback
instance
Pingback
pingbackpublic Category newCategory()
Category
instance
Category
categorypublic Blog newBlog()
Blog
instance
Blog
blogpublic User newUser()
User
instance
User
userpublic java.lang.String[] loadBlogIDs() throws FetcherException
FetcherException
- If there is an error loading the blog IDspublic Blog loadBlog(java.lang.String blogId) throws FetcherException
Blog
given the blog ID
blogId
- Blog ID
Blog
blog
FetcherException
- If there is an error loading the blogpublic Blog loadBlog(java.lang.Integer id) throws FetcherException
Blog
given the ID
id
- ID
Blog
blog
FetcherException
- If there is an error loading the blogpublic void saveBlog(Blog blog) throws FetcherException
Blog
blog
- Blog
FetcherException
- If there is an error saving the blogpublic void deleteBlog(Blog blog) throws FetcherException
blog
- Blog
FetcherException
- If there is an error deleting the blogpublic Entry[] fetchEntries(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, Blog blog, java.lang.String flavor, java.util.Map context) throws FetcherException
Entry
objects.
httpServletRequest
- RequesthttpServletResponse
- Responseblog
- Blog
instanceflavor
- Flavorcontext
- Context
FetcherException
- If there is an error retrieving the blog entries for the requestpublic Entry[] loadAllEntriesForCategory(Blog blog, java.lang.Integer categoryId) throws FetcherException
blog
- Blog
categoryId
- Category ID
FetcherException
- If there is an error loading the entriespublic Entry[] loadEntriesForCategory(Blog blog, java.lang.Integer categoryId, java.lang.Integer limit) throws FetcherException
blog
- Blog
categoryId
- Category IDlimit
- Limit on number of entries to return
FetcherException
- If there is an error loading the entriespublic Entry[] loadEntries(Blog blog, int pageSize, int page) throws FetcherException
blog
- Blog
pageSize
- Page sizepage
- Page
FetcherException
- If there is an error loading the entriespublic Entry[] loadEntries(int pageSize, int page, Category specificCategory, Category[] defaultCategories) throws FetcherException
pageSize
- Page sizepage
- PagespecificCategory
- CategorydefaultCategories
- Default categories to use for requesting entries from the blogs
FetcherException
- If there is an error loading the entriespublic Entry[] findEntries(Blog blog, java.lang.String query) throws FetcherException
blog
- Blog
query
- Search query
FetcherException
- If there is an error searching through entriespublic Entry[] findEntriesByMetadataKeyValue(Blog blog, java.lang.String metadataKey, java.lang.String metadataValue, boolean pre, boolean post) throws FetcherException
blog
- Blog
metadataKey
- Metadata keymetadataValue
- Metadata valuepre
- If the search should use % before the metadata value (match anything before)post
- If the search should use % after the metadata value (match antthing after)
FetcherException
- If there is an error searching through entriespublic Entry[] findEntriesWithMetadataKey(Blog blog, java.lang.String metadataKey) throws FetcherException
blog
- Blog
metadataKey
- Metadata key
FetcherException
- If there is an error searching through entriespublic Entry[] findEntriesBetweenDates(Blog blog, java.util.Date startDate, java.util.Date endDate) throws FetcherException
blog
- Blog
startDate
- Start dateendDate
- End date
FetcherException
- If there is an error searching for entries between the datespublic Entry[] loadPreviousEntries(Blog blog, Entry entry, int numPreviousEntries) throws FetcherException
blog
- Blog
entry
- Entry
numPreviousEntries
- Number of previous entries to retrieve
FetcherException
- If there is an error retrieving previous entriespublic java.lang.Integer countEntries(Blog blog) throws FetcherException
blog
- Blog
FetcherException
- If there is an error counting the blog entriespublic java.lang.Integer countEntriesForCategory(Blog blog, Category category) throws FetcherException
blog
- Blog
category
- Category
FetcherException
- If there is an error counting the blog entries in the categorypublic Entry loadEntry(Blog blog, java.lang.Integer entryId) throws FetcherException
Entry
for a given entry ID
blog
- Blog
entryId
- Entry ID
Entry
entry
FetcherException
- If there is an error loading the entrypublic Entry loadEntry(Blog blog, java.lang.String postSlug) throws FetcherException
Entry
given a post slug
blog
- Blog
postSlug
- Post slug
Entry
for the given post slug
FetcherException
- If an entry for the blog and post slug cannot be foundpublic Category[] fetchCategories(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, Blog blog, java.lang.String flavor, java.util.Map context) throws FetcherException
Category
objects
httpServletRequest
- RequesthttpServletResponse
- Responseblog
- Blog
instanceflavor
- Flavorcontext
- Context
FetcherException
- If there is an error retrieving the blog categories for the requestpublic Category[] loadAllCategories(Blog blog) throws FetcherException
Category
for a given blog
blog
- Blog
Category
list for the blog
FetcherException
- If there is an error loading the categoriespublic Category loadCategory(Blog blog, java.lang.Integer categoryId) throws FetcherException
Category
for a given category ID
blog
- Blog
categoryId
- Category ID
Category
for the given category ID
FetcherException
- If there is an error loading the categorypublic Category loadCategory(Blog blog, java.lang.String name) throws FetcherException
Category
for a given category name
blog
- Blog
name
- Category name
Category
for the given category name
FetcherException
- If there is an error loading the categorypublic void saveEntry(Blog blog, Entry entry) throws FetcherException
Entry
blog
- Blog
entry
- Entry
to save
FetcherException
- If there is an error saving the entrypublic void loadEntry(Blog blog, Entry entry) throws FetcherException
Entry
blog
- Blog
entry
- Entry
to load
FetcherException
- If there is an error loading the entrypublic void deleteEntry(Blog blog, Entry entry) throws FetcherException
Entry
blog
- Blog
entry
- Entry
to delete
FetcherException
- If there is an error deleting the entrypublic void saveCategory(Blog blog, Category category) throws FetcherException
Category
blog
- Blog
category
- Category
to save
FetcherException
- If there is an error saving the categorypublic void loadCategory(Blog blog, Category category) throws FetcherException
Category
blog
- Blog
category
- Category
to load
FetcherException
- If there is an loading saving the categorypublic void deleteCategory(Blog blog, Category category) throws FetcherException
Category
blog
- Blog
category
- Category
to delete
FetcherException
- If there is an error deleting the categorypublic void saveComment(Blog blog, Comment comment) throws FetcherException
Comment
blog
- Blog
comment
- Comment
to save
FetcherException
- If there is an error saving the commentpublic void loadComment(Blog blog, Comment comment) throws FetcherException
Comment
blog
- Blog
comment
- Comment
to load
FetcherException
- If there is an error loading the commentpublic void deleteComment(Blog blog, Comment comment) throws FetcherException
Comment
blog
- Blog
comment
- Comment
to delete
FetcherException
- If there is an error deleting the commentpublic java.util.List loadRecentComments(Blog blog) throws FetcherException
blog
- Blog
FetcherException
- If there is an error retrieving the recent commentspublic void saveTrackback(Blog blog, Trackback trackback) throws FetcherException
Trackback
blog
- Blog
trackback
- Trackback
to save
FetcherException
- If there is an error saving the trackbackpublic void loadTrackback(Blog blog, Trackback trackback) throws FetcherException
Trackback
blog
- Blog
trackback
- Trackback
to load
FetcherException
- If there is an error loading the trackbackpublic void deleteTrackback(Blog blog, Trackback trackback) throws FetcherException
Trackback
blog
- Blog
trackback
- Trackback
to delete
FetcherException
- If there is an error deleting the trackbackpublic java.util.List loadRecentTrackbacks(Blog blog) throws FetcherException
blog
- Blog
FetcherException
- If there is an error retrieving the recent trackbackspublic void savePingback(Blog blog, Pingback pingback) throws FetcherException
Pingback
blog
- Blog
pingback
- Pingback
to save
FetcherException
- If there is an error saving the pingbackpublic void loadPingback(Blog blog, Pingback pingback) throws FetcherException
Pingback
blog
- Blog
pingback
- Pingback
to load
FetcherException
- If there is an error loading the pingbackpublic Pingback loadPingback(Blog blog, java.lang.String sourceURI, java.lang.String targetURI) throws FetcherException
blog
- Blog
sourceURI
- Source URItargetURI
- Target URI
Pingback
given the source and target URIs or null
if not found
FetcherException
- If there was an erorr loading the pingbackpublic void deletePingback(Blog blog, Pingback pingback) throws FetcherException
Pingback
blog
- Blog
pingback
- Pingback
to delete
FetcherException
- If there is an error deleting the pingbackpublic java.util.List loadRecentPingbacks(Blog blog) throws FetcherException
blog
- Blog
FetcherException
- If there is an error retrieving the recent pingbackspublic User[] getUsers(Blog blog)
blog
- Blog
User
s for a blogpublic User loadUser(Blog blog, java.lang.String userLogin) throws FetcherException
User
from a blog
blog
- Blog
userLogin
- Login ID
User
user
FetcherException
- If there is an error loading the User
from the blogpublic User loadUser(Blog blog, java.lang.Integer userID) throws FetcherException
User
from a blog given their ID
blog
- Blog
userID
- User ID
User
user
FetcherException
- If there is an error loading the userpublic User saveUser(Blog blog, User user) throws FetcherException
User
to the blog
blog
- Blog
user
- User
User
user
FetcherException
- If there is an error saving the user to the blogpublic void deleteUser(Blog blog, java.lang.Integer userID) throws FetcherException
blog
- Blog
userID
- User ID
FetcherException
- If there is an error deleting the user from the blogpublic java.util.List findResponsesByStatus(Blog blog, java.lang.String[] status) throws FetcherException
Blog
matching one of a set of status codes
blog
- Blog
status
- List of status codes to search
FetcherException
- If there is an error loading the responsespublic java.util.List findResponsesByQuery(Blog blog, java.lang.String query) throws FetcherException
Blog
matching some query
blog
- Blog
query
- Query which will match on various items such as commenter name, e-mail, IP address, etc.
FetcherException
- If there is an error loading the responsespublic void destroy() throws FetcherException
BlojsomServlet
is taken out of service
FetcherException
- If there is an error in finalizing this fetcher
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |