Class KymaDestinationTargetCloningStrategy
java.lang.Object
de.hybris.platform.kymaintegrationservices.strategies.impl.KymaDestinationTargetCloningStrategy
- All Implemented Interfaces:
DestinationTargetCloningStrategy
public class KymaDestinationTargetCloningStrategy
extends Object
implements DestinationTargetCloningStrategy
Kyma specific implementation of
DestinationTargetCloningStrategy-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ExposedOAuthCredentialModelcreateCredential(String clientId) voidcreateDestinations(DestinationTargetModel source, DestinationTargetModel target, List<AbstractDestinationModel> destinations) Create destinations for the target destination.createDestinationTarget(DestinationTargetModel source, String newId) 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.protected Stringprotected CronJobServiceprotected DestinationService<AbstractDestinationModel>protected EventConfigurationDaoprotected ModelServiceprotected booleanisCredentialUsedByDifferentExposedDestination(AbstractDestinationModel destination, AbstractCredentialModel credential) Verify if credential is used by different exposed destinationprotected booleanVerify if the cloned exposed destination should be assigned a new credentialprotected voidremoveGetInfoCronJob(DestinationTargetModel destinationTarget) voidsetCronJobService(CronJobService cronJobService) voidsetDestinationService(DestinationService<AbstractDestinationModel> destinationService) voidsetDestinationTargetCloningValidationChecker(List<DestinationTargetCloningValidationCheckStrategy> destinationTargetCloningValidationChecker) voidsetEventConfigurationDao(EventConfigurationDao eventConfigurationDao) voidsetModelService(ModelService modelService) protected voidsetPasswordForCredentials(OAuthClientDetailsModel oAuthClientDetails, ExposedOAuthCredentialModel exposedOAuthCredential)
-
Constructor Details
-
KymaDestinationTargetCloningStrategy
public KymaDestinationTargetCloningStrategy()
-
-
Method Details
-
createDestinationTarget
Description copied from interface:DestinationTargetCloningStrategyCreate a new destination target from the template destination target with the given id- Specified by:
createDestinationTargetin interfaceDestinationTargetCloningStrategy- Parameters:
source- the destination target which is used as a templatenewId- the id of the new destination target- Returns:
- a destination target
-
createDestinations
public void createDestinations(DestinationTargetModel source, DestinationTargetModel target, List<AbstractDestinationModel> destinations) Description copied from interface:DestinationTargetCloningStrategyCreate 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- Specified by:
createDestinationsin interfaceDestinationTargetCloningStrategy- Parameters:
source- the destination target which is used to create destinationstarget- the destination target which owns the new destinationsdestinations- the list of destinations
-
createEventConfigurations
public void createEventConfigurations(DestinationTargetModel source, DestinationTargetModel target, List<EventConfigurationModel> eventConfigurations) Description copied from interface:DestinationTargetCloningStrategyCreate 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.- Specified by:
createEventConfigurationsin interfaceDestinationTargetCloningStrategy- 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
-
deleteDestinationTarget
Description copied from interface:DestinationTargetCloningStrategyDelete destination target and all related objects of it such as destinations, event configurations.- Specified by:
deleteDestinationTargetin interfaceDestinationTargetCloningStrategy- Parameters:
destinationTarget- the destinations target
-
removeGetInfoCronJob
-
createCredential
-
isResetExposedDestinationKymaCredentialAllowed
protected boolean isResetExposedDestinationKymaCredentialAllowed(AbstractDestinationModel destination) Verify if the cloned exposed destination should be assigned a new credential- Parameters:
destination-- Returns:
- true if Exposed destination was not assigned ICC
-
isCredentialUsedByDifferentExposedDestination
protected boolean isCredentialUsedByDifferentExposedDestination(AbstractDestinationModel destination, AbstractCredentialModel credential) Verify if credential is used by different exposed destination- Parameters:
destination-credential-- Returns:
- true if is used by different exposed destination and assigned ICC
-
setPasswordForCredentials
protected void setPasswordForCredentials(OAuthClientDetailsModel oAuthClientDetails, ExposedOAuthCredentialModel exposedOAuthCredential) -
generateRandomCode
-
getScopes
-
getAuthorizationGrantTypes
-
getAuthorities
-
getModelService
-
setModelService
-
getDestinationService
-
setDestinationService
-
getEventConfigurationDao
-
setEventConfigurationDao
-
getCronJobService
-
setCronJobService
-
getDestinationTargetCloningValidationChecker
protected List<DestinationTargetCloningValidationCheckStrategy> getDestinationTargetCloningValidationChecker() -
setDestinationTargetCloningValidationChecker
public void setDestinationTargetCloningValidationChecker(List<DestinationTargetCloningValidationCheckStrategy> destinationTargetCloningValidationChecker)
-