Class ContainerHolderTrouble

java.lang.Object
com.tccc.kos.commons.core.service.trouble.Trouble
com.tccc.kos.ext.dispense.PourAvailabilityTrouble
com.tccc.kos.ext.dispense.service.insertion.troubles.ContainerHolderTrouble
All Implemented Interfaces:
TroubleIface, ContainerTroubleIface, HolderTroubleIface

public class ContainerHolderTrouble extends PourAvailabilityTrouble implements HolderTroubleIface, ContainerTroubleIface
Base class for troubles related to a combination of container and holder. This is commonly used for troubles generated during ingredient insertion as the process is inherently container / holder oriented. While ContainerTrouble is similar in that it returns holder information, that trouble includes troubles linked to the container whereas this trouble only uses the specified holder as the target of the trouble which means the holder is guaranteed to exist and there will only be one holder even if the container has multiple slices.
Since:
1.0
Version:
2023-02-05
  • Constructor Details

    • ContainerHolderTrouble

      public ContainerHolderTrouble(Container container, Holder holder, PourAvailability.Type block)
      Create a new trouble for the specified container and holder. The container is expected to be connected to the holder. Unlike ContainerTrouble this will only list the holder provided to this trouble whereas a ContainerTrouble will list all connected holders. In most cases this is effectively the same but when using multi-ingredient containers such as Freestyle double cartridges this allows the trouble to be specific to the specified holder.

      This will automatically tag the container so if the container is removed the trouble will automatically be removed.

      This trouble can block pouring on any pumps connected to the container. The block parameter defines the type of block to apply. If no block is needed this can be null. The block will be removed when the trouble is removed.

      Parameters:
      container - the container the trouble is for
      block - the block to apply to pumps connected to the container
  • Method Details