net.sourceforge.blogentis.plugins.base
Class AbstractCommentExtension

java.lang.Object
  extended bynet.sourceforge.blogentis.plugins.AbstractExtension
      extended bynet.sourceforge.blogentis.plugins.AbstractBlogExtension
          extended bynet.sourceforge.blogentis.plugins.base.AbstractCommentExtension
All Implemented Interfaces:
IBlogExtension, ICommentExtension, IExtension

public abstract class AbstractCommentExtension
extends AbstractBlogExtension
implements ICommentExtension

Author:
abas

Field Summary
 
Fields inherited from class net.sourceforge.blogentis.plugins.AbstractBlogExtension
blog, preferences
 
Constructor Summary
protected AbstractCommentExtension(IPlugin plugin, Blog blog)
           
 
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 class net.sourceforge.blogentis.plugins.AbstractBlogExtension
getPreferences, setPreferences
 
Methods inherited from class net.sourceforge.blogentis.plugins.AbstractExtension
getPlugin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.blogentis.plugins.IBlogExtension
getPreferences, setPreferences
 
Methods inherited from interface net.sourceforge.blogentis.plugins.IExtension
getName, getPlugin
 

Constructor Detail

AbstractCommentExtension

protected AbstractCommentExtension(IPlugin plugin,
                                   Blog blog)
Method Detail

commentCreated

public boolean commentCreated(BlogRunData data,
                              Comment comment)
Description copied from interface: ICommentExtension
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.

Specified by:
commentCreated in interface ICommentExtension
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)
Description copied from interface: ICommentExtension
Called before a comment will be removed by the user.

Specified by:
commentRemoved in interface ICommentExtension
Parameters:
data -
comment - the coment that will be removed.

commentActions

public java.util.List commentActions(BlogRunData data,
                                     Comment c)
Description copied from interface: ICommentExtension
A List of ILinkTo objects that can provide some comment actions.

Specified by:
commentActions in interface ICommentExtension
Parameters:
data -
c -
Returns:

getNewCommentMessage

public java.lang.String getNewCommentMessage(BlogRunData data)
Description copied from interface: ICommentExtension
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.

Specified by:
getNewCommentMessage in interface ICommentExtension
Parameters:
data -
Returns:


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