net.sourceforge.pebble.index
Class StaticPageIndex

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

public class StaticPageIndex
extends java.lang.Object

Maintains an index of all static pages

Author:
Simon Brown

Constructor Summary
StaticPageIndex(Blog blog)
           
 
Method Summary
 void clear()
          Clears the index.
 boolean contains(java.lang.String name)
          Determines whether a page with the specified permalink exists.
 int getNumberOfStaticPages()
          Gets the number of static pages.
 java.lang.String getStaticPage(java.lang.String name)
          Gets the page ID for the specified named page.
 void index(java.util.List<StaticPage> staticPages)
          Indexes one or more blog entries.
 void index(StaticPage staticPage)
          Indexes a single page.
 void unindex(StaticPage staticPage)
          Unindexes a single page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticPageIndex

public StaticPageIndex(Blog blog)
Method Detail

clear

public void clear()
Clears the index.


index

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

Parameters:
staticPages - a List of Page instances

index

public void index(StaticPage staticPage)
Indexes a single page.

Parameters:
staticPage - a Page instance

unindex

public void unindex(StaticPage staticPage)
Unindexes a single page.

Parameters:
staticPage - a Page instance

getStaticPage

public java.lang.String getStaticPage(java.lang.String name)
Gets the page ID for the specified named page.

Parameters:
name - a String
Returns:
a String instance, or null if no page exists with the specified name

contains

public boolean contains(java.lang.String name)
Determines whether a page with the specified permalink exists.

Parameters:
name - the name as a String
Returns:
true if the page exists, false otherwise

getNumberOfStaticPages

public int getNumberOfStaticPages()
Gets the number of static pages.

Returns:
an int


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