Class ScanPlugin

java.lang.Object
tenapull.data.entity.scan.ScanPlugin
All Implemented Interfaces:
NessusResponse.ResponseChild<ScanPlugin,​ScanResponse>, ScanResponse.ScanResponseChild<ScanPlugin>, DbPojo, MapLookupPojo<ScanPlugin>

@Entity(name="ScanPlugin")
public class ScanPlugin
extends java.lang.Object
implements MapLookupPojo<ScanPlugin>, ScanResponse.ScanResponseChild<ScanPlugin>
Represents the scan-specific fields (host_count, and hosts) in the plugin object from the "plugins" array returned by the Nessus API in /scans/<scan-id>. Also serves as a join table between scan_response and plugin
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static MapLookupDao<ScanPlugin> dao  
  • Constructor Summary

    Constructors 
    Constructor Description
    ScanPlugin()  
  • Method Summary

    Modifier and Type Method Description
    java.util.Map<java.lang.String,​java.lang.Object> _getSearchMap()
    Return a map to be used by the POJO type's dao, to find the database record matching the same record that this pojo represents
    boolean _match​(ScanPlugin o)
    Determine if this pojo represents the same DB record as another POJO of the same type.
    void _prepare()
    Perform any operations necessary to prepare this pojo for insertion or updating in the database
    void _set​(ScanPlugin o)
    Set the values in this POJO to be identical to another POJO representing the same DB record
    boolean equals​(java.lang.Object o)  
    java.lang.Integer getHostCount()  
    java.util.List<PluginHost> getHosts()  
    int getId()
    Get the surrogate or natural primary key id for the lookup
    Plugin getPlugin()  
    ScanResponse getResponse()
    Gets parent response.
    int hashCode()  
    void setHostCount​(java.lang.Integer hostCount)  
    void setHosts​(java.util.List<PluginHost> hosts)  
    void setId​(int id)
    Set the surrogate or natural primary key id for the lookup
    void setPlugin​(Plugin plugin)  
    void setResponse​(ScanResponse response)
    Sets parent response.
    com.fasterxml.jackson.databind.node.ObjectNode toJsonNode()
    Convert the pojo into a JsonNode
    java.lang.String toJsonString()
    Convert the pojo into a Json string
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • getId

      public int getId()
      Description copied from interface: DbPojo
      Get the surrogate or natural primary key id for the lookup
      Specified by:
      getId in interface DbPojo
      Returns:
      the id
    • setId

      public void setId​(int id)
      Description copied from interface: DbPojo
      Set the surrogate or natural primary key id for the lookup
      Specified by:
      setId in interface DbPojo
      Parameters:
      id - the id
    • toJsonNode

      public com.fasterxml.jackson.databind.node.ObjectNode toJsonNode()
      Description copied from interface: DbPojo
      Convert the pojo into a JsonNode
      Specified by:
      toJsonNode in interface DbPojo
      Returns:
      a JsonNode representing the serialization of this pojo
    • toJsonString

      public java.lang.String toJsonString()
      Description copied from interface: DbPojo
      Convert the pojo into a Json string
      Specified by:
      toJsonString in interface DbPojo
      Returns:
      a string representing the Json serialization of this pojo
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • _prepare

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

      public boolean _match​(ScanPlugin o)
      Description copied from interface: MapLookupPojo
      Determine if this pojo represents the same DB record as another POJO of the same type. Note that this is NOT the same as the equals() method (though it may be in certain cases). Equals may be used to determine if two pojos of the same type contain all of the same values, regardless of whether they represent the same DB record (depending on implementation) while _match determines only if they represent the same DB record even if some of the values may not be equivalent. In many cases the two methods may be the same, but their purpose is different.
      Specified by:
      _match in interface MapLookupPojo<ScanPlugin>
      Parameters:
      o - the other pojo to match
      Returns:
      true if the two pojos represent the same DB record, false if not
    • _getSearchMap

      public java.util.Map<java.lang.String,​java.lang.Object> _getSearchMap()
      Description copied from interface: MapLookupPojo
      Return a map to be used by the POJO type's dao, to find the database record matching the same record that this pojo represents
      Specified by:
      _getSearchMap in interface MapLookupPojo<ScanPlugin>
      Returns:
    • getPlugin

      public Plugin getPlugin()
    • setPlugin

      public void setPlugin​(Plugin plugin)
    • getHostCount

      public java.lang.Integer getHostCount()
    • setHostCount

      public void setHostCount​(java.lang.Integer hostCount)
    • getHosts

      public java.util.List<PluginHost> getHosts()
    • setHosts

      public void setHosts​(java.util.List<PluginHost> hosts)
    • getResponse

      public ScanResponse getResponse()
      Description copied from interface: NessusResponse.ResponseChild
      Gets parent response.
      Specified by:
      getResponse in interface NessusResponse.ResponseChild<ScanPlugin,​ScanResponse>
      Returns:
      the response
    • setResponse

      public void setResponse​(ScanResponse response)
      Description copied from interface: NessusResponse.ResponseChild
      Sets parent response.
      Specified by:
      setResponse in interface NessusResponse.ResponseChild<ScanPlugin,​ScanResponse>
      Parameters:
      response - the response
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • _set

      public void _set​(ScanPlugin o)
      Description copied from interface: MapLookupPojo
      Set the values in this POJO to be identical to another POJO representing the same DB record
      Specified by:
      _set in interface MapLookupPojo<ScanPlugin>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object