|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ecyrd.jspwiki.plugin.WeblogPlugin
public class WeblogPlugin
Builds a simple weblog. The pageformat can use the following params:
%p - Page name
Parameters:
The "days" and "startDate" can also be sent in HTTP parameters, and the names are "weblog.days" and "weblog.startDate", respectively.
The weblog plugin also adds an attribute to each page it is on: "weblogplugin.isweblog" is set to "true". This can be used to quickly peruse pages which have weblogs.
Field Summary | |
---|---|
static String |
ATTR_ISWEBLOG
|
static String |
DEFAULT_DATEFORMAT
|
static int |
DEFAULT_DAYS
|
static String |
DEFAULT_PAGEFORMAT
|
static String |
PARAM_ALLOWCOMMENTS
|
static String |
PARAM_DAYS
|
static String |
PARAM_ENTRYFORMAT
|
static String |
PARAM_MAXENTRIES
|
static String |
PARAM_PAGE
|
static String |
PARAM_STARTDATE
|
Constructor Summary | |
---|---|
WeblogPlugin()
|
Method Summary | |
---|---|
String |
execute(WikiContext context,
Map params)
This is the main entry point for any plugin. |
List |
findBlogEntries(PageManager mgr,
String baseName,
Date start,
Date end)
Attempts to locate all pages that correspond to the blog entry pattern. |
void |
initialize(WikiContext context,
Map params)
Just sets the "I am a weblog" mark. |
static String |
makeEntryPage(String pageName)
|
static String |
makeEntryPage(String pageName,
String date)
|
static String |
makeEntryPage(String pageName,
String date,
String entryNum)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_DAYS
public static final String DEFAULT_PAGEFORMAT
public static final String DEFAULT_DATEFORMAT
public static final String PARAM_STARTDATE
public static final String PARAM_ENTRYFORMAT
public static final String PARAM_DAYS
public static final String PARAM_ALLOWCOMMENTS
public static final String PARAM_MAXENTRIES
public static final String PARAM_PAGE
public static final String ATTR_ISWEBLOG
Constructor Detail |
---|
public WeblogPlugin()
Method Detail |
---|
public static String makeEntryPage(String pageName, String date, String entryNum)
public static String makeEntryPage(String pageName)
public static String makeEntryPage(String pageName, String date)
public void initialize(WikiContext context, Map params)
initialize
in interface InitializablePlugin
public String execute(WikiContext context, Map params) throws PluginException
WikiPlugin
Note that it is preferred that the plugin returns XHTML-compliant HTML (i.e. close all tags, use <br /> instead of <br>, etc.
execute
in interface WikiPlugin
context
- The current WikiContext.params
- A Map which contains key-value pairs. Any
parameter that the user has specified on the
wiki page will contain String-String
parameters, but it is possible that at some future date,
JSPWiki will give you other things that are not Strings.
PluginException
- In case anything goes wrong.public List findBlogEntries(PageManager mgr, String baseName, Date start, Date end) throws ProviderException
ProviderException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |