de.speexx.pebble.response
Class AgeBasedRejectResponseListener

java.lang.Object
  extended bypebble.event.response.BlogEntryResponseListenerSupport
      extended byde.speexx.pebble.response.AgeBasedRejectResponseListener
All Implemented Interfaces:
pebble.event.comment.CommentListener, pebble.event.trackback.TrackBackListener

public class AgeBasedRejectResponseListener
extends pebble.event.response.BlogEntryResponseListenerSupport

Marks all comments and trackbacks which are older than the value of the plug-in property DAY_PROPERTY as State.REJECTED. If there is no correct value for the property the listener will use the DEFAULT_DAYS.

The listener is usefull for fight agains trackback and comment spam. Trackback and comment spammer often uses older entries for there dirty work.

Author:
Sascha Kohlmann

Field Summary
static java.lang.String DAY_PROPERTY
          Property name for the time entry.
static java.lang.String DEFAULT_DAYS
          The default time in days if the DAY_PROPERTY is not available.
 
Constructor Summary
AgeBasedRejectResponseListener()
           
 
Method Summary
protected  void blogEntryResponseAdded(pebble.blog.BlogEntryResponse response)
          Disables all responses if the age of the blog entry is older than the days given from the DAY_PROPERTY property.
 
Methods inherited from class pebble.event.response.BlogEntryResponseListenerSupport
blogEntryResponseApproved, blogEntryResponseRejected, blogEntryResponseRemoved, commentAdded, commentApproved, commentRejected, commentRemoved, trackBackAdded, trackBackApproved, trackBackRejected, trackBackRemoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DAY_PROPERTY

public static final java.lang.String DAY_PROPERTY
Property name for the time entry.

See Also:
Constant Field Values

DEFAULT_DAYS

public static final java.lang.String DEFAULT_DAYS
The default time in days if the DAY_PROPERTY is not available.

See Also:
Constant Field Values
Constructor Detail

AgeBasedRejectResponseListener

public AgeBasedRejectResponseListener()
Method Detail

blogEntryResponseAdded

protected void blogEntryResponseAdded(pebble.blog.BlogEntryResponse response)
Disables all responses if the age of the blog entry is older than the days given from the DAY_PROPERTY property.



Copyright © 2005 . All Rights Reserved.