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:
com.tccc.kos.commons.core.service.trouble.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
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.tccc.kos.commons.core.service.trouble.Trouble

    com.tccc.kos.commons.core.service.trouble.Trouble.TroubleView
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a new trouble for the specified container and holder.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    Returns the container ID.
     
    Returns the holder names in the same order as the paths.
    Returns the paths of the associated holders.
    Returns the ingredients in the container in slice order.

    Methods inherited from class com.tccc.kos.ext.dispense.PourAvailabilityTrouble

    blockBeveragePour, blockIngredientPour, blockPour

    Methods inherited from class com.tccc.kos.commons.core.service.trouble.Trouble

    addIface, addImpacted, addLink, addTag, equals, getClientData, getCount, getCreateTime, getGroup, getId, getIfaces, getImpacted, getInfo, getLinked, getReason, getTags, getType, hashCode, incCount, isImpacted, isLinked, isResolvable, isTagged, onRemoved, removeImpacted, removeLink, removeTag, resolvable, resolve, setReason, setResolvable, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • 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