@groovy.util.logging.Slf4j @groovy.lang.Singleton class ScanService extends java.lang.Object
This service provided methods to handle user barcode scans in a shop floor dashboard. It determines what was scanned and processes the scan to perform the desired action on the object scanned.
See the User Guide for details on this service.Modifiers | Name | Description |
---|---|---|
static java.lang.String |
BARCODE_BUTTON |
The logical element name for a GUI button. |
static java.lang.String |
EVENT_SOURCE |
The source for actions/events sent back to the client. |
Type | Name and description |
---|---|
private OrderService |
orderService The order service used to find Orders/LSNs states. |
private ResolveService |
resolveService The resolve service used to find Orders/LSNs |
private WorkService |
workService The work service used to start/complete orders/LSNs. |
Constructor and description |
---|
ScanService
() |
Type Params | Return Type | Name and description |
---|---|---|
|
java.util.Map<java.lang.String, java.lang.String> |
getBarcodePrefixMapping() Returns the barcode prefix mapping list. |
|
java.util.Map |
parseScan(ScanRequestInterface scanRequest) Attempts to parse the scanned data, looking for specific markers for specific field types (e.g. button, order, lsn, product, etc). |
|
void |
processOrder(ScanResponseInterface scanResponse) Attempts to execute the automatic actions for an order when scanned. |
|
ScanResponseInterface |
scan(ScanRequestInterface scanRequest) Handles the scan from the user. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
The logical element name for a GUI button. This is used by internal logic for determining what to do with a scan. The barcode will contain the prefix 'BTN'.
The source for actions/events sent back to the client.
The order service used to find Orders/LSNs states.
The resolve service used to find Orders/LSNs
The work service used to start/complete orders/LSNs.
Returns the barcode prefix mapping list. This maps a literal barcode prefix value (e.g. 'BTN') to the standard name (e.g. 'BUTTON'). The standard name is used in most parsing logic decisions (e.g. which action to perform).
This method is designed to be extended with modules. You may modify the defaultBarcodePrefixMapping to add module-specific mappings.
Attempts to parse the scanned data, looking for specific markers for specific field types (e.g. button, order, lsn, product, etc).
scanRequest
- The original barcode scan request.Attempts to execute the automatic actions for an order when scanned. This includes starting the order if in queue.
scanResponse
- The response with the order. Updated by this method when an action is performed.Handles the scan from the user. This resolves the ID and will sometimes process the ID.
Note: This method uses the normal Java interface pattern for arguments and return values. This is done because the optional modules will most likely replace the core objects with sub-classes.scanRequest
- The scan request to resolve.Groovy Documentation