Class DependencyUtil

java.lang.Object
io.openems.edge.core.appmanager.dependency.DependencyUtil

public class DependencyUtil extends Object
  • Method Details

    • getInstanceIdOfAppWhichHasComponent

      public static final UUID getInstanceIdOfAppWhichHasComponent(ComponentManager componentManager, String componentId)
      Gets the instanceId of the app which has the given Component.
      Parameters:
      componentManager - the ComponentManager
      componentId - the ComponentId
      Returns:
      the Id or null if no app has this component
    • getAppWhichHasComponent

      public static final OpenemsAppInstance getAppWhichHasComponent(ComponentManager componentManager, String componentId)
      Gets the instance of the app which has the given Component.
      Parameters:
      componentManager - the ComponentManager
      componentId - the ComponentId
      Returns:
      the OpenemsAppInstance or null if no instance has this component
    • getAppWhichHasComponentInternal

      public final OpenemsAppInstance getAppWhichHasComponentInternal(ComponentManager componentManager, String componentId)
      Gets the OpenemsAppInstance of the first found instance that has the given componentId in its AppConfiguration.

      NOTE: when calling this inside an app configuration it can lead to an endless loop

      Parameters:
      componentManager - a componentManager to get the appManager
      componentId - the component id that the app should have
      Returns:
      the found instanceId or null if no app has this component
    • getInstanceIdOfAppWhichHasComponentInternal

      public UUID getInstanceIdOfAppWhichHasComponentInternal(ComponentManager componentManager, String componentId)
      Gets the instanceId of the first found instance that has the given componentId in its AppConfiguration.

      NOTE: when calling this inside an app configuration it can lead to an endless loop

      Parameters:
      componentManager - a componentManager to get the appManager
      componentId - the component id that the app should have
      Returns:
      the found instanceId or null if no app has this component