Interface DestinationTargetCloningStrategy
- All Known Implementing Classes:
DefaultDestinationTargetCloningStrategy,KymaDestinationTargetCloningStrategy
public interface DestinationTargetCloningStrategy
Strategy for creating a new destination target and its required objects from the template objects
-
Method Summary
Modifier and TypeMethodDescriptionvoidcreateDestinations(DestinationTargetModel source, DestinationTargetModel target, List<AbstractDestinationModel> destinations) Create destinations for the target destination.createDestinationTarget(DestinationTargetModel source, String newId) Create a new destination target from the template destination target with the given idvoidcreateEventConfigurations(DestinationTargetModel source, DestinationTargetModel target, List<EventConfigurationModel> eventConfigurations) Create event configurations for the target destination.voiddeleteDestinationTarget(DestinationTargetModel destinationTarget) Delete destination target and all related objects of it such as destinations, event configurations.
-
Method Details
-
createDestinationTarget
Create a new destination target from the template destination target with the given id- Parameters:
source- the destination target which is used as a templatenewId- the id of the new destination target- Returns:
- a destination target
-
createDestinations
void createDestinations(DestinationTargetModel source, DestinationTargetModel target, List<AbstractDestinationModel> destinations) Create destinations for the target destination. Use destinations list to create new destinations unless it is empty, otherwise, use destination of the source destination target as a template for creating new destinations- Parameters:
source- the destination target which is used to create destinationstarget- the destination target which owns the new destinationsdestinations- the list of destinations
-
createEventConfigurations
void createEventConfigurations(DestinationTargetModel source, DestinationTargetModel target, List<EventConfigurationModel> eventConfigurations) Create event configurations for the target destination. Use eventConfigurations list to create new event configurations unless it is empty, otherwise, use event configurations of the source destination target as a template for creating new event configurations.- Parameters:
source- the destination target which is used to create event configurationstarget- the destination target which owns the new event configurationseventConfigurations- the list of event configurations
-
deleteDestinationTarget
Delete destination target and all related objects of it such as destinations, event configurations.- Parameters:
destinationTarget- the destinations target
-