Package de.hsh.graja.comment.transform
Class CommentTransformator
java.lang.Object
de.hsh.graja.comment.transform.CommentTransformator
This class can generate html or plain text from
Content
objects.
It has a single public method #transform(Collection, ApplicabilityFilter, CommentRepresentation)
that is used when reporting a result after grading has finished.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
transform
(Collection<? extends Content> comments, ApplicabilityFilter filter, CommentRepresentation repr, Boolean useJavascript, String namespace) Creates a representation of all or a filtered subset of the comments passed as the parametercomments
.
-
Constructor Details
-
CommentTransformator
public CommentTransformator()
-
-
Method Details
-
transform
public static String transform(Collection<? extends Content> comments, ApplicabilityFilter filter, CommentRepresentation repr, Boolean useJavascript, String namespace) Creates a representation of all or a filtered subset of the comments passed as the parametercomments
.- Parameters:
comments
- this is the collection of comments to be transformed to HTML or plain textfilter
- null means no filteringrepr
- the target representationuseJavascript
- may be null meaning no javascript in case of HTML.namespace
- link anchors are rendered in this namespace (optional)- Returns:
- the transformed comment as plain text or HTML
-