Class Ip
java.lang.Object
com.michelin.cert.redscan.utils.datalake.DatalakeStorageItem
com.michelin.cert.redscan.utils.models.Ip
- All Implemented Interfaces:
Sendable
Ip model.
- Author:
- Maxime ESCOURBIAC.
-
Field Summary
Fields inherited from class com.michelin.cert.redscan.utils.datalake.DatalakeStorageItem
blocked, data, index, parent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <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.getValue()Get ip adress.voidSet ip adress.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
-
Ip
public Ip()Default constructor. -
Ip
Ip constructor.- Parameters:
value- Ip value.
-
Ip
Ip constructor.- Parameters:
value- Ip value.parent- Ip parent.
-
Ip
Ip constructor.- Parameters:
value- Ip value.parent- Ip parent.blocked- Ip blocking status.
-
-
Method Details
-
getId
Description copied from class:DatalakeStorageItemItem ID.- Specified by:
getIdin classDatalakeStorageItem- Returns:
- Item ID.
-
getValue
Get ip adress.- Returns:
- Ip adress.
-
setValue
Set ip adress.- Parameters:
value- Ip adress.
-
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.
-
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.
-