Package org.bhn.promotion.core.config
Class PromotionConfiguration
java.lang.Object
org.bhn.promotion.core.config.PromotionConfiguration
@Configuration
@Import({BHNConfiguration.class,VoucherifyConfiguration.class})
@EnableAsync
@EnableRetry
public class PromotionConfiguration
extends Object
The class contains configuration for the Promotion module.
This configuration class imports necessary configurations and defines beans related to promotions, including services and workflows.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPromotionConfiguration(String importUrl, String deleteUrl, String pimImporterAppKey, String pimImporterBaseUrl, String personManagementBaseUrl, String personManagementPersonsUrl, String retryMaxAttempts, String retryInitialInterval, String rollbackFailureQueueUrl, String orderDataQueueUrl, org.springframework.beans.factory.ObjectProvider<org.springframework.web.reactive.function.client.WebClient.Builder> webClientBuilderProvider) Constructs a newPromotionConfigurationinstance. -
Method Summary
Modifier and TypeMethodDescriptionorderStorageService(PromotionServiceProxy promotionServiceProxy, RollbackService rollbackService, AWSSqsMessageService awsSqsMessageService) Creates and returns an instance ofOrderStorageService.org.springframework.retry.support.RetryTemplate
-
Field Details
-
VOUCHERIFY_APPLICATION_RULE_ALLOW_PARTIAL
public static final boolean VOUCHERIFY_APPLICATION_RULE_ALLOW_PARTIAL- See Also:
-
-
Constructor Details
-
PromotionConfiguration
public PromotionConfiguration(@Value("${promo-engine.pim.di.url.import}") String importUrl, @Value("${promo-engine.pim.di.url.delete}") String deleteUrl, @Value("${promo-engine.pim.di.api-key}") String pimImporterAppKey, @Value("${promo-engine.pim.di.url.base}") String pimImporterBaseUrl, @Value("${promo-engine.person-management.url.base:null}") String personManagementBaseUrl, @Value("${promo-engine.person-management.url.persons:null}") String personManagementPersonsUrl, @Value("${promo-engine.service.retry.max-attempts:3}") String retryMaxAttempts, @Value("${promo-engine.service.retry.initial-interval:1000}") String retryInitialInterval, @Value("${promo-engine.rollback-failure-queue-url:null}") String rollbackFailureQueueUrl, @Value("${promo-engine.order-data-queue-url:null}") String orderDataQueueUrl, org.springframework.beans.factory.ObjectProvider<org.springframework.web.reactive.function.client.WebClient.Builder> webClientBuilderProvider) Constructs a newPromotionConfigurationinstance.- Parameters:
importUrl- URL for importing promotions.deleteUrl- URL for deleting promotions.pimImporterAppKey- API key for the PIM importer.pimImporterBaseUrl- Base URL for the PIM importer.personManagementBaseUrl- the base URL for the person management servicepersonManagementPersonsUrl- the endpoint for fetching persons in the person management service
-
-
Method Details
-
orderStorageService
@Bean public OrderStorageService orderStorageService(PromotionServiceProxy promotionServiceProxy, RollbackService rollbackService, AWSSqsMessageService awsSqsMessageService) Creates and returns an instance ofOrderStorageService.- Parameters:
promotionServiceProxy- ThePromotionServiceProxythat will be injected into theOrderStorageServiceconstructor.rollbackService- TheRollbackServicethat will be injected into theOrderStorageServiceconstructor.- Returns:
- A new instance of
OrderStorageServiceinitialized with the providedPromotionServiceProxy.
-
retryTemplate
@Bean public org.springframework.retry.support.RetryTemplate retryTemplate()
-