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
DriverMappergetOffersFor in interface DriverMapperdriverName - the driver nameStorageDriverMapperException - if application cannot have information (reading error for
example)public void addOfferTo(String offerId, String driverName) throws StorageDriverMapperException
DriverMapperaddOfferTo in interface DriverMapperofferId - 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
DriverMapperaddOffersTo in interface DriverMapperoffersIdsToAdd - 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
DriverMapperremoveOfferTo in interface DriverMapperofferId - 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
DriverMapperremoveOffersTo in interface DriverMapperoffersIdsToRemove - 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.