Class SubmitToSpartaServer

java.lang.Object
be.kuleuven.cs.distrinet.sparta.cli.cmd.export.SubmitToSpartaServer
All Implemented Interfaces:
Exporter

public class SubmitToSpartaServer extends Object implements Exporter
Exporter that submits the analysis results to a SPARTA server via the command line. The HTTP mechanics are delegated to SpartaServerClient (shared with the CI runner); this class only carries the submission coordinates and serializes the threat list.
  • Constructor Details

    • SubmitToSpartaServer

      public SubmitToSpartaServer(String server, String token, String commitId)
      Create a new server submission step.
      Parameters:
      server - the server submission url.
      token - the server submission token.
      commitId - the commit id to submit the results under.
  • Method Details

    • export

      public boolean export(Collection<Threat> results)
      Description copied from interface: Exporter
      Run the export on the provided collection of threats.
      Specified by:
      export in interface Exporter
      Parameters:
      results - the collection of threats to export
      Returns:
      true if the export succeeded; false if it failed.