Class Publisher

java.lang.Object
com.spertus.jacquard.publisher.Publisher
Direct Known Subclasses:
GradescopePublisher

public abstract class Publisher extends Object
This class contains code to publish the results of grading to an external grading system, such as Gradescope.
See Also:
  • Constructor Details

    • Publisher

      public Publisher()
  • Method Details

    • serializeResults

      public abstract String serializeResults(List<Result> results)
      Serializes the results in the format appropriate for the external grading tool.
      Parameters:
      results - the results
      Returns:
      a string representation of the results
    • publishResults

      public boolean publishResults(List<Result> results)
      Publishes the results in a manner appropriate for the external grading tool. This does nothing (and returns false) if it detects that it is not running within the tool (i.e., is on a development machine).
      Parameters:
      results - the results
      Returns:
      whether the results were successfully published
    • publishResults

      public abstract boolean publishResults(List<Result> results, Result.Order order)
      Publishes the results in a manner appropriate for the external grading tool. This does nothing (and returns false) if it detects that it is not running within the tool (i.e., is on a development machine).
      Parameters:
      results - the results
      order - how to order the results
      Returns:
      whether the results were successfully published
    • displayResults

      public abstract void displayResults(List<Result> results)
      Displays the results in a human-readable format.
      Parameters:
      results - the results