Interface DestinationTargetService
-
- All Known Implementing Classes:
DefaultDestinationTargetService
public interface DestinationTargetService
Service layer interface for destination targets
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
createDestinations(DestinationTargetModel source, DestinationTargetModel target, java.util.List<AbstractDestinationModel> destinations)
Create destinations for the target destination.DestinationTargetModel
createDestinationTarget(DestinationTargetModel source, java.lang.String newId, DestinationChannel destinationChannel)
Create a new destination target from the template destination target with the given idvoid
createEventConfigurations(DestinationTargetModel source, DestinationTargetModel target, java.util.List<EventConfigurationModel> eventConfigurations)
Create event configurations for the target destination.void
deleteDestinationTarget(DestinationTargetModel destinationTarget)
Delete destination target and all related objects of it such as destinations, event configurations.java.util.Collection<ServiceWarning<DestinationTargetModel>>
deregisterAndDeleteDestinationTarget(DestinationTargetModel destinationTarget)
Unregister (if the destination target is not a template) then delete exposed destinations of the given destination targetDestinationTargetModel
getDestinationTargetByCredentialId(java.lang.String credentialId)
Get the destination target for a specific credential idDestinationTargetModel
getDestinationTargetById(java.lang.String id)
Get the destination target for a specific idvoid
registerDestinationTarget(DestinationTargetModel destinationTarget, java.util.Map<java.lang.String,java.lang.String> params)
Register a destination target and its assigned destinations and events in the target systemjava.util.Map<java.lang.String,java.lang.String>
registerExposedDestinations(DestinationTargetModel destinationTarget)
Register all exposed destinations of the given destination target.void
syncDestinationTargetWithRemoteSystem(DestinationTargetModel destinationTarget)
Sync destination target with the remote system.
-
-
-
Method Detail
-
createDestinationTarget
DestinationTargetModel createDestinationTarget(DestinationTargetModel source, java.lang.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, java.util.Map<java.lang.String,java.lang.String> params) throws ApiRegistrationException
Register 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, java.util.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, java.util.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
java.util.Map<java.lang.String,java.lang.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
java.util.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(java.lang.String credentialId)
Get the destination target for a specific credential id- Parameters:
credentialId
- id of the credential- Returns:
- a destination target
-
getDestinationTargetById
DestinationTargetModel getDestinationTargetById(java.lang.String id)
Get the destination target for a specific id- Parameters:
id
- id of the destination target- Returns:
- a destination target
-
-