Class MarketPriceImportService

java.lang.Object
com.bluebell.greenhouse.sol.importers.market.price.MarketPriceImportService

@Service public class MarketPriceImportService extends Object
Service-layer for importing market prices from flat files.
Version:
1.0.10
Author:
Stephen Prizio
  • Constructor Details

    • MarketPriceImportService

      public MarketPriceImportService(@Qualifier("csvMarketPriceParser") MarketPriceParser marketPriceParser, MarketPriceService marketPriceService)
      Constructs the market price import service.
      Parameters:
      marketPriceParser - csv market price parser
      marketPriceService - 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 stream
      fileName - file name
      symbolAlias - SymbolAlias
      timeInterval - MarketTimeInterval
      dateTimeFormat - 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 stream
      fileName - file name
      symbolAlias - SymbolAlias
      timeInterval - MarketTimeInterval
      dateTimeFormat - optional date time format
      zoneId - optional timezone used for non-offset timestamps
      Returns:
      count of persisted prices
      Throws:
      IOException - io exception