|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This report was generated with an evaluation server license. Purchase Clover or configure your license. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DisableCommentsDecorator | Line # 11 | 1 | 0% | 1 | 0 | 100% |
1.0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (2) | |||
| Result | |||
|
1.0
|
net.sourceforge.pebble.decorator.DisableCommentsDecoratorTest.testImageUriInBody
net.sourceforge.pebble.decorator.DisableCommentsDecoratorTest.testImageUriInBody
|
1 PASS | |
|
1.0
|
net.sourceforge.pebble.decorator.DisableCommentsDecoratorTest.testImageUriInBody
net.sourceforge.pebble.decorator.DisableCommentsDecoratorTest.testImageUriInBody
|
1 PASS | |
| 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 | */ | |
| 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 | 2 |
public void decorate(ContentDecoratorContext context, BlogEntry blogEntry) { |
| 20 | 2 | blogEntry.setCommentsEnabled(false); |
| 21 | } | |
| 22 | ||
| 23 | } | |
|
||||||||||||