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 impacted
  • holderNames : List of holder names impacted
Since:
1.0
Version:
2023-02-05
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addIface(com.tccc.kos.commons.core.service.trouble.Trouble trouble)
    Adds the iface to the specified Trouble .
    Returns the holder names in the same order as the paths.
    Returns the paths of the associated holders.
  • Method Details

    • addIface

      static void addIface(com.tccc.kos.commons.core.service.trouble.Trouble trouble)
      Adds the iface to the specified Trouble . Should be called in the Trouble constructor.
      Parameters:
      trouble - the Trouble to add the iface to
    • getHolderPaths

      String[] getHolderPaths()
      Returns the paths of the associated holders. Many Trouble 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 allows Trouble s to be rendered without needing to look up the holders from the paths to get the names.