| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
|
| 22 |
|
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
package net.sourceforge.pebble.web.dwr; |
| 33 |
|
|
| 34 |
|
import net.sourceforge.pebble.domain.Comment; |
| 35 |
|
import net.sourceforge.pebble.domain.Blog; |
| 36 |
|
import net.sourceforge.pebble.domain.BlogManager; |
| 37 |
|
import net.sourceforge.pebble.api.decorator.ContentDecoratorContext; |
| 38 |
|
|
| 39 |
|
import java.util.ResourceBundle; |
| 40 |
|
|
| 41 |
|
import org.apache.commons.logging.Log; |
| 42 |
|
import org.apache.commons.logging.LogFactory; |
| 43 |
|
|
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
@author |
| 48 |
|
|
|
|
|
| 0% |
Uncovered Elements: 14 (14) |
Complexity: 2 |
Complexity Density: 0,17 |
|
| 49 |
|
public class Comments { |
| 50 |
|
|
| 51 |
|
private static final Log log = LogFactory.getLog(Comments.class); |
| 52 |
|
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 1 |
Complexity Density: 0,17 |
|
| 53 |
0
|
public Comment previewComment(String blogId, Comment comment) {... |
| 54 |
0
|
Blog blog = BlogManager.getInstance().getBlog(blogId); |
| 55 |
|
|
| 56 |
0
|
ContentDecoratorContext decoratorContext = new ContentDecoratorContext(); |
| 57 |
0
|
decoratorContext.setView(ContentDecoratorContext.DETAIL_VIEW); |
| 58 |
0
|
decoratorContext.setMedia(ContentDecoratorContext.HTML_PAGE); |
| 59 |
|
|
| 60 |
0
|
blog.getContentDecoratorChain().decorate(decoratorContext, comment); |
| 61 |
|
|
| 62 |
0
|
return comment; |
| 63 |
|
} |
| 64 |
|
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 1 |
Complexity Density: 0,17 |
|
| 65 |
0
|
public Comment saveComment(String blogId, Comment comment) {... |
| 66 |
0
|
Blog blog = BlogManager.getInstance().getBlog(blogId); |
| 67 |
|
|
| 68 |
0
|
ContentDecoratorContext decoratorContext = new ContentDecoratorContext(); |
| 69 |
0
|
decoratorContext.setView(ContentDecoratorContext.DETAIL_VIEW); |
| 70 |
0
|
decoratorContext.setMedia(ContentDecoratorContext.HTML_PAGE); |
| 71 |
|
|
| 72 |
0
|
blog.getContentDecoratorChain().decorate(decoratorContext, comment); |
| 73 |
|
|
| 74 |
0
|
return comment; |
| 75 |
|
} |
| 76 |
|
|
| 77 |
|
} |