File Source: disableresponsedecorator.java
/*
P/P * Method: net.sourceforge.pebble.decorator.DisableResponseDecorator__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 and TrackBacks for the blog entry.
8 *
9 * @author Simon Brown
10 */
/*
P/P * Method: void net.sourceforge.pebble.decorator.DisableResponseDecorator()
*/
11 public class DisableResponseDecorator 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)
* init'ed(blogEntry.trackBacksEnabled)
*
* Postconditions:
* blogEntry.commentsEnabled == 0
* blogEntry.trackBacksEnabled == 0
*/
20 blogEntry.setCommentsEnabled(false);
21 blogEntry.setTrackBacksEnabled(false);
22 }
23
24 }
SofCheck Inspector Build Version : 2.22510
| disableresponsedecorator.java |
2010-Jun-25 19:40:32 |
| disableresponsedecorator.class |
2010-Jul-19 20:23:40 |