Class InsertPumpRequest
java.lang.Object
com.tccc.kos.ext.dispense.service.insertion.InsertPumpRequest
- All Implemented Interfaces:
com.tccc.kos.commons.core.service.trouble.TroubleMatcher
public class InsertPumpRequest
extends Object
implements com.tccc.kos.commons.core.service.trouble.TroubleMatcher
An insertion request for a single pump connected to a container.
- Since:
- 1.0
- Version:
- 2023-01-31
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
block
(com.tccc.kos.commons.core.service.trouble.Trouble trouble) Add a trouble to the request that blocks the insertion process.The container being inserted.getData
(InsertionFilter<?> filter) Load filter data from the parent request that was stored usingsave()
.The holder the pump is connected to.Return all previously inserted ingredientId's for the associated pump.Pump<?>
getPump()
Return the pump the insertion request is for.boolean
Return true if request is blocked for any reason.boolean
Return true if this is the first time this request has been checked by filters.boolean
Return true if this request is part of an inventory scan.boolean
match
(com.tccc.kos.commons.core.service.trouble.Trouble trouble) toString()
-
Constructor Details
-
InsertPumpRequest
public InsertPumpRequest()
-
-
Method Details
-
getPump
Return the pump the insertion request is for. -
isFirstCheck
public boolean isFirstCheck()Return true if this is the first time this request has been checked by filters. This allows filters to trigger setup logic for a request without needing to add data to the request. -
isInventoryScan
public boolean isInventoryScan()Return true if this request is part of an inventory scan. This means the container was discovered at startup. Filters can use this as a hint that the container existed before the last reboot and might need to be treated a bit differently from a normal insertion. -
getContainer
The container being inserted. -
getHolder
The holder the pump is connected to. -
block
public void block(com.tccc.kos.commons.core.service.trouble.Trouble trouble) Add a trouble to the request that blocks the insertion process. No additional filters will be called.The trouble will automatically be tagged with the container so the trouble will be removed when the container is removed.
- Parameters:
trouble
- the trouble to add
-
getData
Load filter data from the parent request that was stored usingsave()
. -
getPrevIngredientIds
Return all previously inserted ingredientId's for the associated pump. -
isBlocked
public boolean isBlocked()Return true if request is blocked for any reason. -
match
public boolean match(com.tccc.kos.commons.core.service.trouble.Trouble trouble) - Specified by:
match
in interfacecom.tccc.kos.commons.core.service.trouble.TroubleMatcher
-
toString
-