Class MarketPriceImportService
java.lang.Object
com.bluebell.greenhouse.sol.importers.market.price.MarketPriceImportService
Service-layer for importing market prices from flat files.
- Version:
- 1.0.10
- Author:
- Stephen Prizio
-
Constructor Summary
ConstructorsConstructorDescriptionMarketPriceImportService(MarketPriceParser marketPriceParser, MarketPriceService marketPriceService) Constructs the market price import service. -
Method Summary
Modifier and TypeMethodDescriptionintimportMarketPrices(InputStream inputStream, String fileName, SymbolAlias symbolAlias, MarketTimeInterval timeInterval, String dateTimeFormat) Imports market prices from a file stream for the given symbol alias and interval.intimportMarketPrices(InputStream inputStream, String fileName, SymbolAlias symbolAlias, MarketTimeInterval timeInterval, String dateTimeFormat, ZoneId zoneId) Imports market prices from a file stream for the given symbol alias and interval.
-
Constructor Details
-
MarketPriceImportService
public MarketPriceImportService(@Qualifier("csvMarketPriceParser") MarketPriceParser marketPriceParser, MarketPriceService marketPriceService) Constructs the market price import service.- Parameters:
marketPriceParser- csv market price parsermarketPriceService- market price service
-
-
Method Details
-
importMarketPrices
public int importMarketPrices(InputStream inputStream, String fileName, SymbolAlias symbolAlias, MarketTimeInterval timeInterval, String dateTimeFormat) throws IOException Imports market prices from a file stream for the given symbol alias and interval.- Parameters:
inputStream- file input streamfileName- file namesymbolAlias-SymbolAliastimeInterval-MarketTimeIntervaldateTimeFormat- optional date time format- Returns:
- count of persisted prices
- Throws:
IOException- io exception
-
importMarketPrices
public int importMarketPrices(InputStream inputStream, String fileName, SymbolAlias symbolAlias, MarketTimeInterval timeInterval, String dateTimeFormat, ZoneId zoneId) throws IOException Imports market prices from a file stream for the given symbol alias and interval.- Parameters:
inputStream- file input streamfileName- file namesymbolAlias-SymbolAliastimeInterval-MarketTimeIntervaldateTimeFormat- optional date time formatzoneId- optional timezone used for non-offset timestamps- Returns:
- count of persisted prices
- Throws:
IOException- io exception
-