Class AppManagerAppHelperImpl
java.lang.Object
io.openems.edge.core.appmanager.dependency.AppManagerAppHelperImpl
- All Implemented Interfaces:
AppManagerAppHelper
-
Constructor Summary
ConstructorDescriptionAppManagerAppHelperImpl
(ComponentManager componentManager, ComponentUtil componentUtil) -
Method Summary
Modifier and TypeMethodDescriptiondeleteApp
(User user, OpenemsAppInstance instance) Deletes anOpenemsAppInstance
.Only available during a call of one of the other methods.static ResourceBundle
getTranslationBundle
(Language language) Gets theResourceBundle
based on the givenLanguage
.static void
insert
(List<AggregateTask<?>> tasks, AggregateTask<?> task) Inserts a task into a existing list of tasks.installApp
(User user, OpenemsAppInstance instance, OpenemsApp app) Installs anOpenemsApp
with all itsDependency
s.updateApp
(User user, OpenemsAppInstance oldInstance, OpenemsAppInstance instance, OpenemsApp app) Updates an existingOpenemsAppInstance
.
-
Constructor Details
-
AppManagerAppHelperImpl
-
-
Method Details
-
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:
- a list of the created
OpenemsAppInstances
- 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:
- a list of the replaced
OpenemsAppInstances
- 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:
- a list of the removed
OpenemsAppInstances
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
getTranslationBundle
Gets theResourceBundle
based on the givenLanguage
.- Parameters:
language
- theLanguage
of the translations- Returns:
- the
ResourceBundle
-
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
-
insert
Inserts a task into a existing list of tasks. The task gets inserted at a position which suits theirAggregateTask.AggregateTaskExecuteConstraints
.- Parameters:
tasks
- the existing task listtask
- the task to insert
-