com.ecyrd.jspwiki.plugin
Class WeblogPlugin
java.lang.Object
|
+--com.ecyrd.jspwiki.plugin.WeblogPlugin
- All Implemented Interfaces:
- WikiPlugin
- public class WeblogPlugin
- extends java.lang.Object
- implements WikiPlugin
Builds a simple weblog.
The pageformat can use the following params:
%p - Page name
Parameters
- days - how many days the weblog aggregator should show.
- pageformat - What the entries should look like.
- startDate - Date when to start. Format is "ddMMyy";
The "days" and "startDate" can also be sent in HTTP parameters,
and the names are "weblog.days" and "weblog.startDate", respectively.
- Since:
- 1.9.21
|
Method Summary |
java.lang.String |
execute(WikiContext context,
java.util.Map params)
This is the main entry point for any plugin. |
java.util.List |
findBlogEntries(PageManager mgr,
java.lang.String baseName,
java.util.Date start,
java.util.Date end)
Attempts to locate all pages that correspond to the
blog entry pattern. |
static java.lang.String |
makeEntryPage(java.lang.String pageName)
|
static java.lang.String |
makeEntryPage(java.lang.String pageName,
java.lang.String date)
|
static java.lang.String |
makeEntryPage(java.lang.String pageName,
java.lang.String date,
java.lang.String entryNum)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_DAYS
public static final int DEFAULT_DAYS
- See Also:
- Constant Field Values
DEFAULT_PAGEFORMAT
public static final java.lang.String DEFAULT_PAGEFORMAT
- See Also:
- Constant Field Values
DEFAULT_DATEFORMAT
public static final java.lang.String DEFAULT_DATEFORMAT
- See Also:
- Constant Field Values
PARAM_STARTDATE
public static final java.lang.String PARAM_STARTDATE
- See Also:
- Constant Field Values
PARAM_DAYS
public static final java.lang.String PARAM_DAYS
- See Also:
- Constant Field Values
PARAM_ALLOWCOMMENTS
public static final java.lang.String PARAM_ALLOWCOMMENTS
- See Also:
- Constant Field Values
WeblogPlugin
public WeblogPlugin()
makeEntryPage
public static java.lang.String makeEntryPage(java.lang.String pageName,
java.lang.String date,
java.lang.String entryNum)
makeEntryPage
public static java.lang.String makeEntryPage(java.lang.String pageName)
makeEntryPage
public static java.lang.String makeEntryPage(java.lang.String pageName,
java.lang.String date)
execute
public java.lang.String execute(WikiContext context,
java.util.Map params)
throws PluginException
- Description copied from interface:
WikiPlugin
- This is the main entry point for any plugin. The parameters are parsed,
and a special parameter called "_body" signifies the name of the plugin
body, i.e. the part of the plugin that is not a parameter of
the form "key=value". This has been separated using an empty
line.
Note that it is preferred that the plugin returns
XHTML-compliant HTML (i.e. close all tags, use <br />
instead of <br>, etc.
- Specified by:
execute in interface WikiPlugin
- Parameters:
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.
- Returns:
- HTML, ready to be included into the rendered page.
- Throws:
PluginException - In case anything goes wrong.
findBlogEntries
public java.util.List findBlogEntries(PageManager mgr,
java.lang.String baseName,
java.util.Date start,
java.util.Date end)
throws ProviderException
- Attempts to locate all pages that correspond to the
blog entry pattern.
Returns a list of pages with their FIRST revisions.
ProviderException