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, 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
-
Field Details
-
IFACE_CONTAINER
- See Also:
-
-
Method Details
-
getContainerId
Description copied from interface:ContainerTroubleIface
Returns the container ID.- Specified by:
getContainerId
in interfaceContainerTroubleIface
-
getIngredients
Description copied from interface:ContainerTroubleIface
Returns the ingredients in the container in slice order.- Specified by:
getIngredients
in interfaceContainerTroubleIface
-
getHolderPaths
Description copied from interface:HolderTroubleIface
Returns the paths of the associated holders. ManyTrouble
s only impact a single holder, but some impact more than one, so this provides a uniform mechanism to handle all varieties.- Specified by:
getHolderPaths
in interfaceHolderTroubleIface
-
getHolderNames
Description copied from interface:HolderTroubleIface
Returns the holder names in the same order as the paths. This allowsTrouble
s to be rendered without needing to look up the holders from the paths to get the names.- Specified by:
getHolderNames
in interfaceHolderTroubleIface
-
getPourBlockType
Description copied from interface:HolderBlockTrouble
Return the type of block to apply when linked to a holder.- Specified by:
getPourBlockType
in interfaceHolderBlockTrouble
-