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


public interface BloggingService


Method Summary
 void createBlogAuthor(String email, String nickName, String name, String bio, String dob)
          Create a new author.
 void createBlogComment(String text, String email, long entryId)
          Create a comment
 void createBlogEntry(String email, String title, String blogText, String tags)
           
 List<? extends BlogEntry> getAllBlogEntries()
          Get all the blog entries
 BlogAuthor getBlogAuthor(String email)
          Get the author associated with a given email address.
 List<? extends BlogEntry> getBlogEntries(int firstPostIndex, int noOfPosts)
          Get the a number of entries starting at the teh first index
 BlogEntry getBlogEntry(long id)
          Get the blog post with the specified id.
 String getBlogTitle()
          Get the blog
 List<? extends BlogComment> getCommentsForEntry(BlogEntry entry)
          Get the comments associated with an entry
 int getNoOfEntries()
          Get the number of entries(posts) in the blog
 boolean isCommentingAvailable()
          Retrieve the state of the blog commenting service
 void updateBlogAuthor(String email, String nickName, String name, String bio, String dob)
          Update the attributes of an author.
 

Method Detail

getBlogTitle

String getBlogTitle()
Get the blog

Returns:
the title of the Blog

getBlogAuthor

BlogAuthor getBlogAuthor(String email)
Get the author associated with a given email address.

Parameters:
email - the email address of interest
Returns:
the blog author with the supplied email address

getBlogEntry

BlogEntry getBlogEntry(long id)
Get the blog post with the specified id.

Parameters:
id - the blog entry id
Returns:
the blog post

updateBlogAuthor

void updateBlogAuthor(String email,
                      String nickName,
                      String name,
                      String bio,
                      String dob)
Update the attributes of an author.

Parameters:
email - the email address of the author being updated
nickName - the display name for this author
name - the full name for this author
bio - the biography for this author
dob - the date of birth for this author

getNoOfEntries

int getNoOfEntries()
Get the number of entries(posts) in the blog

Returns:
the number of posts.

getBlogEntries

List<? extends BlogEntry> getBlogEntries(int firstPostIndex,
                                         int noOfPosts)
Get the a number of entries starting at the teh first index

Parameters:
firstPostIndex -
noOfPosts -
Returns:
a list of BlogEntries

getAllBlogEntries

List<? extends BlogEntry> getAllBlogEntries()
Get all the blog entries

Returns:
a lost of BlogEntrys

createBlogAuthor

void createBlogAuthor(String email,
                      String nickName,
                      String name,
                      String bio,
                      String dob)
Create a new author.

Parameters:
email - the author's email address
nickName - the author's display name
name - the author's full name
bio - the author's biography
dob - the author's date of birth

createBlogEntry

void createBlogEntry(String email,
                     String title,
                     String blogText,
                     String tags)
Parameters:
email - the email address of the author
title - the title of the post
blogText - the test of the post
tags - list of tags associated with the post

isCommentingAvailable

boolean isCommentingAvailable()
Retrieve the state of the blog commenting service

Returns:
true if available else false

createBlogComment

void createBlogComment(String text,
                       String email,
                       long entryId)
Create a comment

Parameters:
text -
email -
entryId -

getCommentsForEntry

List<? extends BlogComment> getCommentsForEntry(BlogEntry entry)
Get the comments associated with an entry

Parameters:
entry -
Returns:
a list of comments for an entry (post)


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