All Implemented Interfaces:
Sendable

public class Ip extends DatalakeStorageItem implements Sendable
Ip model.
Author:
Maxime ESCOURBIAC.
  • Constructor Details

    • Ip

      public Ip()
      Default constructor.
    • Ip

      public Ip(String value)
      Ip constructor.
      Parameters:
      value - Ip value.
    • Ip

      public Ip(String value, String parent)
      Ip constructor.
      Parameters:
      value - Ip value.
      parent - Ip parent.
    • Ip

      public Ip(String value, String parent, boolean blocked)
      Ip constructor.
      Parameters:
      value - Ip value.
      parent - Ip parent.
      blocked - Ip blocking status.
  • Method Details

    • getId

      public String getId()
      Description copied from class: DatalakeStorageItem
      Item ID.
      Specified by:
      getId in class DatalakeStorageItem
      Returns:
      Item ID.
    • getValue

      public String getValue()
      Get ip adress.
      Returns:
      Ip adress.
    • setValue

      public void setValue(String value)
      Set ip adress.
      Parameters:
      value - Ip adress.
    • fromDatalake

      protected <T extends DatalakeStorageItem> T fromDatalake(kong.unirest.json.JSONObject object)
      Description copied from class: DatalakeStorageItem
      Create DatalakeStorageItem instance from Datalake data. Be careful to verify if the JSON object parameter is not null. If object is null => return null.
      Specified by:
      fromDatalake in class DatalakeStorageItem
      Type Parameters:
      T - DatalakeStorageItem children.
      Parameters:
      object - Datalake data.
      Returns:
      DatalakeStorageItem instantiated.
    • upsert

      public boolean upsert() throws DatalakeStorageException
      Description copied from class: DatalakeStorageItem
      Upsert the item in Elastic searchContent. This operation cannot be mutualized and must be defined in each children classes.
      Specified by:
      upsert in class DatalakeStorageItem
      Returns:
      True if the upsert is successful.
      Throws:
      DatalakeStorageException - Exception with the storage.
    • toJson

      public String toJson()
      Description copied from interface: Sendable
      Convert the object to json string.
      Specified by:
      toJson in interface Sendable
      Returns:
      The string representation of the json object.
    • fromJson

      public void fromJson(String json)
      Description copied from interface: Sendable
      Convert json string to object.
      Specified by:
      fromJson in interface Sendable
      Parameters:
      json - The string representation of the json object.
    • getFanoutExchangeName

      public String getFanoutExchangeName()
      Description copied from interface: Sendable
      Get Fanout exchange name.
      Specified by:
      getFanoutExchangeName in interface Sendable
      Returns:
      Fanout exchange name.