Class InboundCsvTransformer

java.lang.Object
com.onenetwork.platform.integ.msg.InboundCsvTransformer
All Implemented Interfaces:
CsvTransformer, Transformer

public class InboundCsvTransformer
extends java.lang.Object
implements CsvTransformer
Base class for all CsvTransformers, extending this class allows us to add more methods without breaking backward compatibility.
  • Constructor Summary

    Constructors 
    Constructor Description
    InboundCsvTransformer()  
  • Method Summary

    Modifier and Type Method Description
    void transform​(CsvRow row, CsvTransformContext context)
    Transforms values within a mutable CsvRow.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • transform

      public void transform​(CsvRow row, CsvTransformContext context) throws CsvTransformException
      Transforms values within a mutable CsvRow.

      In some situations there might be two columns with the same name in a single CSV, for example "State" in ShipmentHeader and ShipmentLine. In situations like these, fields with a conflict will be prefixed with their level name, "ShipmentHeader.State" and "ShipmentLine.State". Fields without such a conflict will be listed without this prefix, for example "ShipmentNumber".

      Specified by:
      transform in interface CsvTransformer
      Parameters:
      row - row to be transformed - use the CsvRow.set(String, String) method to change values on this row
      context - provides contextual information around the current CSV Transformation
      Throws:
      implementers - should throw this exception if there is any problem transforming the row
      CsvTransformException