net.sourceforge.pebble.index
Class ResponseIndex

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

public class ResponseIndex
extends java.lang.Object

Keeps an index of all responses.

Author:
Simon Brown

Constructor Summary
ResponseIndex(Blog blog)
           
 
Method Summary
 void clear()
          Clears the index.
 java.util.List<java.lang.String> getApprovedResponses()
          Gets the list of approved responses.
 int getNumberOfApprovedResponses()
          Gets the number of approved responses for this blog.
 int getNumberOfPendingResponses()
          Gets the number of pending responses for this blog.
 int getNumberOfRejectedResponses()
          Gets the number of rejected responses for this blog.
 int getNumberOfResponses()
          Gets the number of responses for this blog.
 java.util.List<java.lang.String> getPendingResponses()
          Gets the list of pending responses.
 java.util.List<java.lang.String> getRecentApprovedResponses(int number)
          Gets the most recent N approved responses.
 java.util.List<java.lang.String> getRecentResponses(int number)
          Gets the most recent N approved responses.
 java.util.List<java.lang.String> getRejectedResponses()
          Gets the list of rejected responses.
 void index(java.util.List<BlogEntry> blogEntries)
          Indexes one or more blog entries.
 void index(Response response)
          Indexes a single response.
 void unindex(Response response)
          Unindexes a single response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResponseIndex

public ResponseIndex(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(Response response)
Indexes a single response.

Parameters:
response - a Response instance

unindex

public void unindex(Response response)
Unindexes a single response.

Parameters:
response - a Response instance

getNumberOfApprovedResponses

public int getNumberOfApprovedResponses()
Gets the number of approved responses for this blog.

Returns:
an int

getNumberOfPendingResponses

public int getNumberOfPendingResponses()
Gets the number of pending responses for this blog.

Returns:
an int

getNumberOfRejectedResponses

public int getNumberOfRejectedResponses()
Gets the number of rejected responses for this blog.

Returns:
an int

getNumberOfResponses

public int getNumberOfResponses()
Gets the number of responses for this blog.

Returns:
an int

getRecentResponses

public java.util.List<java.lang.String> getRecentResponses(int number)
Gets the most recent N approved responses.

Returns:
a List of response IDs

getRecentApprovedResponses

public java.util.List<java.lang.String> getRecentApprovedResponses(int number)
Gets the most recent N approved responses.

Returns:
a List of response IDs

getApprovedResponses

public java.util.List<java.lang.String> getApprovedResponses()
Gets the list of approved responses.

Returns:
a List of response IDs

getPendingResponses

public java.util.List<java.lang.String> getPendingResponses()
Gets the list of pending responses.

Returns:
a List of response IDs

getRejectedResponses

public java.util.List<java.lang.String> getRejectedResponses()
Gets the list of rejected responses.

Returns:
a List of response IDs


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