File Source: disablecommentsdecorator.java

         /* 
    P/P   *  Method: net.sourceforge.pebble.decorator.DisableCommentsDecorator__static_init
          */
     1  package net.sourceforge.pebble.decorator;
     2  
     3  import net.sourceforge.pebble.domain.BlogEntry;
     4  import net.sourceforge.pebble.api.decorator.ContentDecoratorContext;
     5  
     6  /**
     7   * Disables comments for the blog entry.
     8   * 
     9   * @author Simon Brown
    10   */
         /* 
    P/P   *  Method: void net.sourceforge.pebble.decorator.DisableCommentsDecorator()
          */
    11  public class DisableCommentsDecorator extends ContentDecoratorSupport {
    12  
    13    /**
    14     * Decorates the specified blog entry.
    15     *
    16     * @param context   the context in which the decoration is running
    17     * @param blogEntry the blog entry to be decorated
    18     */
    19    public void decorate(ContentDecoratorContext context, BlogEntry blogEntry) {
             /* 
    P/P       *  Method: void decorate(ContentDecoratorContext, BlogEntry)
              * 
              *  Preconditions:
              *    blogEntry != null
              *    blogEntry.propertyChangeSupport != null
              *    init'ed(blogEntry.commentsEnabled)
              * 
              *  Postconditions:
              *    blogEntry.commentsEnabled == 0
              */
    20      blogEntry.setCommentsEnabled(false);
    21    }
    22  
    23  }








SofCheck Inspector Build Version : 2.22510
disablecommentsdecorator.java 2010-Jun-25 19:40:32
disablecommentsdecorator.class 2010-Jul-19 20:23:40