Class PositionImportService

java.lang.Object
com.bluebell.greenhouse.sol.importers.position.PositionImportService

@Service public class PositionImportService extends Object
Service-layer for importing positions from flat files.
Version:
2.0.6
Author:
Stephen Prizio
  • Constructor Details

  • Method Details

    • importPositions

      public int importPositions(InputStream inputStream, String fileName, Account account, ImportFormat importFormat, boolean isStrategy) throws IOException
      Imports positions from a file stream.
      Parameters:
      inputStream - file input stream
      fileName - file name
      account - Account
      importFormat - ImportFormat
      isStrategy - whether this is a strategy import
      Returns:
      count of created positions
      Throws:
      IOException - io exception
    • importPositions

      public int importPositions(InputStream inputStream, String fileName, Account account, ImportFormat importFormat, boolean isStrategy, ZoneId timeZone, String strategyUid, String strategyReferenceCode) throws IOException
      Imports positions from a file stream.
      Parameters:
      inputStream - file input stream
      fileName - file name
      account - Account
      importFormat - ImportFormat
      isStrategy - whether this is a strategy import
      timeZone - timezone for naive csv timestamps
      strategyUid - optional strategy uid to assign
      strategyReferenceCode - optional strategy reference code to assign
      Returns:
      count of created positions
      Throws:
      IOException - io exception
    • importPositions

      public int importPositions(InputStream inputStream, String fileName, Account account, ImportFormat importFormat, boolean isStrategy, ZoneId timeZone) throws IOException
      Imports positions from a file stream.
      Parameters:
      inputStream - file input stream
      fileName - file name
      account - Account
      importFormat - ImportFormat
      isStrategy - whether this is a strategy import
      timeZone - timezone for naive csv timestamps
      Returns:
      count of created positions
      Throws:
      IOException - io exception
    • importEvents

      public int importEvents(List<ImportedPositionEvent> events, Account account)
      Imports normalized position events.
      Parameters:
      events - events
      account - Account
      Returns:
      count of created positions