Class SoldOutService
java.lang.Object
com.kosdev.kos.ext.dispense.service.soldout.SoldOutService
Service that persists sold out containers and marks them sold out when
reinserted. This updates the
soldOut flag in the associated
container object. This service has a configuration setting to make sold out
sticky or not. Sold outs are always persisted, but if not sticky, the sold
out will not be flagged during insertion. This allows containers to be
"tried again" by removing them and inserting them again. Many typical
container types don't support sold out as it typically requires external
sensors. If available, this service can be used to leverage those sensors.- Since:
- 1
- Version:
- 1
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanisContainerSoldOut(Container container) Return true if the specified containerId is sold out.booleanisSliceSoldOut(ContainerSlice slice) Return true if the specified slice is sold out.Called to record a container sold out.soldOut(ContainerSlice slice, String reason) Called to record a slice sold out.soldOutContainer(Holder holder, String reason) Called to record a container sold out.soldOutSlice(Holder holder, String reason) Called to record a slice sold out.
-
Field Details
-
REASON_soldOutOnInsert
- See Also:
-
-
Method Details
-
isContainerSoldOut
Return true if the specified containerId is sold out.- Parameters:
container- the container to check- Since:
- 1
-
isSliceSoldOut
Return true if the specified slice is sold out.- Parameters:
slice- the slice to check- Since:
- 1
-
soldOut
Called to record a slice sold out. This will also set thesoldOutflag in the slice and create aSliceSoldOutTrouble.- Parameters:
slice- the container slice that is sold outreason- the sold out reason for the trouble- Since:
- 1
-
soldOutSlice
Called to record a slice sold out. This will also set thesoldOutflag in the slice and create aSliceSoldOutTrouble.- Parameters:
holder- associated slice will be sold outreason- the sold out reason for the trouble- Since:
- 1
-
soldOut
Called to record a container sold out. This will also set thesoldOutflag in the container and create aContainerSoldOutTroublefor the container.- Parameters:
container- the container that is sold outreason- the sold out reason for the trouble- Since:
- 1
-
soldOutContainer
Called to record a container sold out. This will also set thesoldOutflag in the container and create aContainerSoldOutTroublefor the container.- Parameters:
holder- the holder associated with the containerreason- the sold out reason for the trouble- Since:
- 1
-