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 Details

    • createDestinationTarget

      DestinationTargetModel createDestinationTarget(DestinationTargetModel source, String newId)
      Create a new destination target from the template destination target with the given id
      Parameters:
      source - the destination target which is used as a template
      newId - 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 destinations
      target - the destination target which owns the new destinations
      destinations - 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 configurations
      target - the destination target which owns the new event configurations
      eventConfigurations - the list of event configurations
    • deleteDestinationTarget

      void deleteDestinationTarget(DestinationTargetModel destinationTarget)
      Delete destination target and all related objects of it such as destinations, event configurations.
      Parameters:
      destinationTarget - the destinations target