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
Troubles 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 theTroubleconstructor.- Parameters:
trouble- theTroubleto add the iface to
-
getHolderPaths
String[] getHolderPaths()Returns 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. -
getHolderNames
String[] getHolderNames()Returns 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.
-