Interface DestinationTargetService

All Known Implementing Classes:
DefaultDestinationTargetService

public interface DestinationTargetService
Service layer interface for destination targets
  • Method Details

    • createDestinationTarget

      DestinationTargetModel createDestinationTarget(DestinationTargetModel source, String newId, DestinationChannel destinationChannel) throws ApiRegistrationException
      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
      destinationChannel - channel of the new destination target
      Returns:
      the new destination target
      Throws:
      ApiRegistrationException - in case the DestinationTargetCloningStrategy doesn't exist for the given destination target
    • registerDestinationTarget

      void registerDestinationTarget(DestinationTargetModel destinationTarget, Map<String,String> params) throws ApiRegistrationException
      Register a destination target and its assigned destinations and events in the target system
      Parameters:
      destinationTarget - the destination target
      params - the parameters map which is used for passing additional parameters
      Throws:
      ApiRegistrationException - in case the registration fails
    • createDestinations

      void createDestinations(DestinationTargetModel source, DestinationTargetModel target, List<AbstractDestinationModel> destinations) throws ApiRegistrationException
      Create destinations for the target destination.
      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
      Throws:
      ApiRegistrationException - in case the DestinationTargetCloningStrategy doesn't exist for the given destination target
    • createEventConfigurations

      void createEventConfigurations(DestinationTargetModel source, DestinationTargetModel target, List<EventConfigurationModel> eventConfigurations) throws ApiRegistrationException
      Create event configurations for the target destination.
      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
      Throws:
      ApiRegistrationException - in case the DestinationTargetCloningStrategy doesn't exist for the given destination target
    • registerExposedDestinations

      Map<String,String> registerExposedDestinations(DestinationTargetModel destinationTarget)
      Register all exposed destinations of the given destination target.
      Parameters:
      destinationTarget - the destination target of exposed destinations
      Returns:
      the map of failed exposed destinations and error messages
    • deregisterAndDeleteDestinationTarget

      Collection<ServiceWarning<DestinationTargetModel>> deregisterAndDeleteDestinationTarget(DestinationTargetModel destinationTarget) throws ApiRegistrationException
      Unregister (if the destination target is not a template) then delete exposed destinations of the given destination target
      Parameters:
      destinationTarget - the destination target
      Returns:
      the collection of service warnings if any
      Throws:
      ApiRegistrationException - in case the deletion fails
    • deleteDestinationTarget

      void deleteDestinationTarget(DestinationTargetModel destinationTarget) throws ApiRegistrationException
      Delete destination target and all related objects of it such as destinations, event configurations.
      Parameters:
      destinationTarget - the destinations target
      Throws:
      ApiRegistrationException - in case the DestinationTargetCloningStrategy doesn't exist for the given destination target
    • syncDestinationTargetWithRemoteSystem

      void syncDestinationTargetWithRemoteSystem(DestinationTargetModel destinationTarget) throws ApiRegistrationException
      Sync destination target with the remote system.
      Parameters:
      destinationTarget - the destination target
      Throws:
      ApiRegistrationException - in case the synchronization fails
    • getDestinationTargetByCredentialId

      DestinationTargetModel getDestinationTargetByCredentialId(String credentialId)
      Get the destination target for a specific credential id
      Parameters:
      credentialId - id of the credential
      Returns:
      a destination target
    • getDestinationTargetById

      DestinationTargetModel getDestinationTargetById(String id)
      Get the destination target for a specific id
      Parameters:
      id - id of the destination target
      Returns:
      a destination target