Class ComponentAggregateTaskImpl
java.lang.Object
io.openems.edge.core.appmanager.dependency.aggregatetask.ComponentAggregateTaskImpl
- All Implemented Interfaces:
AggregateTask<ComponentConfiguration>
,ComponentAggregateTask
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.openems.edge.core.appmanager.dependency.aggregatetask.AggregateTask
AggregateTask.AggregateTaskExecuteConstraints
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
aggregate
(ComponentConfiguration config, ComponentConfiguration oldConfig) Aggregates the given instance.void
create
(User user, List<AppConfiguration> otherAppConfigurations) e.void
delete
(User user, List<AppConfiguration> otherAppConfigurations) deletes the given components only if they are not in notMyComponents.Gets the Components that were created.Gets the Components that were deleted.Gets a general message for the user if any operations fails.void
reset()
Resets the task.void
validate
(List<String> errors, AppConfiguration appConfiguration, ComponentConfiguration config) Validates the expected configuration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.openems.edge.core.appmanager.dependency.aggregatetask.AggregateTask
getExecuteConstraints
-
Constructor Details
-
ComponentAggregateTaskImpl
-
-
Method Details
-
reset
public void reset()Description copied from interface:AggregateTask
Resets the task.- Specified by:
reset
in interfaceAggregateTask<ComponentConfiguration>
-
aggregate
Description copied from interface:AggregateTask
Aggregates the given instance.- Specified by:
aggregate
in interfaceAggregateTask<ComponentConfiguration>
- Parameters:
config
- theAppConfiguration
of the instanceoldConfig
- the old configuration of the instance
-
create
public void create(User user, List<AppConfiguration> otherAppConfigurations) throws OpenemsError.OpenemsNamedException Description copied from interface:AggregateTask
e. g. creates components that were aggregated by the instances and my also delete unused components.- Specified by:
create
in interfaceAggregateTask<ComponentConfiguration>
- Parameters:
user
- the executing userotherAppConfigurations
- the other existingAppConfiguration
s- Throws:
OpenemsError.OpenemsNamedException
- on error
-
delete
public void delete(User user, List<AppConfiguration> otherAppConfigurations) throws OpenemsError.OpenemsNamedException deletes the given components only if they are not in notMyComponents.- Specified by:
delete
in interfaceAggregateTask<ComponentConfiguration>
- Parameters:
user
- the executing userotherAppConfigurations
- the otherAppConfiguration
s- Throws:
OpenemsError.OpenemsNamedException
- on error
-
getGeneralFailMessage
Description copied from interface:AggregateTask
Gets a general message for the user if any operations fails.- Specified by:
getGeneralFailMessage
in interfaceAggregateTask<ComponentConfiguration>
- Parameters:
l
- theLanguage
of the message- Returns:
- the error message
-
validate
public void validate(List<String> errors, AppConfiguration appConfiguration, ComponentConfiguration config) Description copied from interface:AggregateTask
Validates the expected configuration.- Specified by:
validate
in interfaceAggregateTask<ComponentConfiguration>
- Parameters:
errors
- the errors that occur during the validationappConfiguration
- the whole configurationconfig
- the configuration to validate
-
getCreatedComponents
Description copied from interface:ComponentAggregateTask
Gets the Components that were created.- Specified by:
getCreatedComponents
in interfaceComponentAggregateTask
- Returns:
- the created
EdgeConfig.Component
-
getDeletedComponents
Description copied from interface:ComponentAggregateTask
Gets the Components that were deleted.- Specified by:
getDeletedComponents
in interfaceComponentAggregateTask
- Returns:
- the id's of the deleted
EdgeConfig.Component
-