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 Details

    • InsertPumpRequest

      public InsertPumpRequest()
  • Method Details

    • getPump

      public Pump<?> 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

      public Container getContainer()
      The container being inserted.
    • getHolder

      public Holder 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

      public Object getData(InsertionFilter<?> filter)
      Load filter data from the parent request that was stored using save() .
    • getPrevIngredientIds

      public Collection<String> 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 interface com.tccc.kos.commons.core.service.trouble.TroubleMatcher
    • toString

      public String toString()
      Overrides:
      toString in class Object