Interface PositionCsvParserPlugin

  • All Superinterfaces:

    public interface PositionCsvParserPlugin
    extends Named
    Pluggable CSV position parser.

    Implementations of this interface parse a CSV file.

    See PositionCsvLoader for the main entry point to parsing.

    • Method Detail

      • extendedEnum

        static ExtendedEnum<PositionCsvParserPlugin> extendedEnum()
        Gets the extended enum helper.

        This helper allows instances of the parser to be looked up. It also provides the complete set of available instances.

        the extended enum helper
      • positionTypeNames

        Set<String> positionTypeNames()
        Returns the upper-case product types that this plugin supports.

        These are matched against the CSV file type column.

        the types that this plugin supports
      • parsePosition

        Optional<Position> parsePosition​(Class<?> requiredJavaType,
                                         CsvRow row,
                                         PositionInfo info,
                                         PositionCsvInfoResolver resolver)
        Parses a single CSV format position from the input.

        This parses a single position from the CSV rows provided. The position may exist on multiple rows

        requiredJavaType - the Java type to return
        row - the row to parse
        info - the position info
        resolver - the resolver
        the position object, empty if choosing not to parse because the Java type does not match
        RuntimeException - if unable to parse
      • getName

        String getName()
        Gets the name that uniquely identifies this parser.

        The name should typically be the name of the Product that can be parsed.

        This name is used in serialization and can be parsed using of(String).

        Specified by:
        getName in interface Named
        the unique name