Interface DestinationTargetService
- All Known Implementing Classes:
DefaultDestinationTargetService
public interface DestinationTargetService
Service layer interface for destination targets
-
Method Summary
Modifier and TypeMethodDescriptionvoidcreateDestinations(DestinationTargetModel source, DestinationTargetModel target, List<AbstractDestinationModel> destinations) Create destinations for the target destination.createDestinationTarget(DestinationTargetModel source, String newId, DestinationChannel destinationChannel) 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.deregisterAndDeleteDestinationTarget(DestinationTargetModel destinationTarget) Unregister (if the destination target is not a template) then delete exposed destinations of the given destination targetgetDestinationTargetByCredentialId(String credentialId) Get the destination target for a specific credential idGet the destination target for a specific idvoidregisterDestinationTarget(DestinationTargetModel destinationTarget, Map<String, String> params) Register a destination target and its assigned destinations and events in the target systemregisterExposedDestinations(DestinationTargetModel destinationTarget) Register all exposed destinations of the given destination target.voidsyncDestinationTargetWithRemoteSystem(DestinationTargetModel destinationTarget) Sync destination target with the remote system.
-
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 templatenewId- the id of the new destination targetdestinationChannel- 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 ApiRegistrationExceptionRegister a destination target and its assigned destinations and events in the target system- Parameters:
destinationTarget- the destination targetparams- 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 destinationstarget- the destination target which owns the new destinationsdestinations- 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 configurationstarget- the destination target which owns the new event configurationseventConfigurations- the list of event configurations- Throws:
ApiRegistrationException- in case the DestinationTargetCloningStrategy doesn't exist for the given destination target
-
registerExposedDestinations
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
Get the destination target for a specific credential id- Parameters:
credentialId- id of the credential- Returns:
- a destination target
-
getDestinationTargetById
Get the destination target for a specific id- Parameters:
id- id of the destination target- Returns:
- a destination target
-