Interface HolderTroubleIface
- All Superinterfaces:
com.tccc.kos.commons.core.service.trouble.TroubleIface
- All Known Implementing Classes:
ContainerHolderTrouble
,ContainerSliceTrouble
,ContainerSoldOutTrouble
,ContainerTrouble
,PumpTrouble
,SliceSoldOutTrouble
,UnknownIngredientTrouble
public interface HolderTroubleIface
extends com.tccc.kos.commons.core.service.trouble.TroubleIface
Interface for
Trouble
s that implements the holder iface.
This is a standard way to describe to external systems that the
Trouble
includes holder information in a standard format.
Implementations must call
HolderTroubleIface.addIface(trouble)
to ensure that
external systems know the Trouble
implements this interface.
This indicates the holder interface is implemented and the following data is available:
holderPaths
: List of holder paths impactedholderNames
: List of holder names impacted
- Since:
- 1.0
- Version:
- 2023-02-05
-
Method Details
-
addIface
static void addIface(com.tccc.kos.commons.core.service.trouble.Trouble trouble) Adds the iface to the specifiedTrouble
. Should be called in theTrouble
constructor.- Parameters:
trouble
- theTrouble
to add the iface to
-
getHolderPaths
String[] getHolderPaths()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. -
getHolderNames
String[] getHolderNames()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.
-