Class Domain
java.lang.Object
com.michelin.cert.redscan.utils.datalake.DatalakeStorageItem
com.michelin.cert.redscan.utils.models.Domain
- All Implemented Interfaces:
Sendable
Domain model.
- Author:
- Maxime ESCOURBIAC., Axel REMACK.
-
Field Summary
Fields inherited from class com.michelin.cert.redscan.utils.datalake.DatalakeStorageItem
blocked, data, index, parent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends DatalakeStorageItem>
TfromDatalake(kong.unirest.json.JSONObject object) Create DatalakeStorageItem instance from Datalake data.voidConvert json string to object.Get Fanout exchange name.getId()Item ID.getName()Domain name.voidDomain name.toJson()Convert the object to json string.booleanupsert()Upsert the item in Elastic searchContent.Methods inherited from class com.michelin.cert.redscan.utils.datalake.DatalakeStorageItem
block, create, delete, find, find, findAll, findAll, findAll, findAll, findAllContent, findAllContent, findAllContent, findAllContent, findContent, fromDate, getBlocked, getBlockId, getData, getIndex, getLastScanDate, getParent, isBlocked, removeField, search, search, search, search, searchContent, searchContent, searchContent, searchContent, setBlocked, setData, setIndex, setLastScanDate, setParent, toDate, unblock, upsertField
-
Constructor Details
-
Domain
public Domain()Default constructor. -
Domain
Domain constructor.- Parameters:
name- Domain name.
-
Domain
Domain constructor.- Parameters:
name- Domain name.parent- Domain parent.
-
Domain
Domain constructor.- Parameters:
name- Domain name.parent- Domain parent.blocked- Domain blocking status.
-
-
Method Details
-
getId
Description copied from class:DatalakeStorageItemItem ID.- Specified by:
getIdin classDatalakeStorageItem- Returns:
- Item ID.
-
getName
Domain name.- Returns:
- Domain name.
-
setName
Domain name.- Parameters:
name- Domain name.
-
toJson
Description copied from interface:SendableConvert the object to json string. -
fromJson
Description copied from interface:SendableConvert json string to object. -
getFanoutExchangeName
Description copied from interface:SendableGet Fanout exchange name.- Specified by:
getFanoutExchangeNamein interfaceSendable- Returns:
- Fanout exchange name.
-
fromDatalake
Description copied from class:DatalakeStorageItemCreate 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:
fromDatalakein classDatalakeStorageItem- Type Parameters:
T- DatalakeStorageItem children.- Parameters:
object- Datalake data.- Returns:
- DatalakeStorageItem instantiated.
-
upsert
Description copied from class:DatalakeStorageItemUpsert the item in Elastic searchContent. This operation cannot be mutualized and must be defined in each children classes.- Specified by:
upsertin classDatalakeStorageItem- Returns:
- True if the upsert is successful.
- Throws:
DatalakeStorageException- Exception with the storage.
-