Class DependencyUtil
java.lang.Object
io.openems.edge.core.appmanager.dependency.DependencyUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic final OpenemsAppInstance
getAppWhichHasComponent
(ComponentManager componentManager, String componentId) Gets the instance of the app which has the given Component.final OpenemsAppInstance
getAppWhichHasComponentInternal
(ComponentManager componentManager, String componentId) Gets theOpenemsAppInstance
of the first found instance that has the given componentId in itsAppConfiguration
.static final UUID
getInstanceIdOfAppWhichHasComponent
(ComponentManager componentManager, String componentId) Gets the instanceId of the app which has the given Component.getInstanceIdOfAppWhichHasComponentInternal
(ComponentManager componentManager, String componentId) Gets the instanceId of the first found instance that has the given componentId in itsAppConfiguration
.
-
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
- theComponentManager
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
- theComponentManager
componentId
- the ComponentId- Returns:
- the
OpenemsAppInstance
or null if no instance has this component
-
getAppWhichHasComponentInternal
public final OpenemsAppInstance getAppWhichHasComponentInternal(ComponentManager componentManager, String componentId) Gets theOpenemsAppInstance
of the first found instance that has the given componentId in itsAppConfiguration
.NOTE: when calling this inside an app configuration it can lead to an endless loop
- Parameters:
componentManager
- a componentManager to get the appManagercomponentId
- 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 itsAppConfiguration
.NOTE: when calling this inside an app configuration it can lead to an endless loop
- Parameters:
componentManager
- a componentManager to get the appManagercomponentId
- the component id that the app should have- Returns:
- the found instanceId or null if no app has this component
-