Interface AppCenterMetadata.UiData
- All Superinterfaces:
AppCenterMetadata
- All Known Implementing Classes:
MetadataOdoo
- Enclosing interface:
AppCenterMetadata
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.openems.backend.common.metadata.AppCenterMetadata
AppCenterMetadata.EdgeData, AppCenterMetadata.UiData
-
Method Summary
Modifier and TypeMethodDescriptiongetSuppliableKey
(User user, String edgeId, String appId) Gets a key that can be supplied to the installation of the given app.boolean
Gets if the given app is free.void
sendAddRegisterKeyHistory
(String edgeId, String appId, String key, User user) Sends a request to register a key.void
sendAddUnregisterKeyHistory
(String edgeId, String appId, String key, User user) Sends a request to unregister a key.com.google.gson.JsonArray
sendGetRegisteredKeys
(String edgeId, String appId) Sends a request to get all registered keys to the given edge and app.Methods inherited from interface io.openems.backend.common.metadata.AppCenterMetadata
sendGetPossibleApps, sendIsKeyApplicable
-
Method Details
-
sendAddRegisterKeyHistory
void sendAddRegisterKeyHistory(String edgeId, String appId, String key, User user) throws OpenemsError.OpenemsNamedException Sends a request to register a key.- Parameters:
edgeId
- the edge the key gets registered toappId
- the appId that gets registeredkey
- the key to register to the appuser
- the user who added the registration- Throws:
OpenemsError.OpenemsNamedException
- on error
-
sendAddUnregisterKeyHistory
void sendAddUnregisterKeyHistory(String edgeId, String appId, String key, User user) throws OpenemsError.OpenemsNamedException Sends a request to unregister a key.- Parameters:
edgeId
- the edgeappId
- the id of the appkey
- the keyuser
- the user who removed the registration- Throws:
OpenemsError.OpenemsNamedException
- on error
-
sendGetRegisteredKeys
com.google.gson.JsonArray sendGetRegisteredKeys(String edgeId, String appId) throws OpenemsError.OpenemsNamedException Sends a request to get all registered keys to the given edge and app.- Parameters:
edgeId
- the edge the registered key can be applied onappId
- the app of the registed key- Returns:
- the result as a
JsonObject
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
getSuppliableKey
String getSuppliableKey(User user, String edgeId, String appId) throws OpenemsError.OpenemsNamedException Gets a key that can be supplied to the installation of the given app.- Parameters:
user
- the requested useredgeId
- the edge to install the app onappId
- the app to install- Returns:
- the key or null if none can be supplied
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
isAppFree
Gets if the given app is free.- Parameters:
user
- the requested userappId
- the id of the app- Returns:
- true if the app is free
- Throws:
OpenemsError.OpenemsNamedException
- on error
-