| java.lang.Object org.blojsom.plugin.comment.CommentModerationPlugin org.blojsom.plugin.comment.MathCommentAuthenticationPlugin
MathCommentAuthenticationPlugin | public class MathCommentAuthenticationPlugin extends CommentModerationPlugin implements Listener(Code) | | Math comment authenticator plugin
author: David Czarnecki version: $Id: MathCommentAuthenticationPlugin.java,v 1.5 2007/01/17 02:35:08 czarneckid Exp $ since: blojsom 3.0 |
Method Summary | |
protected int | getAnswerForOperation(int value1, int value2, int operation) | protected String | getOperatorForOperation(int operation) | public void | handleEvent(Event event) | public void | init() Initialize this plugin. | protected void | moderateComment(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Blog blog, Map context, Entry[] entries) | public Entry[] | process(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Blog blog, Map context, Entry[] entries) | public void | processEvent(Event event) | public void | setEventBroadcaster(EventBroadcaster eventBroadcaster) |
BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_ANSWER | final public static String BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_ANSWER(Code) | | |
BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_ANSWER_CHECK_PARAM | final public static String BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_ANSWER_CHECK_PARAM(Code) | | |
BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_OPERATION | final public static String BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_OPERATION(Code) | | |
BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_STATUS_MESSAGE | final public static String BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_STATUS_MESSAGE(Code) | | |
BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_VALUE1 | final public static String BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_VALUE1(Code) | | |
BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_VALUE2 | final public static String BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_VALUE2(Code) | | |
MathCommentAuthenticationPlugin | public MathCommentAuthenticationPlugin()(Code) | | Math comment authenticator plugin
|
getAnswerForOperation | protected int getAnswerForOperation(int value1, int value2, int operation)(Code) | | Return the result from the specified operation where 0 = addition, 1 = subtraction, 2 = multiplication
Parameters: value1 - Value 1 Parameters: value2 - Value 2 Parameters: operation - Operation where 0 = addition, 1 = subtraction, 2 = multiplication Value of operation |
getOperatorForOperation | protected String getOperatorForOperation(int operation)(Code) | | Return the appropriate operator for the operation
Parameters: operation - Operation where 0 = addition, 1 = subtraction, 2 = multiplication + for addition, - for subtraction, and * for multiplication |
handleEvent | public void handleEvent(Event event)(Code) | | Handle an event broadcast from another component
Parameters: event - Event to be handled |
init | public void init() throws PluginException(Code) | | Initialize this plugin. This method only called when the plugin is instantiated.
throws: PluginException - If there is an error initializing the plugin |
moderateComment | protected void moderateComment(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Blog blog, Map context, Entry[] entries) throws PluginException(Code) | | Simple check to see if comment moderation is enabled
Parameters: httpServletRequest - Request Parameters: httpServletResponse - Response Parameters: blog - Blog instance Parameters: context - Context Parameters: entries - Blog entries retrieved for the particular request throws: org.blojsom.plugin.PluginException - If there is an error in moderating a comment |
process | public Entry[] process(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Blog blog, Map context, Entry[] entries) throws PluginException(Code) | | Process the blog entries
Parameters: httpServletRequest - Request Parameters: httpServletResponse - Response Parameters: blog - Blog instance Parameters: context - Context Parameters: entries - Blog entries retrieved for the particular request Modified set of blog entries throws: PluginException - If there is an error processing the blog entries |
processEvent | public void processEvent(Event event)(Code) | | Process an event from another component
Parameters: event - Event to be handled |
Fields inherited from org.blojsom.plugin.comment.CommentModerationPlugin | final public static String BLOJSOM_COMMENT_MODERATION_PLUGIN_APPROVED(Code)(Java Doc) final public static String COMMENT_MODERATION_ENABLED(Code)(Java Doc)
|
|
|