Class DefaultDestinationTargetService
java.lang.Object
de.hybris.platform.apiregistryservices.services.impl.DefaultDestinationTargetService
- All Implemented Interfaces:
DestinationTargetService
Default implementation of
DestinationTargetService-
Constructor Summary
Constructors -
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 targetprotected ApiRegistrationServiceprotected DestinationService<AbstractDestinationModel>getDestinationTargetByCredentialId(String credentialId) Get the destination target for a specific credential idGet the destination target for a specific idprotected DestinationTargetCloningStrategygetDestinationTargetCloningStrategy(DestinationChannel destinationChannel) protected DestinationTargetDaoprotected DestinationTargetRegistrationStrategygetDestinationTargetRegistrationStrategy(DestinationChannel destinationChannel) voidregisterDestinationTarget(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.voidsetApiRegistrationService(ApiRegistrationService apiRegistrationService) voidsetDestinationService(DestinationService<AbstractDestinationModel> destinationService) voidsetDestinationTargetCloningStrategyMap(Map<DestinationChannel, DestinationTargetCloningStrategy> destinationTargetCloningStrategyMap) voidsetDestinationTargetDao(DestinationTargetDao destinationTargetDao) voidsetDestinationTargetRegistrationStrategyMap(Map<DestinationChannel, DestinationTargetRegistrationStrategy> destinationTargetRegistrationStrategyMap) voidsyncDestinationTargetWithRemoteSystem(DestinationTargetModel destinationTarget) Sync destination target with the remote system.
-
Constructor Details
-
DefaultDestinationTargetService
public DefaultDestinationTargetService()
-
-
Method Details
-
createDestinationTarget
public DestinationTargetModel createDestinationTarget(DestinationTargetModel source, String newId, DestinationChannel destinationChannel) throws ApiRegistrationException Description copied from interface:DestinationTargetServiceCreate a new destination target from the template destination target with the given id- Specified by:
createDestinationTargetin interfaceDestinationTargetService- 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
public void registerDestinationTarget(DestinationTargetModel destinationTarget, Map<String, String> params) throws ApiRegistrationExceptionDescription copied from interface:DestinationTargetServiceRegister a destination target and its assigned destinations and events in the target system- Specified by:
registerDestinationTargetin interfaceDestinationTargetService- Parameters:
destinationTarget- the destination targetparams- the parameters map which is used for passing additional parameters- Throws:
ApiRegistrationException- in case the registration fails
-
createDestinations
public void createDestinations(DestinationTargetModel source, DestinationTargetModel target, List<AbstractDestinationModel> destinations) throws ApiRegistrationException Description copied from interface:DestinationTargetServiceCreate destinations for the target destination.- Specified by:
createDestinationsin interfaceDestinationTargetService- 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
public void createEventConfigurations(DestinationTargetModel source, DestinationTargetModel target, List<EventConfigurationModel> eventConfigurations) throws ApiRegistrationException Description copied from interface:DestinationTargetServiceCreate event configurations for the target destination.- Specified by:
createEventConfigurationsin interfaceDestinationTargetService- 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
Description copied from interface:DestinationTargetServiceRegister all exposed destinations of the given destination target.- Specified by:
registerExposedDestinationsin interfaceDestinationTargetService- Parameters:
destinationTarget- the destination target of exposed destinations- Returns:
- the map of failed exposed destinations and error messages
-
deregisterAndDeleteDestinationTarget
public Collection<ServiceWarning<DestinationTargetModel>> deregisterAndDeleteDestinationTarget(DestinationTargetModel destinationTarget) throws ApiRegistrationException Description copied from interface:DestinationTargetServiceUnregister (if the destination target is not a template) then delete exposed destinations of the given destination target- Specified by:
deregisterAndDeleteDestinationTargetin interfaceDestinationTargetService- Parameters:
destinationTarget- the destination target- Returns:
- the collection of service warnings if any
- Throws:
ApiRegistrationException- in case the deletion fails
-
deleteDestinationTarget
public void deleteDestinationTarget(DestinationTargetModel destinationTarget) throws ApiRegistrationException Description copied from interface:DestinationTargetServiceDelete destination target and all related objects of it such as destinations, event configurations.- Specified by:
deleteDestinationTargetin interfaceDestinationTargetService- Parameters:
destinationTarget- the destinations target- Throws:
ApiRegistrationException- in case the DestinationTargetCloningStrategy doesn't exist for the given destination target
-
syncDestinationTargetWithRemoteSystem
public void syncDestinationTargetWithRemoteSystem(DestinationTargetModel destinationTarget) throws ApiRegistrationException Description copied from interface:DestinationTargetServiceSync destination target with the remote system.- Specified by:
syncDestinationTargetWithRemoteSystemin interfaceDestinationTargetService- Parameters:
destinationTarget- the destination target- Throws:
ApiRegistrationException- in case the synchronization fails
-
getDestinationTargetRegistrationStrategy
protected DestinationTargetRegistrationStrategy getDestinationTargetRegistrationStrategy(DestinationChannel destinationChannel) -
getDestinationTargetCloningStrategy
protected DestinationTargetCloningStrategy getDestinationTargetCloningStrategy(DestinationChannel destinationChannel) -
getDestinationTargetByCredentialId
Description copied from interface:DestinationTargetServiceGet the destination target for a specific credential id- Specified by:
getDestinationTargetByCredentialIdin interfaceDestinationTargetService- Parameters:
credentialId- id of the credential- Returns:
- a destination target
-
getDestinationTargetById
Description copied from interface:DestinationTargetServiceGet the destination target for a specific id- Specified by:
getDestinationTargetByIdin interfaceDestinationTargetService- Parameters:
id- id of the destination target- Returns:
- a destination target
-
getDestinationTargetCloningStrategyMap
protected Map<DestinationChannel,DestinationTargetCloningStrategy> getDestinationTargetCloningStrategyMap() -
setDestinationTargetCloningStrategyMap
public void setDestinationTargetCloningStrategyMap(Map<DestinationChannel, DestinationTargetCloningStrategy> destinationTargetCloningStrategyMap) -
getDestinationTargetRegistrationStrategyMap
protected Map<DestinationChannel,DestinationTargetRegistrationStrategy> getDestinationTargetRegistrationStrategyMap() -
setDestinationTargetRegistrationStrategyMap
public void setDestinationTargetRegistrationStrategyMap(Map<DestinationChannel, DestinationTargetRegistrationStrategy> destinationTargetRegistrationStrategyMap) -
getApiRegistrationService
-
setApiRegistrationService
-
getDestinationService
-
setDestinationService
-
getDestinationTargetDao
-
setDestinationTargetDao
-