net.sourceforge.pebble.permalink
Class TitlePermalinkProvider

java.lang.Object
  extended by net.sourceforge.pebble.permalink.PermalinkProviderSupport
      extended by net.sourceforge.pebble.permalink.TitlePermalinkProvider
All Implemented Interfaces:
PermalinkProvider

public class TitlePermalinkProvider
extends PermalinkProviderSupport

Generates permalinks based upon the blog entry title. This implementation only uses the following characters from the title:

For titles without these characters (e.g. those using an extended character set) the blog entry ID is used for the permalink instead.

Author:
Simon Brown

Constructor Summary
TitlePermalinkProvider()
           
 
Method Summary
 BlogEntry getBlogEntry(java.lang.String uri)
          Gets the blog entry referred to by the specified URI.
 java.lang.String getPermalink(BlogEntry blogEntry)
          Gets the permalink for a blog entry.
 boolean isBlogEntryPermalink(java.lang.String uri)
          Determines whether the specified URI is a blog entry permalink.
 
Methods inherited from class net.sourceforge.pebble.permalink.PermalinkProviderSupport
getBlog, getDay, getMonth, getPermalink, getPermalink, isDayPermalink, isMonthPermalink, setBlog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TitlePermalinkProvider

public TitlePermalinkProvider()
Method Detail

getPermalink

public java.lang.String getPermalink(BlogEntry blogEntry)
Gets the permalink for a blog entry.

Parameters:
blogEntry - a BlogEntry instance
Returns:
a URI as a String

isBlogEntryPermalink

public boolean isBlogEntryPermalink(java.lang.String uri)
Determines whether the specified URI is a blog entry permalink.

Parameters:
uri - a relative URI
Returns:
true if the URI represents a permalink to a blog entry, false otherwise

getBlogEntry

public BlogEntry getBlogEntry(java.lang.String uri)
Gets the blog entry referred to by the specified URI.

Parameters:
uri - a relative URI
Returns:
a BlogEntry instance, or null if one can't be found


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