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 maps the CLI options to a submission and serializes the threat list.
  • Constructor Details

    • SubmitToSpartaServer

      public SubmitToSpartaServer()
  • Method Details

    • getOptions

      public org.apache.commons.cli.Option[] getOptions()
      Description copied from interface: Exporter
      Get the options that have to be processed for determining if this command should run.
      Specified by:
      getOptions in interface Exporter
      Returns:
      the array of options this command relies upon.
    • process

      public boolean process(org.apache.commons.cli.CommandLine cmd, Collection<Threat> results)
      Description copied from interface: Exporter
      Process the parsed options and run the export if needed on the provided collection of threats.
      Specified by:
      process in interface Exporter
      Parameters:
      cmd - the processed command line options.
      results - the collection of threats to export
      Returns:
      true if the export succeeded or was not requested; false if it failed.