All Implemented Interfaces:
Sendable

public class Domain extends DatalakeStorageItem implements Sendable
Domain model.
Author:
Maxime ESCOURBIAC., Axel REMACK.
  • Constructor Details

    • Domain

      public Domain()
      Default constructor.
    • Domain

      public Domain(String name)
      Domain constructor.
      Parameters:
      name - Domain name.
    • Domain

      public Domain(String name, String parent)
      Domain constructor.
      Parameters:
      name - Domain name.
      parent - Domain parent.
    • Domain

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

    • getId

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

      public String getName()
      Domain name.
      Returns:
      Domain name.
    • setName

      public void setName(String name)
      Domain name.
      Parameters:
      name - Domain name.
    • 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.
    • fromDatalake

      public <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.