net.sourceforge.pebble.index
Class AuthorIndex

java.lang.Object
  extended by net.sourceforge.pebble.index.AuthorIndex

public class AuthorIndex
extends java.lang.Object

Keeps an index of all blog entries from a specific author, allowing efficient access at runtime.

Author:
Simon Brown

Constructor Summary
AuthorIndex(Blog blog)
           
 
Method Summary
 void clear()
          Clears the index.
 java.util.List<java.lang.String> getAuthors()
          Gets the list of authors associated with this blog.
 java.util.List<java.lang.String> getRecentBlogEntries(java.lang.String username)
          Gets the blog entries for a given author.
 void index(BlogEntry blogEntry)
          Indexes a single blog entry.
 void index(java.util.List<BlogEntry> blogEntries)
          Indexes one or more blog entries.
 void unindex(BlogEntry blogEntry)
          Unindexes a single blog entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthorIndex

public AuthorIndex(Blog blog)
Method Detail

clear

public void clear()
Clears the index.


index

public void index(java.util.List<BlogEntry> blogEntries)
Indexes one or more blog entries.

Parameters:
blogEntries - a List of BlogEntry instances

index

public void index(BlogEntry blogEntry)
Indexes a single blog entry.

Parameters:
blogEntry - a BlogEntry instance

unindex

public void unindex(BlogEntry blogEntry)
Unindexes a single blog entry.

Parameters:
blogEntry - a BlogEntry instance

getAuthors

public java.util.List<java.lang.String> getAuthors()
Gets the list of authors associated with this blog.


getRecentBlogEntries

public java.util.List<java.lang.String> getRecentBlogEntries(java.lang.String username)
Gets the blog entries for a given author.

Parameters:
username - a username (String)
Returns:
a List of blog entry IDs


Copyright © 2003-2006, Simon Brown. All Rights Reserved.