de.speexx.pebble.decorator
Class AgeBasedDisableResponseDecorator

java.lang.Object
  extended bypebble.decorator.BlogEntryDecoratorSupport
      extended bypebble.decorator.DisableResponseDecorator
          extended byde.speexx.pebble.decorator.AgeBasedDisableResponseDecorator
All Implemented Interfaces:
pebble.decorator.BlogEntryDecorator

public class AgeBasedDisableResponseDecorator
extends pebble.decorator.DisableResponseDecorator

Diables the reponses to all comments or trackbacks which are older than the maximum given days defined in the property DAY_PROPERTY or the DEFAULT_DAYS.

This decorator 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
AgeBasedDisableResponseDecorator()
           
 
Method Summary
 void decorate(pebble.decorator.BlogEntryDecoratorChain chain, pebble.decorator.BlogEntryDecoratorContext context)
          Executes the logic associated with this decorator.
 
Methods inherited from class pebble.decorator.BlogEntryDecoratorSupport
getBlog, setBlog
 
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

AgeBasedDisableResponseDecorator

public AgeBasedDisableResponseDecorator()
Method Detail

decorate

public void decorate(pebble.decorator.BlogEntryDecoratorChain chain,
                     pebble.decorator.BlogEntryDecoratorContext context)
              throws pebble.decorator.BlogEntryDecoratorException
Executes the logic associated with this decorator.

Parameters:
chain - the chain of BlogEntryDecorators to apply
context - the context in which the decoration is running
Throws:
pebble.decorator.BlogEntryDecoratorException - if something goes wrong when running the decorator


Copyright © 2005 . All Rights Reserved.