Package io.openems.edge.core.appmanager
Interface AppManagerUtil
- All Known Implementing Classes:
AppManagerUtilImpl
public interface AppManagerUtil
-
Method Summary
Modifier and TypeMethodDescriptionfindAppById
(String id) Finds theOpenemsApp
with the given id.default OpenemsApp
Finds theOpenemsApp
with the given id.findInstanceById
(UUID id) Finds theOpenemsAppInstance
with the givenUUID
.default OpenemsAppInstance
Finds theOpenemsAppInstance
with the givenUUID
.default AppConfiguration
getAppConfiguration
(ConfigurationTarget target, OpenemsAppInstance instance, Language language) Gets theAppConfiguration
with the given parameter.default AppConfiguration
getAppConfiguration
(ConfigurationTarget target, OpenemsApp app, OpenemsAppInstance instance, Language language) Gets theAppConfiguration
with the given parameter.getAppConfiguration
(ConfigurationTarget target, OpenemsApp app, String alias, com.google.gson.JsonObject properties, Language language) Gets theAppConfiguration
with the given parameter.default AppConfiguration
getAppConfiguration
(ConfigurationTarget target, String appId, String alias, com.google.gson.JsonObject properties, Language language) Gets theAppConfiguration
with the given parameter.getAppsWithDependencyTo
(OpenemsAppInstance instance) Gets aList
of the current installedOpenemsAppInstance
.default List<OpenemsAppInstance>
getInstantiatedAppsOfApp
(String appId) Gets aList
of the current installedOpenemsAppInstance
which match the given appId.
-
Method Details
-
getInstantiatedApps
List<OpenemsAppInstance> getInstantiatedApps()Gets aList
of the current installedOpenemsAppInstance
.- Returns:
- the list of installed apps
-
getInstantiatedAppsOfApp
Gets aList
of the current installedOpenemsAppInstance
which match the given appId.- Parameters:
appId
- the appId which should match withOpenemsAppInstance.appId
- Returns:
- a
List
ofOpenemsAppInstance
-
findAppById
Finds theOpenemsApp
with the given id.- Parameters:
id
- theOpenemsApp.getAppId()
of the app.- Returns:
- a
Optional
of the app
-
findAppByIdOrError
Finds theOpenemsApp
with the given id.- Parameters:
id
- theOpenemsApp.getAppId()
of the app.- Returns:
- the app
- Throws:
OpenemsError.OpenemsNamedException
- if the app was not found
-
findInstanceById
Finds theOpenemsAppInstance
with the givenUUID
.- Parameters:
id
- the id of the instance- Returns:
- a
Optional
of the instance
-
findInstanceByIdOrError
default OpenemsAppInstance findInstanceByIdOrError(UUID id) throws OpenemsError.OpenemsNamedException Finds theOpenemsAppInstance
with the givenUUID
.- Parameters:
id
- theUUID
of the instance- Returns:
- the instance
- Throws:
OpenemsError.OpenemsNamedException
- if not found
-
getAppConfiguration
AppConfiguration getAppConfiguration(ConfigurationTarget target, OpenemsApp app, String alias, com.google.gson.JsonObject properties, Language language) throws OpenemsError.OpenemsNamedException Gets theAppConfiguration
with the given parameter.- Parameters:
target
- theConfigurationTarget
of the configurationapp
- theOpenemsApp
alias
- the alias of the instanceproperties
- theJsonObject
properties of the instancelanguage
- theLanguage
of the configuration- Returns:
- the
AppConfiguration
- Throws:
OpenemsException
- on errorOpenemsError.OpenemsNamedException
-
getAppConfiguration
default AppConfiguration getAppConfiguration(ConfigurationTarget target, String appId, String alias, com.google.gson.JsonObject properties, Language language) throws OpenemsError.OpenemsNamedException Gets theAppConfiguration
with the given parameter.- Parameters:
target
- theConfigurationTarget
of the configurationappId
- theOpenemsApp.getAppId()
of theOpenemsApp
alias
- the alias of the instanceproperties
- theJsonObject
properties of the instancelanguage
- theLanguage
of the configuration- Returns:
- the
AppConfiguration
- Throws:
OpenemsException
- on errorOpenemsError.OpenemsNamedException
-
getAppConfiguration
default AppConfiguration getAppConfiguration(ConfigurationTarget target, OpenemsApp app, OpenemsAppInstance instance, Language language) throws OpenemsError.OpenemsNamedException Gets theAppConfiguration
with the given parameter.- Parameters:
target
- theConfigurationTarget
of the configurationapp
- theOpenemsApp.getAppId()
of theOpenemsApp
instance
- theOpenemsAppInstance
language
- theLanguage
of the configuration- Returns:
- the
AppConfiguration
- Throws:
OpenemsException
- on errorOpenemsError.OpenemsNamedException
-
getAppConfiguration
default AppConfiguration getAppConfiguration(ConfigurationTarget target, OpenemsAppInstance instance, Language language) throws OpenemsError.OpenemsNamedException Gets theAppConfiguration
with the given parameter.- Parameters:
target
- theConfigurationTarget
of the configurationinstance
- theOpenemsAppInstance
language
- theLanguage
of the configuration- Returns:
- the
AppConfiguration
- Throws:
OpenemsException
- on errorOpenemsError.OpenemsNamedException
-
getAppsWithDependencyTo
- Parameters:
instance
- the instance which is referenced- Returns:
- the referencing instances
-