Class ScanResponse

All Implemented Interfaces:
NessusResponse, DbPojo

@Entity(name="ScanResponse")
public class ScanResponse
extends NessusResponseGenerateTimestamp
Represents a response from the Nessus API at the url path /scans/<scan-id> with details about a specific scan
  • Field Details

    • logger

      public static final org.apache.logging.log4j.Logger logger
      The logger for ScanResponse
    • dao

      public static final Dao<ScanResponse> dao
      The dao for ScanResponse
  • Constructor Details

  • Method Details

    • getUrlPath

      public static java.lang.String getUrlPath​(int scanId) throws java.lang.IllegalArgumentException
      Gets url path to obtain the scan response
      Parameters:
      scanId - the scan id
      Returns:
      the url path
      Throws:
      java.lang.IllegalArgumentException - if the scanId is invalid
    • getUrlPath

      public java.lang.String getUrlPath() throws java.lang.IllegalStateException
      Description copied from interface: NessusResponse
      Gets url path for the Nessus API
      Specified by:
      getUrlPath in interface NessusResponse
      Specified by:
      getUrlPath in class NessusResponseGenerateTimestamp
      Returns:
      the url path
      Throws:
      java.lang.IllegalStateException
    • _prepare

      public void _prepare()
      Description copied from interface: DbPojo
      Perform any operations necessary to prepare this pojo for insertion or updating in the database
    • getScan

      public Scan getScan()
      Gets scan.
      Returns:
      the scan
    • setScan

      public void setScan​(Scan scan)
      Sets scan.
      Parameters:
      scan - the scan
    • getInfo

      public ScanInfo getInfo()
      Gets info.
      Returns:
      the info
    • setInfo

      public void setInfo​(ScanInfo info)
      Sets info.
      Parameters:
      info - the info
    • getHosts

      public java.util.List<ScanHost> getHosts()
      Gets hosts.
      Returns:
      the hosts
    • setHosts

      public void setHosts​(java.util.List<ScanHost> hosts)
      Sets hosts.
      Parameters:
      hosts - the hosts
    • getVulnerabilities

      public java.util.List<Vulnerability> getVulnerabilities()
      Gets vulnerabilities.
      Returns:
      the vulnerabilities
    • setVulnerabilities

      public void setVulnerabilities​(java.util.List<Vulnerability> vulnerabilities)
      Sets vulnerabilities.
      Parameters:
      vulnerabilities - the vulnerabilities
    • getRemediations

      public ScanRemediationsSummary getRemediations()
      Gets remediations.
      Returns:
      the remediations
    • setRemediations

      public void setRemediations​(ScanRemediationsSummary remediations)
      Sets remediations.
      Parameters:
      remediations - the remediations
    • getRemediationsList

      public java.util.List<ScanRemediation> getRemediationsList()
      Gets remediations list.
      Returns:
      the remediations list
    • setRemediationsList

      public void setRemediationsList​(java.util.List<ScanRemediation> remediationsList)
      Sets remediations list.
      Parameters:
      remediationsList - the remediations list
    • getHistory

      public java.util.List<ScanHistory> getHistory()
      Gets history.
      Returns:
      the history
    • setHistory

      public void setHistory​(java.util.List<ScanHistory> history)
      Sets history.
      Parameters:
      history - the history
    • getPlugins

      public java.util.List<ScanPlugin> getPlugins()
      Gets plugins.
      Returns:
      the plugins
    • setPlugins

      public void setPlugins​(java.util.List<ScanPlugin> plugins)
      Sets plugins.
      Parameters:
      plugins - the plugins
    • setPrioritization

      public void setPrioritization​(ScanPrioritization prioritization)
      Sets prioritization.
      Parameters:
      prioritization - the prioritization
    • getPrioritization

      public ScanPrioritization getPrioritization()
      Gets prioritization.
      Returns:
      the prioritization
    • getThreatLevel

      public java.lang.Integer getThreatLevel()
      Gets threat level.
      Returns:
      the threat level
    • setThreatLevel

      public void setThreatLevel​(java.lang.Integer threatLevel)
      Sets threat level.
      Parameters:
      threatLevel - the threat level
    • putExtraJson

      public void putExtraJson​(java.lang.String key, java.lang.Object value)
      Description copied from class: ExtensibleJsonPojo
      Puts extra json during deserialization
      Overrides:
      putExtraJson in class ExtensibleJsonPojo
      Parameters:
      key - the key
      value - the value
    • getExtraJsonMap

      public java.util.Map<java.lang.String,​com.fasterxml.jackson.databind.JsonNode> getExtraJsonMap()
      Description copied from class: ExtensibleJsonPojo
      Gets extra json map for serialization
      Overrides:
      getExtraJsonMap in class ExtensibleJsonPojo
      Returns:
      the extra json map