| java.lang.Object com.ecyrd.jspwiki.filters.BasicPageFilter com.ecyrd.jspwiki.event.PageEventFilter
PageEventFilter | public class PageEventFilter extends BasicPageFilter (Code) | | Fires WikiPageEvents for page events.
Adding a PageEventFilter to the FilterManager will automatically
attach an event delegate with the WikiEventManager to provide for
firing and listener management. All that remains is then adding
the listener to the filter via the WikiEventManager. This is quite
simple:
PageEventFilter filter = new PageEventFilter();
engine.getFilterManager().addPageFilter(filter,5000);
// attach listener to filter
WikiEventManager.addWikiEventListener(filter,listener);
This class provides convenience methods for adding and removing
WikiEventListeners.
See Also: com.ecyrd.jspwiki.event.WikiEventManager author: Murray Altheim |
addWikiEventListener | final public synchronized void addWikiEventListener(WikiEventListener listener)(Code) | | Registers a WikiEventListener with this instance.
This is a convenience method.
Parameters: listener - the event listener |
fireEvent | final protected void fireEvent(int type, WikiContext context)(Code) | | Fires a WikiPageEvent of the provided type and page name
to all registered listeners. Only PAGE_LOCK and
PAGE_UNLOCK event types will fire an event; other
event types are ignored.
See Also: com.ecyrd.jspwiki.event.WikiPageEvent Parameters: type - the WikiPageEvent type to be fired. Parameters: context - the WikiContext of the event. |
postSave | public void postSave(WikiContext wikiContext, String content) throws FilterException(Code) | | This method is called after the page has been successfully saved.
If the saving fails for any reason, then this method will not
be called.
Since the result is discarded from this method, this is only useful
for things like counters, etc.
|
postTranslate | public String postTranslate(WikiContext wikiContext, String htmlContent) throws FilterException(Code) | | This method is called after a page has been fed through the TranslatorReader,
so anything you are seeing here is translated content. If you want to
do any of your own WikiMarkup2HTML translation, do it here.
|
preTranslate | public String preTranslate(WikiContext wikiContext, String content) throws FilterException(Code) | | This method is called whenever a page has been loaded from the provider,
but not yet been sent through the TranslatorReader. Note that you cannot
do HTML translation here, because TranslatorReader is likely to escape it.
Parameters: wikiContext - The current wikicontext. Parameters: content - WikiMarkup. |
removeWikiEventListener | final public synchronized void removeWikiEventListener(WikiEventListener listener)(Code) | | Un-registers a WikiEventListener with this instance.
This is a convenience method.
Parameters: listener - the event listener |
|
|