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 classScanResponse.MultiChild<POJO extends ScanResponse.MultiChild<POJO>>The type Multi child.static classScanResponse.MultiChildLookup<POJO extends ScanResponse.MultiChildLookup<POJO>>The type Multi child lookup.static interfaceScanResponse.ScanResponseChild<POJO extends ScanResponse.ScanResponseChild<POJO>>The interface Scan response child.static classScanResponse.SingleChild<POJO extends ScanResponse.SingleChild<POJO>>The type Single child.static classScanResponse.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>daoThe dao for ScanResponsestatic org.apache.logging.log4j.LoggerloggerThe 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.ScanInfogetInfo()Gets info.java.util.List<ScanPlugin>getPlugins()Gets plugins.ScanPrioritizationgetPrioritization()Gets prioritization.ScanRemediationsSummarygetRemediations()Gets remediations.java.util.List<ScanRemediation>getRemediationsList()Gets remediations list.ScangetScan()Gets scan.java.lang.IntegergetThreatLevel()Gets threat level.java.lang.StringgetUrlPath()Gets url path for the Nessus APIstatic java.lang.StringgetUrlPath(int scanId)Gets url path to obtain the scan responsejava.util.List<Vulnerability>getVulnerabilities()Gets vulnerabilities.voidputExtraJson(java.lang.String key, java.lang.Object value)Puts extra json during deserializationvoidsetHistory(java.util.List<ScanHistory> history)Sets history.voidsetHosts(java.util.List<ScanHost> hosts)Sets hosts.voidsetInfo(ScanInfo info)Sets info.voidsetPlugins(java.util.List<ScanPlugin> plugins)Sets plugins.voidsetPrioritization(ScanPrioritization prioritization)Sets prioritization.voidsetRemediations(ScanRemediationsSummary remediations)Sets remediations.voidsetRemediationsList(java.util.List<ScanRemediation> remediationsList)Sets remediations list.voidsetScan(Scan scan)Sets scan.voidsetThreatLevel(java.lang.Integer threatLevel)Sets threat level.voidsetVulnerabilities(java.util.List<Vulnerability> vulnerabilities)Sets vulnerabilities.Methods inherited from class tenapull.data.entity.response.NessusResponseGenerateTimestamp
getTimestamp, setTimestampMethods inherited from class tenapull.data.entity.template.NaturalIdPojo
__set, equals, getId, hashCode, setIdMethods inherited from class tenapull.data.entity.template.ExtensibleJsonPojo
__prepare, getExtraJson, getExtraJson, setExtraJson, toJsonNode, toJsonString, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:NessusResponseGets url path for the Nessus API- Specified by:
getUrlPathin interfaceNessusResponse- Specified by:
getUrlPathin classNessusResponseGenerateTimestamp- Returns:
- the url path
- Throws:
java.lang.IllegalStateException
-
_prepare
public void _prepare()Description copied from interface:DbPojoPerform 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:ExtensibleJsonPojoPuts extra json during deserialization- Overrides:
putExtraJsonin 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:ExtensibleJsonPojoGets extra json map for serialization- Overrides:
getExtraJsonMapin classExtensibleJsonPojo- Returns:
- the extra json map
-