org.apache.aries.samples.blog.api
Interface BlogEntryManager


public interface BlogEntryManager


Method Summary
 void createBlogPost(String email, String title, String blogText, List<String> tags)
          Create a blog posting.
 Entry findBlogEntryByTitle(String title)
          Find a specific blog entry by title.
 List<? extends BlogEntry> getAllBlogEntries()
          Retrieve all blog entries.
 List<? extends BlogEntry> getBlogEntries(int firstPostIndex, int noOfPosts)
          Get N posts from the database starting at post number X
 List<? extends BlogEntry> getBlogEntriesModifiedBetween(String startDate, String endDate)
          Retrieve all blog entries created between a specified date range.
 BlogEntry getBlogPost(long id)
          Get the specified blog posting.
 List<? extends BlogEntry> getBlogsForAuthor(String emailAddress)
          Retrieve all blog entries for a specific author.
 int getNoOfPosts()
          Get the total number of blog entries in the database
 void removeBlogEntry(BlogAuthor author, String title, String publishDate)
          Remove a specific blog entry.
 void updateBlogEntry(BlogEntry originalEntry, BlogAuthor a, String title, String publishDate, String blogText, List<String> tags)
          Update a blog entry.
 

Method Detail

createBlogPost

void createBlogPost(String email,
                    String title,
                    String blogText,
                    List<String> tags)
Create a blog posting.

Parameters:
email - the author's email
title - the title of the entry
blogText - the text of the entry
tags - tags associated with the blog entry

findBlogEntryByTitle

Entry findBlogEntryByTitle(String title)
Find a specific blog entry by title.

Parameters:
title - the title to search for
Returns:
the blog entry

getAllBlogEntries

List<? extends BlogEntry> getAllBlogEntries()
Retrieve all blog entries.

Returns:
a List of all blog entries

getBlogsForAuthor

List<? extends BlogEntry> getBlogsForAuthor(String emailAddress)
Retrieve all blog entries for a specific author.

Parameters:
emailAddress - the email address of the author in question
Returns:
a List

getBlogEntriesModifiedBetween

List<? extends BlogEntry> getBlogEntriesModifiedBetween(String startDate,
                                                        String endDate)
                                                        throws ParseException
Retrieve all blog entries created between a specified date range.

Parameters:
startDate - the start date
endDate - the end date
Returns:
a List
Throws:
ParseException

getBlogEntries

List<? extends BlogEntry> getBlogEntries(int firstPostIndex,
                                         int noOfPosts)
Get N posts from the database starting at post number X

Parameters:
firstPostIndex - the first post to retrieve
noOfPosts - the number of posts to retrieve in total
Returns:
a List of N posts

getNoOfPosts

int getNoOfPosts()
Get the total number of blog entries in the database

Returns:
the int number of entries

removeBlogEntry

void removeBlogEntry(BlogAuthor author,
                     String title,
                     String publishDate)
                     throws ParseException
Remove a specific blog entry.

Parameters:
a - the author of the blog entry
title - the title of the blog entry
publishDate - the publication date of the blog entry
Throws:
ParseException

updateBlogEntry

void updateBlogEntry(BlogEntry originalEntry,
                     BlogAuthor a,
                     String title,
                     String publishDate,
                     String blogText,
                     List<String> tags)
                     throws ParseException
Update a blog entry.

Parameters:
originalEntry - the original blog entry
a - the author of the blog entry
title - the title of the blog entry
publishDate - the publication date of the blog entry
blogText - the text content of the blog entry
tags - any assocaited tags for the blog entry
Throws:
ParseException

getBlogPost

BlogEntry getBlogPost(long id)
Get the specified blog posting.

Parameters:
id - the id of the blog posting
Returns:
the blog post


Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.