|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BlogPersistenceService
This is the interface for the persistence layer of the blog application. This persistence layer is registered in the service registry and is used by the main application layer.
| Method Summary | |
|---|---|
void |
createAuthor(String email,
Date dob,
String name,
String displayName,
String bio)
Create an author in the database |
void |
createBlogPost(String email,
String title,
String blogText,
List<String> tags)
Create an Blog post in the database |
Entry |
findBlogEntryByTitle(String title)
Get a BlogEntry that has a given title |
List<? extends Author> |
getAllAuthors()
Get all authors in the database |
List<? extends Entry> |
getAllBlogEntries()
Get all the blog entries in the data store |
Author |
getAuthor(String emailAddress)
Get the details for an author |
List<? extends Entry> |
getBlogEntries(int firstPostIndex,
int no)
Get the first N most recent posts starting from post X |
List<? extends Entry> |
getBlogEntriesModifiedBetween(Date start,
Date end)
Get BlogEntries created or modified between two specified dates |
Entry |
getBlogEntryById(long postId)
Obtain a given Blog post using its unique id. |
List<? extends Entry> |
getBlogsForAuthor(String emailAddress)
Get all the blog entries made by a particular author |
int |
getNoOfBlogEntries()
Get the number of blog entries in the data store |
void |
removeAuthor(String emailAddress)
Remove the author with the specified email address |
void |
removeBlogEntry(long id)
Remove the specified BlogEntry, note that this must be a BlogEntry returned by this service. |
void |
updateAuthor(String email,
Date dob,
String name,
String displayName,
String bio)
Update an author in the database |
void |
updateBlogEntry(long id,
String email,
String title,
String blogText,
List<String> tags,
Date updatedDate)
Update an post in the database |
| Method Detail |
|---|
List<? extends Entry> getAllBlogEntries()
int getNoOfBlogEntries()
List<? extends Entry> getBlogEntries(int firstPostIndex,
int no)
firstPostIndex - - The index of the first post to be retrievedno - - The number of posts to be retrieved starting from firstPostIndexList<? extends Entry> getBlogsForAuthor(String emailAddress)
emailAddress - the author's email address
Entry findBlogEntryByTitle(String title)
title - the title of interest
List<? extends Entry> getBlogEntriesModifiedBetween(Date start,
Date end)
start - The Date defining the start of the time periodend - The Date defining the end of the time period
Entry getBlogEntryById(long postId)
postId - the posts unique id.
Author getAuthor(String emailAddress)
emailAddress - the Author's email address
List<? extends Author> getAllAuthors()
void createAuthor(String email,
Date dob,
String name,
String displayName,
String bio)
emailAddress - The author's email addressdob - The author's date of birthname - The author's namedisplayName - ??bio - The author's bio.
void createBlogPost(String email,
String title,
String blogText,
List<String> tags)
a - The authortitle - The title of the postblogText - The text of the posttags - ??
void updateAuthor(String email,
Date dob,
String name,
String displayName,
String bio)
-
void updateBlogEntry(long id,
String email,
String title,
String blogText,
List<String> tags,
Date updatedDate)
email - The author's emailtitle - The title of the postblogText - The text of the blogtags - The list of tagsupdatedDate - The date the update was madevoid removeAuthor(String emailAddress)
emailAddress - the email address of the author to removevoid removeBlogEntry(long id)
id - the unique id of the blog entry to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||