public class FileDriverMapper extends Object implements DriverMapper
Modifier and Type | Method and Description |
---|---|
void |
addOffersTo(List<String> offersIdsToAdd,
String driverName)
Add list of offers to a driver's offers persisted list (and persists it)
|
void |
addOfferTo(String offerId,
String driverName)
Add one offer to a driver's offers persisted list (and persists it)
|
static FileDriverMapper |
getInstance()
Get the driver mapper instance
|
List<String> |
getOffersFor(String driverName)
Get persisted offers list for a driver
|
void |
removeOffersTo(List<String> offersIdsToRemove,
String driverName)
Remove list of offers to a driver's offers persisted list (and persist
it)
|
void |
removeOfferTo(String offerId,
String driverName)
Remove one offer to a driver's offers persisted list (and persists it)
|
public static FileDriverMapper getInstance() throws StorageDriverMapperException
StorageDriverMapperException
- if cannot initialize FileDriverMapper (error with the
configuration file)public List<String> getOffersFor(String driverName) throws StorageDriverMapperException
DriverMapper
getOffersFor
in interface DriverMapper
driverName
- the driver nameStorageDriverMapperException
- if application cannot have information (reading error for
example)public void addOfferTo(String offerId, String driverName) throws StorageDriverMapperException
DriverMapper
addOfferTo
in interface DriverMapper
offerId
- the offer ID to append and persistdriverName
- the driver nameStorageDriverMapperException
- if application cannot have information (writing error for
example)public void addOffersTo(List<String> offersIdsToAdd, String driverName) throws StorageDriverMapperException
DriverMapper
addOffersTo
in interface DriverMapper
offersIdsToAdd
- the offers IDs list to append and persistdriverName
- the driver nameStorageDriverMapperException
- if application cannot have information (writing error for
example)public void removeOfferTo(String offerId, String driverName) throws StorageDriverMapperException
DriverMapper
removeOfferTo
in interface DriverMapper
offerId
- the offer ID to remove and persistdriverName
- the driver nameStorageDriverMapperException
- if application cannot have information (writing error for
example)public void removeOffersTo(List<String> offersIdsToRemove, String driverName) throws StorageDriverMapperException
DriverMapper
removeOffersTo
in interface DriverMapper
offersIdsToRemove
- the offers IDs list to remove and persistdriverName
- the driver nameStorageDriverMapperException
- if application cannot have information (writing error for
example)Copyright © 2018 Vitam. All rights reserved.