Interface HolderTroubleIface
- All Superinterfaces:
com.kosdev.kos.commons.core.service.trouble.TroubleIface
- All Known Implementing Classes:
ContainerHolderTrouble,ContainerSliceTrouble,ContainerSoldOutTrouble,ContainerTrouble,PumpTrouble,SliceSoldOutTrouble,UnknownIngredientTrouble
public interface HolderTroubleIface
extends com.kosdev.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
- Version:
- 1
-
Method Details
-
addIface
static void addIface(com.kosdev.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- Since:
- 1
-
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.- Since:
- 1
-
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.- Since:
- 1
-