Package tenapull.data.entity.response
Class ScanResponse
java.lang.Object
tenapull.data.entity.template.ExtensibleJsonPojo
tenapull.data.entity.template.NaturalIdPojo
tenapull.data.entity.response.NessusResponseGenerateTimestamp
tenapull.data.entity.response.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
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ScanResponse.MultiChild<POJO extends ScanResponse.MultiChild<POJO>>
The type Multi child.static class
ScanResponse.MultiChildLookup<POJO extends ScanResponse.MultiChildLookup<POJO>>
The type Multi child lookup.static interface
ScanResponse.ScanResponseChild<POJO extends ScanResponse.ScanResponseChild<POJO>>
The interface Scan response child.static class
ScanResponse.SingleChild<POJO extends ScanResponse.SingleChild<POJO>>
The type Single child.static class
ScanResponse.SingleChildLookup<POJO extends ScanResponse.SingleChildLookup<POJO>>
The type Single child lookup.Nested classes/interfaces inherited from interface tenapull.data.entity.response.NessusResponse
NessusResponse.MultiChildTemplate<POJO extends NessusResponse.MultiChildTemplate<POJO,R>,R extends NessusResponse>, NessusResponse.ResponseChild<POJO extends NessusResponse.ResponseChild<POJO,R>,R extends NessusResponse>, NessusResponse.SingleChildTemplate<POJO extends NessusResponse.SingleChildTemplate<POJO,R>,R extends NessusResponse>
-
Field Summary
Fields Modifier and Type Field Description static Dao<ScanResponse>
dao
The dao for ScanResponsestatic org.apache.logging.log4j.Logger
logger
The logger for ScanResponse -
Constructor Summary
Constructors Constructor Description ScanResponse()
-
Method Summary
Modifier and Type Method Description void
_prepare()
Perform any operations necessary to prepare this pojo for insertion or updating in the databasejava.util.Map<java.lang.String,com.fasterxml.jackson.databind.JsonNode>
getExtraJsonMap()
Gets extra json map for serializationjava.util.List<ScanHistory>
getHistory()
Gets history.java.util.List<ScanHost>
getHosts()
Gets hosts.ScanInfo
getInfo()
Gets info.java.util.List<ScanPlugin>
getPlugins()
Gets plugins.ScanPrioritization
getPrioritization()
Gets prioritization.ScanRemediationsSummary
getRemediations()
Gets remediations.java.util.List<ScanRemediation>
getRemediationsList()
Gets remediations list.Scan
getScan()
Gets scan.java.lang.Integer
getThreatLevel()
Gets threat level.java.lang.String
getUrlPath()
Gets url path for the Nessus APIstatic java.lang.String
getUrlPath(int scanId)
Gets url path to obtain the scan responsejava.util.List<Vulnerability>
getVulnerabilities()
Gets vulnerabilities.void
putExtraJson(java.lang.String key, java.lang.Object value)
Puts extra json during deserializationvoid
setHistory(java.util.List<ScanHistory> history)
Sets history.void
setHosts(java.util.List<ScanHost> hosts)
Sets hosts.void
setInfo(ScanInfo info)
Sets info.void
setPlugins(java.util.List<ScanPlugin> plugins)
Sets plugins.void
setPrioritization(ScanPrioritization prioritization)
Sets prioritization.void
setRemediations(ScanRemediationsSummary remediations)
Sets remediations.void
setRemediationsList(java.util.List<ScanRemediation> remediationsList)
Sets remediations list.void
setScan(Scan scan)
Sets scan.void
setThreatLevel(java.lang.Integer threatLevel)
Sets threat level.void
setVulnerabilities(java.util.List<Vulnerability> vulnerabilities)
Sets vulnerabilities.Methods inherited from class tenapull.data.entity.response.NessusResponseGenerateTimestamp
getTimestamp, setTimestamp
Methods inherited from class tenapull.data.entity.template.NaturalIdPojo
__set, equals, getId, hashCode, setId
Methods inherited from class tenapull.data.entity.template.ExtensibleJsonPojo
__prepare, getExtraJson, getExtraJson, setExtraJson, toJsonNode, toJsonString, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface tenapull.data.entity.template.DbPojo
getId, setId, toJsonNode, toJsonString
-
Field Details
-
Constructor Details
-
ScanResponse
public ScanResponse()
-
-
Method Details
-
getUrlPath
public static java.lang.String getUrlPath(int scanId) throws java.lang.IllegalArgumentExceptionGets 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.IllegalStateExceptionDescription copied from interface:NessusResponse
Gets url path for the Nessus API- Specified by:
getUrlPath
in interfaceNessusResponse
- Specified by:
getUrlPath
in classNessusResponseGenerateTimestamp
- 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
Gets scan.- Returns:
- the scan
-
setScan
Sets scan.- Parameters:
scan
- the scan
-
getInfo
Gets info.- Returns:
- the info
-
setInfo
Sets info.- Parameters:
info
- the info
-
getHosts
Gets hosts.- Returns:
- the hosts
-
setHosts
Sets hosts.- Parameters:
hosts
- the hosts
-
getVulnerabilities
Gets vulnerabilities.- Returns:
- the vulnerabilities
-
setVulnerabilities
Sets vulnerabilities.- Parameters:
vulnerabilities
- the vulnerabilities
-
getRemediations
Gets remediations.- Returns:
- the remediations
-
setRemediations
Sets remediations.- Parameters:
remediations
- the remediations
-
getRemediationsList
Gets remediations list.- Returns:
- the remediations list
-
setRemediationsList
Sets remediations list.- Parameters:
remediationsList
- the remediations list
-
getHistory
Gets history.- Returns:
- the history
-
setHistory
Sets history.- Parameters:
history
- the history
-
getPlugins
Gets plugins.- Returns:
- the plugins
-
setPlugins
Sets plugins.- Parameters:
plugins
- the plugins
-
setPrioritization
Sets prioritization.- Parameters:
prioritization
- the prioritization
-
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 classExtensibleJsonPojo
- Parameters:
key
- the keyvalue
- 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 classExtensibleJsonPojo
- Returns:
- the extra json map
-