Class ContainerTrouble
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.ContainerTrouble
- All Implemented Interfaces:
com.tccc.kos.commons.core.service.trouble.TroubleIface,HolderBlockTrouble,ContainerTroubleIface,HolderTroubleIface
- Direct Known Subclasses:
ContainerSliceTrouble,ContainerSoldOutTrouble
public abstract class ContainerTrouble
extends PourAvailabilityTrouble
implements ContainerTroubleIface, HolderTroubleIface, HolderBlockTrouble
Base class for troubles related to containers. This will include holder information
if available as is typically the case when the trouble is generated from an insertion
filter since the insertion process links the slices of the container to the target
holders.
If this is used for a trouble created prior to insertion then the holders will not be available so paths and names will be arrays of nulls.
- Since:
- 1.0
- Version:
- 2023-02-06
-
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 -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns the container ID.String[]Returns the holder names in the same order as the paths.String[]Returns the paths of the associated holders.String[]Returns the ingredients in the container in slice order.Return the type of block to apply when linked to a holder.Methods inherited from class com.tccc.kos.ext.dispense.PourAvailabilityTrouble
blockBeveragePour, blockIngredientPour, blockPourMethods 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
-
Field Details
-
IFACE_CONTAINER
- See Also:
-
-
Method Details
-
getContainerId
Description copied from interface:ContainerTroubleIfaceReturns the container ID.- Specified by:
getContainerIdin interfaceContainerTroubleIface
-
getIngredients
Description copied from interface:ContainerTroubleIfaceReturns the ingredients in the container in slice order.- Specified by:
getIngredientsin interfaceContainerTroubleIface
-
getHolderPaths
Description copied from interface:HolderTroubleIfaceReturns the paths of the associated holders. ManyTroubles only impact a single holder, but some impact more than one, so this provides a uniform mechanism to handle all varieties.- Specified by:
getHolderPathsin interfaceHolderTroubleIface
-
getHolderNames
Description copied from interface:HolderTroubleIfaceReturns the holder names in the same order as the paths. This allowsTroubles to be rendered without needing to look up the holders from the paths to get the names.- Specified by:
getHolderNamesin interfaceHolderTroubleIface
-
getPourBlockType
Description copied from interface:HolderBlockTroubleReturn the type of block to apply when linked to a holder.- Specified by:
getPourBlockTypein interfaceHolderBlockTrouble
-