net.sourceforge.pebble.index
Class BlogEntryIndex

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

public class BlogEntryIndex
extends java.lang.Object

Keeps an index of all blog entries, allowing efficient access at runtime.

Author:
Simon Brown

Constructor Summary
BlogEntryIndex(Blog blog)
           
 
Method Summary
 void clear()
          Clears the index.
 java.util.List<java.lang.String> getBlogEntries()
          Gets the full list of blog entries.
 int getNumberOfBlogEntries()
          Gets the number of blog entries for this blog.
 int getNumberOfPublishedBlogEntries()
          Gets the number of published blog entries for this blog.
 int getNumberOfUnpublishedBlogEntries()
          Gets the number of unpublished blog entries for this blog.
 java.util.List<java.lang.String> getPublishedBlogEntries()
          Gets the full list of published blog entries.
 java.util.List<java.lang.String> getUnpublishedBlogEntries()
          Gets the full list of unpublished blog entries.
 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

BlogEntryIndex

public BlogEntryIndex(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

getNumberOfBlogEntries

public int getNumberOfBlogEntries()
Gets the number of blog entries for this blog.

Returns:
an int

getNumberOfPublishedBlogEntries

public int getNumberOfPublishedBlogEntries()
Gets the number of published blog entries for this blog.

Returns:
an int

getNumberOfUnpublishedBlogEntries

public int getNumberOfUnpublishedBlogEntries()
Gets the number of unpublished blog entries for this blog.

Returns:
an int

getBlogEntries

public java.util.List<java.lang.String> getBlogEntries()
Gets the full list of blog entries.

Returns:
a List of blog entry IDs

getPublishedBlogEntries

public java.util.List<java.lang.String> getPublishedBlogEntries()
Gets the full list of published blog entries.

Returns:
a List of blog entry IDs

getUnpublishedBlogEntries

public java.util.List<java.lang.String> getUnpublishedBlogEntries()
Gets the full list of unpublished blog entries.

Returns:
a List of blog entry IDs


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