org.blojsom.plugin.emoticons
Class EnhancedEmoticonsPlugin

java.lang.Object
  extended byorg.blojsom.plugin.emoticons.EnhancedEmoticonsPlugin
All Implemented Interfaces:
Plugin

public class EnhancedEmoticonsPlugin
extends java.lang.Object
implements Plugin

Enhanced Emoticons Plugin. This is slightly modified version of the built-in Emoticon Plugin. It just adds the ability to configure the available emoticons and the patterns they correspond to via the emoticons properties file.

Since:
blojsom 3.0
Version:
$Id: EnhancedEmoticonsPlugin.java,v 1.6 2007/01/22 14:45:07 czarneckid Exp $
Author:
David Czarnecki, Jan Wessely

Constructor Summary
EnhancedEmoticonsPlugin()
          Default constructor
 
Method Summary
 void cleanup()
          Perform any cleanup for the plugin.
 void destroy()
          Called when BlojsomServlet is taken out of service
 void init()
          Initialize this plugin.
 Entry[] process(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, Blog blog, java.util.Map context, Entry[] entries)
          Process the blog entries
 void setEmoticons(java.util.Map emoticons)
          Set the emoticons configuration data
 void setParseComments(boolean parseComments)
          Set whether or not to parse comments for emoticons
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnhancedEmoticonsPlugin

public EnhancedEmoticonsPlugin()
Default constructor

Method Detail

setEmoticons

public void setEmoticons(java.util.Map emoticons)
Set the emoticons configuration data

Parameters:
emoticons - Emoticons configuration data

setParseComments

public void setParseComments(boolean parseComments)
Set whether or not to parse comments for emoticons

Parameters:
parseComments - Parse comments

init

public void init()
          throws PluginException
Initialize this plugin. This method only called when the plugin is instantiated.

Specified by:
init in interface Plugin
Throws:
PluginException - If there is an error initializing the plugin

process

public Entry[] process(javax.servlet.http.HttpServletRequest httpServletRequest,
                       javax.servlet.http.HttpServletResponse httpServletResponse,
                       Blog blog,
                       java.util.Map context,
                       Entry[] entries)
                throws PluginException
Process the blog entries

Specified by:
process in interface Plugin
Parameters:
httpServletRequest - Request
httpServletResponse - Response
blog - Blog instance
context - Contextblojsom
entries - Blog entries retrieved for the particular request
Returns:
Modified set of blog entries
Throws:
PluginException - If there is an error processing the blog entries

cleanup

public void cleanup()
             throws PluginException
Perform any cleanup for the plugin. Called after process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.blojsom.blog.Blog, java.util.Map, org.blojsom.blog.Entry[]).

Specified by:
cleanup in interface Plugin
Throws:
PluginException - If there is an error performing cleanup for this plugin

destroy

public void destroy()
             throws PluginException
Called when BlojsomServlet is taken out of service

Specified by:
destroy in interface Plugin
Throws:
PluginException - If there is an error in finalizing this plugin