Package com.tbg.wms.cli.gui
Class LabelWorkflowService
java.lang.Object
com.tbg.wms.cli.gui.LabelWorkflowService
GUI workflow service that loads shipment data, builds preview math,
and executes label printing.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classstatic final classstatic final class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidLoads enabled printers from routing configuration.prepareJob(String shipmentId) Loads shipment data and prepares the label plan for GUI preview.print(LabelWorkflowService.PreparedJob job, String printerId, Path outputDir, boolean printToFile) Generates ZPL output and prints labels for the prepared job.resolvePrinter(String printerId) Resolves a printer config by ID using cached routing data.
-
Constructor Details
-
LabelWorkflowService
-
-
Method Details
-
loadPrinters
Loads enabled printers from routing configuration.- Returns:
- list of available printers sorted by ID
- Throws:
Exception- when routing config cannot be loaded
-
clearCaches
public void clearCaches() -
resolvePrinter
Resolves a printer config by ID using cached routing data.- Throws:
Exception
-
prepareJob
Loads shipment data and prepares the label plan for GUI preview.- Parameters:
shipmentId- WMS shipment identifier- Returns:
- prepared job with shipment, labels, and planning results
- Throws:
Exception- when data is missing or cannot be loaded
-
print
public LabelWorkflowService.PrintResult print(LabelWorkflowService.PreparedJob job, String printerId, Path outputDir, boolean printToFile) throws Exception Generates ZPL output and prints labels for the prepared job.- Parameters:
job- prepared job from previewprinterId- printer identifier to useoutputDir- output directory for ZPL artifactsprintToFile- when true, skip network printing- Returns:
- summary of labels printed and output path
- Throws:
Exception- when printing fails
-