Class BeveragePipelineService
java.lang.Object
com.kosdev.kos.ext.dispense.pipeline.beverage.BeveragePipelineService
Service that provides basic select and pour functionality on top of
a
PourEngine.- Since:
- 1
- Version:
- 1
-
Method Summary
Modifier and TypeMethodDescriptionvoidCancel the current pour.voidcancelPour(String reason) Cancel the current pour with the specified reason.voidClear the currently selected pourable.Return a newPourBuilderwhich can be used to construct and start a beverage pour.voidsetDelegate(BeveragePipelineDelegate delegate) Set theBeveragePourServiceDelegatefor the pipeline.voidsetSelected(Pourable pourable) Set the selected pourable for use with free / fixed pours.setSelected(String defStr) Set the selected pourable identified by thePourabledefinition string.
-
Method Details
-
setDelegate
Set theBeveragePourServiceDelegatefor the pipeline. This can be used to manually set the delegate instead of using autowiring which allows the delegate to be set later, or changed over time.- Since:
- 1
-
setSelected
Set the selected pourable identified by thePourabledefinition string. The defintion string will be passed toPourEngine.getPourable()to convert to aPourablesuitable for use.- Parameters:
defStr- the definition string to generate thePourablefrom- Returns:
- the resulting pourable object
- Since:
- 1
-
setSelected
Set the selected pourable for use with free / fixed pours. Setting to a pourable that is not equal to the currently selected pourable will cause the current pour to be cancelled.- Parameters:
pourable- the pourable to select or null to deselect- Since:
- 1
-
clearSelected
public void clearSelected()Clear the currently selected pourable.- Since:
- 1
-
getBuilder
Return a newPourBuilderwhich can be used to construct and start a beverage pour. All pours must be initiated from aPourBuilder. A builder can only be used for a single pour and the builder should be used immediately to ensure that the described pour can be poured.- Since:
- 1
-
cancelPour
public void cancelPour()Cancel the current pour.- Since:
- 1
-
cancelPour
Cancel the current pour with the specified reason.- Since:
- 1
-
getPourEngine
-
getSelected
-