Class PumpBlockService

java.lang.Object
com.kosdev.kos.ext.dispense.service.pumpblock.PumpBlockService

public final class PumpBlockService extends Object
Service that can block ingredient or beverage availability on a pump by creating or removing xxx and xxx troubles. This provides an easy way to test availability changes without the need to generate pump errors or insert/remove ingredients.
Since:
10
Version:
10
  • Method Details

    • blockIngredientPour

      public void blockIngredientPour(Pump<?> pump)
      Block ingredient pouring on a pump by creating a BlockIngPourPumpTrouble on the pump. This will have the effect of preventing the pump from being used in any ingredient or beverage pours. If this trouble already exists, this will do nothing.
    • unblockIngredientPour

      public void unblockIngredientPour(Pump<?> pump)
      Remove the BlockIngPourPumpTrouble for the specified pump. If this trouble is the only reason blocking ingredient pouring, it will have the effect of enabling ingredient pours. If no other troubles are blocking beverage pours, this will also enable beverage pouring as ingredient blocks also result in beverage blocks. If no BlockIngPourPumpTrouble exists for the pump, this does nothing.
    • blockBeveragePour

      public void blockBeveragePour(Pump<?> pump)
      Block beverage pouring on a pump by creating a BlockBevPourPumpTrouble on the pump. This will have the effect of preventing the pump from being used in any beverage pours. If this trouble already exists, this will do nothing.
    • unblockBeveragePour

      public void unblockBeveragePour(Pump<?> pump)
      Remove the BlockBevPourPumpTrouble for the specified pump. If this trouble is the only reason blocking beverage pouring, it will have the effect of enabling beverage pours. If no BlockBevPourPumpTrouble exists for the pump, this does nothing.