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 SummaryFields 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 SummaryConstructors Constructor Description ScanPrioritization()
- 
Method SummaryModifier 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.NestedJsonArraycheckExtraJsonPut, clearParent, getExtraJson, getList, getParent, jsonAnyGetterForParent, putExtraJson, setList
- 
Field Details- 
ARRAY_KEYpublic 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- 
ScanPrioritizationpublic ScanPrioritization()
 
- 
- 
Method Details- 
getArrayKeypublic 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 class- NestedJsonArray<ScanResponse,ScanPlugin>
- Returns:
 
- 
getParentListDescription 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 class- NestedJsonArray<ScanResponse,ScanPlugin>
- Parameters:
- parent- the new parent object which owns the list of children
- Returns:
- the list of children fetched from the parent
 
- 
setParentListDescription 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 class- NestedJsonArray<ScanResponse,ScanPlugin>
- Parameters:
- parent- the parent object which owns the list of children
- list- the new list to set in the parent object
 
- 
getPluginsGets plugins.- Returns:
- the plugins
 
- 
setPluginsSets plugins.- Parameters:
- item- the item
 
- 
getThreatLevelpublic java.lang.Integer getThreatLevel()Gets threat level.- Returns:
- the threat level
 
- 
setThreatLevelpublic void setThreatLevel(java.lang.Integer threatLevel)Sets threat level.- Parameters:
- threatLevel- the threat level
 
- 
takeFieldsFromParentFirst invokes the super class's takeFieldsFromParent, then also takes the persisted threat level from the parent ScanResponse- Overrides:
- takeFieldsFromParentin class- NestedJsonArray<ScanResponse,ScanPlugin>
- Parameters:
- parent- the new parent entity to obtain the extra json from
 
- 
putFieldsIntoParentFirst invokes the super class's putFieldsIntoParent, then also puts the deserialized threatLevel field into the parent- Overrides:
- putFieldsIntoParentin class- NestedJsonArray<ScanResponse,ScanPlugin>
- Parameters:
- parent-
 
 
-