net.sourceforge.blogentis.plugins.base
Interface ICommentExtension

All Superinterfaces:
IBlogExtension, IExtension
All Known Implementing Classes:
AbstractCommentExtension

public interface ICommentExtension
extends IBlogExtension

Author:
abas

Method Summary
 java.util.List commentActions(BlogRunData data, Comment c)
          A List of ILinkTo objects that can provide some comment actions.
 boolean commentCreated(BlogRunData data, Comment comment)
          Invoked for each comment creation.
 void commentRemoved(BlogRunData data, Comment comment)
          Called before a comment will be removed by the user.
 java.lang.String getNewCommentMessage(BlogRunData data)
          Get a string that should be shown to the user on the new comment form.
 
Methods inherited from interface net.sourceforge.blogentis.plugins.IBlogExtension
getPreferences, setPreferences
 
Methods inherited from interface net.sourceforge.blogentis.plugins.IExtension
getName, getPlugin
 

Method Detail

commentCreated

public boolean commentCreated(BlogRunData data,
                              Comment comment)
Invoked for each comment creation. Plugins can modify the comment to their hearts content, and indicate wether the comment should be accepter or rejected via their return value. Possible uses for this method include spam detection, banning, formatting functions, HTML tidying and restricting.

Parameters:
data - the BlogRunData of the current request.
comment - the Comment that has been created, just before saving.
Returns:
true if the comment should be created, false if the comment should be rejected. If the comment has been rejected, the data.message will contain the reason.

commentRemoved

public void commentRemoved(BlogRunData data,
                           Comment comment)
Called before a comment will be removed by the user.

Parameters:
data -
comment - the coment that will be removed.

commentActions

public java.util.List commentActions(BlogRunData data,
                                     Comment c)
A List of ILinkTo objects that can provide some comment actions.

Parameters:
data -
c -
Returns:

getNewCommentMessage

public java.lang.String getNewCommentMessage(BlogRunData data)
Get a string that should be shown to the user on the new comment form. This could be used for explaining the appropriate tags etc.

Parameters:
data -
Returns:


Copyright © 2003-2004 SourceForge.net. All Rights Reserved.