Class AppManagerAppHelperImpl
- java.lang.Object
-
- io.openems.edge.core.appmanager.dependency.AppManagerAppHelperImpl
-
- All Implemented Interfaces:
AppManagerAppHelper
public class AppManagerAppHelperImpl extends java.lang.Object implements AppManagerAppHelper
-
-
Constructor Summary
Constructors Constructor Description AppManagerAppHelperImpl(ComponentManager componentManager, ComponentUtil componentUtil, Validator validator, AggregateTask.ComponentAggregateTask componentsTask, AggregateTask.SchedulerAggregateTask schedulerTask, AggregateTask.StaticIpAggregateTask staticIpTask)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkStatus(OpenemsApp openemsApp, Language language)
UpdateValues
deleteApp(User user, OpenemsAppInstance instance)
Deletes anOpenemsAppInstance
.protected static java.util.List<EdgeConfig.Component>
getComponentsFromConfigs(java.util.List<AppConfiguration> configs)
protected java.util.Map<java.lang.String,java.lang.String>
getReplaceableComponentIds(OpenemsApp app, com.google.gson.JsonObject properties)
Gets the component id s that can be replaced.protected static java.util.List<java.lang.String>
getSchedulerIdsFromConfigs(java.util.List<AppConfiguration> configs)
protected static java.util.List<InterfaceConfiguration>
getStaticIpsFromConfigs(java.util.List<AppConfiguration> configs)
TemporaryApps
getTemporaryApps()
Only available during a call of one of the other methods.UpdateValues
installApp(User user, OpenemsAppInstance instance, OpenemsApp app)
Installs anOpenemsApp
with all itsDependency
s.UpdateValues
updateApp(User user, OpenemsAppInstance oldInstance, OpenemsAppInstance instance, OpenemsApp app)
Updates an existingOpenemsAppInstance
.
-
-
-
Constructor Detail
-
AppManagerAppHelperImpl
public AppManagerAppHelperImpl(ComponentManager componentManager, ComponentUtil componentUtil, Validator validator, AggregateTask.ComponentAggregateTask componentsTask, AggregateTask.SchedulerAggregateTask schedulerTask, AggregateTask.StaticIpAggregateTask staticIpTask)
-
-
Method Detail
-
installApp
public UpdateValues installApp(User user, OpenemsAppInstance instance, OpenemsApp app) throws OpenemsError.OpenemsNamedException
Description copied from interface:AppManagerAppHelper
Installs anOpenemsApp
with all itsDependency
s.- Specified by:
installApp
in interfaceAppManagerAppHelper
- Parameters:
user
- the executing userinstance
- the settings of the newOpenemsAppInstance
app
- theOpenemsApp
- Returns:
- s a list of the created
OpenemsAppInstance
s - Throws:
OpenemsError.OpenemsNamedException
- on error
-
updateApp
public UpdateValues updateApp(User user, OpenemsAppInstance oldInstance, OpenemsAppInstance instance, OpenemsApp app) throws OpenemsError.OpenemsNamedException
Description copied from interface:AppManagerAppHelper
Updates an existingOpenemsAppInstance
.- Specified by:
updateApp
in interfaceAppManagerAppHelper
- Parameters:
user
- the executing useroldInstance
- the oldOpenemsAppInstance
with its configurations.instance
- the settings of the newOpenemsAppInstance
app
- theOpenemsApp
- Returns:
- s a list of the replaced
OpenemsAppInstance
s - Throws:
OpenemsError.OpenemsNamedException
- on error
-
deleteApp
public UpdateValues deleteApp(User user, OpenemsAppInstance instance) throws OpenemsError.OpenemsNamedException
Description copied from interface:AppManagerAppHelper
Deletes anOpenemsAppInstance
.- Specified by:
deleteApp
in interfaceAppManagerAppHelper
- Parameters:
user
- the executing userinstance
- the instance to delete- Returns:
- s a list of the removed
OpenemsAppInstance
s - Throws:
OpenemsError.OpenemsNamedException
- on error
-
checkStatus
protected void checkStatus(OpenemsApp openemsApp, Language language) throws OpenemsError.OpenemsNamedException
-
getComponentsFromConfigs
protected static java.util.List<EdgeConfig.Component> getComponentsFromConfigs(java.util.List<AppConfiguration> configs)
-
getSchedulerIdsFromConfigs
protected static java.util.List<java.lang.String> getSchedulerIdsFromConfigs(java.util.List<AppConfiguration> configs)
-
getStaticIpsFromConfigs
protected static java.util.List<InterfaceConfiguration> getStaticIpsFromConfigs(java.util.List<AppConfiguration> configs)
-
getReplaceableComponentIds
protected final java.util.Map<java.lang.String,java.lang.String> getReplaceableComponentIds(OpenemsApp app, com.google.gson.JsonObject properties) throws OpenemsError.OpenemsNamedException
Gets the component id s that can be replaced.- Parameters:
app
- the components of which appproperties
- the default properties to create an app instance of this app- Returns:
- a map of the component id s that can be replaced mapped from id to key to put the next id
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
getTemporaryApps
public TemporaryApps getTemporaryApps()
Description copied from interface:AppManagerAppHelper
Only available during a call of one of the other methods.- Specified by:
getTemporaryApps
in interfaceAppManagerAppHelper
- Returns:
- null if none of the other methods is currently running else the
TemporaryApps
-
-