Package io.openems.edge.core.appmanager
Interface AppCenterBackendUtil
- All Known Implementing Classes:
AppCenterBackendUtilImpl
public interface AppCenterBackendUtil
-
Method Summary
Modifier and TypeMethodDescriptionCompletableFuture<? extends JsonrpcResponseSuccess>
addDeinstallAppInstanceHistory
(User user, String appId, UUID instanceId) Adds a deinstall app history entry to the key which installed the instance.void
addInstallAppInstanceHistory
(User user, String key, String appId, UUID instanceId) Adds a install app history entry to the given key.Gets the installed apps that were logged in the backend.getPossibleApps
(String key) Gets the possible apps that can be installed with the given key.boolean
Gets if this edge is connected to the backend.boolean
isKeyApplicable
(User user, String key, String appId) Gets from the backend if the given key can be applied to the given appId.
-
Method Details
-
isKeyApplicable
boolean isKeyApplicable(User user, String key, String appId) throws OpenemsError.OpenemsNamedException Gets from the backend if the given key can be applied to the given appId.- Parameters:
user
- the executing userkey
- the key to be validatedappId
- the id of theOpenemsApp
- Returns:
- true if the key can be applied
- Throws:
OpenemsError.OpenemsNamedException
-
addInstallAppInstanceHistory
void addInstallAppInstanceHistory(User user, String key, String appId, UUID instanceId) throws OpenemsError.OpenemsNamedException Adds a install app history entry to the given key.- Parameters:
user
- the executing userkey
- the key the app should get installed withappId
- the app id of the created instanceinstanceId
- the instanceId of the created instance- Throws:
OpenemsError.OpenemsNamedException
- on error
-
addDeinstallAppInstanceHistory
CompletableFuture<? extends JsonrpcResponseSuccess> addDeinstallAppInstanceHistory(User user, String appId, UUID instanceId) throws OpenemsError.OpenemsNamedException Adds a deinstall app history entry to the key which installed the instance.- Parameters:
user
- the executing userappId
- the app id of the removed instanceinstanceId
- the instanceId of the removed instance- Returns:
- the
CompletableFuture
of the request - Throws:
OpenemsError.OpenemsNamedException
- on error
-
isConnected
boolean isConnected()Gets if this edge is connected to the backend.- Returns:
- true if this edge is connected to the backend
-
getPossibleApps
Gets the possible apps that can be installed with the given key.- Parameters:
key
- the key that the apps can be installed with- Returns:
- a list of bundles with a list of their apps
-
getInstalledApps
List<AppCenterGetInstalledAppsResponse.Instance> getInstalledApps() throws OpenemsError.OpenemsNamedExceptionGets the installed apps that were logged in the backend.- Returns:
- the instances that should be installed
- Throws:
OpenemsError.OpenemsNamedException
-