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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionConvert the givenbarcode
.@NotNull Barcode
Generate a newBarcode
.private BarcodeFormatter
-
Field Details
-
repository
-
-
Constructor Details
-
NumericBarcodeGenerator
-
-
Method Details
-
convert
Convert the givenbarcode
.- Specified by:
convert
in interfaceBarcodeGenerator
- 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 newBarcode
. Depends on the underlying implementation whether a newBarcode
is created everytime the method is called or not.- Specified by:
generate
in interfaceBarcodeGenerator
- Parameters:
transportUnitType
- The known type of the TransportUnitTypeactualLocation
- The known actual Location- Returns:
- A new Barcode instance, never null
-
getFormatter
-