|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.blojsom.plugin.comment.CommentModerationPlugin org.blojsom.plugin.comment.MathCommentAuthenticationPlugin
Math comment authenticator plugin
Field Summary | |
static java.lang.String |
BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_ANSWER
|
static java.lang.String |
BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_ANSWER_CHECK_PARAM
|
static java.lang.String |
BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_OPERATION
|
static java.lang.String |
BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_STATUS_MESSAGE
|
static java.lang.String |
BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_VALUE1
|
static java.lang.String |
BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_VALUE2
|
Fields inherited from class org.blojsom.plugin.comment.CommentModerationPlugin |
BLOJSOM_COMMENT_MODERATION_PLUGIN_APPROVED, COMMENT_MODERATION_ENABLED |
Constructor Summary | |
MathCommentAuthenticationPlugin()
Math comment authenticator plugin |
Method Summary | |
protected int |
getAnswerForOperation(int value1,
int value2,
int operation)
Return the result from the specified operation where 0 = addition, 1 = subtraction, 2 = multiplication |
protected java.lang.String |
getOperatorForOperation(int operation)
Return the appropriate operator for the operation |
void |
handleEvent(Event event)
Handle an event broadcast from another component |
void |
init()
Initialize this plugin. |
protected void |
moderateComment(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse,
Blog blog,
java.util.Map context,
Entry[] entries)
Simple check to see if comment moderation is enabled |
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 |
processEvent(Event event)
Process an event from another component |
void |
setEventBroadcaster(EventBroadcaster eventBroadcaster)
Set the EventBroadcaster to use |
Methods inherited from class org.blojsom.plugin.comment.CommentModerationPlugin |
cleanup, destroy |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_ANSWER
public static final java.lang.String BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_VALUE1
public static final java.lang.String BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_VALUE2
public static final java.lang.String BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_OPERATION
public static final java.lang.String BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_ANSWER_CHECK_PARAM
public static final java.lang.String BLOJSOM_MATH_AUTHENTICATOR_PLUGIN_STATUS_MESSAGE
Constructor Detail |
public MathCommentAuthenticationPlugin()
Method Detail |
public void setEventBroadcaster(EventBroadcaster eventBroadcaster)
EventBroadcaster
to use
eventBroadcaster
- EventBroadcaster
public void init() throws PluginException
init
in interface Plugin
init
in class CommentModerationPlugin
PluginException
- If there is an error initializing the pluginpublic Entry[] process(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, Blog blog, java.util.Map context, Entry[] entries) throws PluginException
process
in interface Plugin
process
in class CommentModerationPlugin
httpServletRequest
- RequesthttpServletResponse
- Responseblog
- Blog
instancecontext
- Contextentries
- Blog entries retrieved for the particular request
PluginException
- If there is an error processing the blog entriesprotected void moderateComment(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, Blog blog, java.util.Map context, Entry[] entries) throws PluginException
moderateComment
in class CommentModerationPlugin
httpServletRequest
- RequesthttpServletResponse
- Responseblog
- Blog
instancecontext
- Contextentries
- Blog entries retrieved for the particular request
PluginException
- If there is an error in moderating a commentprotected int getAnswerForOperation(int value1, int value2, int operation)
value1
- Value 1value2
- Value 2operation
- Operation where 0 = addition, 1 = subtraction, 2 = multiplication
protected java.lang.String getOperatorForOperation(int operation)
operation
- Operation where 0 = addition, 1 = subtraction, 2 = multiplication
public void handleEvent(Event event)
handleEvent
in interface Listener
event
- Event
to be handledpublic void processEvent(Event event)
processEvent
in interface Listener
event
- Event
to be handled
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |