Package tenapull.data.entity.scan
Class ScanPrioritization
java.lang.Object
tenapull.data.deserialize.NestedJsonArray<ScanResponse,ScanPlugin>
tenapull.data.entity.scan.ScanPrioritization
public class ScanPrioritization extends NestedJsonArray<ScanResponse,ScanPlugin>
Represents a prioritization object returned by the Nessus API in /scans/<scan-id>,
which contains the list of plugins. This is just a wrapper for the purposes of serialization /
deserialization, and is not an actual DB/ORM entity. It is linked to a parent ScanResponse
which persists the fields contained in this wrapper
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringARRAY_KEYThe key for the array of plugins, as needed by the NestJsonArray abstract super class -
Constructor Summary
Constructors Constructor Description ScanPrioritization() -
Method Summary
Modifier and Type Method Description java.lang.StringgetArrayKey()Method that must be implemented by concrete subclasses, providing the JSON key for the array this object wraps.protected java.util.List<ScanPlugin>getParentList(ScanResponse parent)Method that must be implemented by concrete subclasses, which grabs the list of child entities from the parent objectjava.util.List<ScanPlugin>getPlugins()Gets plugins.java.lang.IntegergetThreatLevel()Gets threat level.voidputFieldsIntoParent(ScanResponse parent)First invokes the super class's putFieldsIntoParent, then also puts the deserialized threatLevel field into the parentprotected voidsetParentList(ScanResponse parent, java.util.List<ScanPlugin> list)Method that must be implemented by concrete subclasses, which sets the list of child entities in the parent objectvoidsetPlugins(java.util.List<ScanPlugin> item)Sets plugins.voidsetThreatLevel(java.lang.Integer threatLevel)Sets threat level.voidtakeFieldsFromParent(ScanResponse parent)First invokes the super class's takeFieldsFromParent, then also takes the persisted threat level from the parent ScanResponseMethods inherited from class tenapull.data.deserialize.NestedJsonArray
checkExtraJsonPut, clearParent, getExtraJson, getList, getParent, jsonAnyGetterForParent, putExtraJson, setList
-
Field Details
-
ARRAY_KEY
public static final java.lang.String ARRAY_KEYThe key for the array of plugins, as needed by the NestJsonArray abstract super class- See Also:
- Constant Field Values
-
-
Constructor Details
-
ScanPrioritization
public ScanPrioritization()
-
-
Method Details
-
getArrayKey
public java.lang.String getArrayKey()Description copied from class:NestedJsonArrayMethod that must be implemented by concrete subclasses, providing the JSON key for the array this object wraps.- Specified by:
getArrayKeyin classNestedJsonArray<ScanResponse,ScanPlugin>- Returns:
-
getParentList
Description copied from class:NestedJsonArrayMethod that must be implemented by concrete subclasses, which grabs the list of child entities from the parent object- Specified by:
getParentListin classNestedJsonArray<ScanResponse,ScanPlugin>- Parameters:
parent- the new parent object which owns the list of children- Returns:
- the list of children fetched from the parent
-
setParentList
Description copied from class:NestedJsonArrayMethod that must be implemented by concrete subclasses, which sets the list of child entities in the parent object- Specified by:
setParentListin classNestedJsonArray<ScanResponse,ScanPlugin>- Parameters:
parent- the parent object which owns the list of childrenlist- the new list to set in the parent object
-
getPlugins
Gets plugins.- Returns:
- the plugins
-
setPlugins
Sets plugins.- Parameters:
item- the item
-
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
-
takeFieldsFromParent
First invokes the super class's takeFieldsFromParent, then also takes the persisted threat level from the parent ScanResponse- Overrides:
takeFieldsFromParentin classNestedJsonArray<ScanResponse,ScanPlugin>- Parameters:
parent- the new parent entity to obtain the extra json from
-
putFieldsIntoParent
First invokes the super class's putFieldsIntoParent, then also puts the deserialized threatLevel field into the parent- Overrides:
putFieldsIntoParentin classNestedJsonArray<ScanResponse,ScanPlugin>- Parameters:
parent-
-