Class CommentTransformator

java.lang.Object
de.hsh.graja.comment.transform.CommentTransformator

public class CommentTransformator extends Object
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 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 parameter comments.
      Parameters:
      comments - this is the collection of comments to be transformed to HTML or plain text
      filter - null means no filtering
      repr - the target representation
      useJavascript - 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