net.sourceforge.pebble.permalink
Class DefaultPermalinkProvider
java.lang.Object
net.sourceforge.pebble.permalink.PermalinkProviderSupport
net.sourceforge.pebble.permalink.DefaultPermalinkProvider
- All Implemented Interfaces:
- PermalinkProvider
public class DefaultPermalinkProvider
- extends PermalinkProviderSupport
Generates permalinks using the pattern /YYYY/MM/DD/.
- Author:
- Simon Brown
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultPermalinkProvider
public DefaultPermalinkProvider()
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.