Class NumericBarcodeGenerator

java.lang.Object
org.openwms.common.transport.barcode.NumericBarcodeGenerator
All Implemented Interfaces:
BarcodeGenerator

@Public("Because this class is also be instantiated by ServiceLoader not only by Spring") @TxService public class NumericBarcodeGenerator extends Object implements BarcodeGenerator
A NumericBarcodeGenerator.
Author:
Heiko Scherrer
  • Field Details

  • Constructor Details

  • Method Details

    • convert

      @Measured public Barcode convert(String barcode)
      Convert the given barcode.
      Specified by:
      convert in interface BarcodeGenerator
      Parameters:
      barcode - The Barcode to convert
      Returns:
      An Optional with the formatted barcode as a value if the formatting could be performed or an empty Optional if not
    • generate

      @Measured @NotNull public @NotNull Barcode generate(String transportUnitType, String actualLocation)
      Generate a new Barcode. Depends on the underlying implementation whether a new Barcode is created everytime the method is called or not.
      Specified by:
      generate in interface BarcodeGenerator
      Parameters:
      transportUnitType - The known type of the TransportUnitType
      actualLocation - The known actual Location
      Returns:
      A new Barcode instance, never null
    • getFormatter

      private BarcodeFormatter getFormatter()