use of uk.gov.pay.products.service.LinksDecorator in project pay-products by alphagov.
the class ProductsModule method configure.
@Override
protected void configure() {
final Client client = RestClientFactory.buildClient(configuration.getRestClientConfiguration());
bind(Client.class).toInstance(client);
bind(ProductsConfiguration.class).toInstance(configuration);
bind(DataSourceFactory.class).toInstance(configuration.getDataSourceFactory());
bind(MetricRegistry.class).toInstance(environment.metrics());
bind(Environment.class).toInstance(environment);
bind(RequestValidations.class).in(Singleton.class);
bind(ProductRequestValidator.class).in(Singleton.class);
bind(LinksDecorator.class).toInstance(new LinksDecorator(configuration.getBaseUrl(), configuration.getProductsUiPayUrl(), configuration.getFriendlyBaseUri()));
bind(ProductFinder.class).in(Singleton.class);
bind(PaymentFinder.class).in(Singleton.class);
bind(ProductApiTokenManager.class).in(Singleton.class);
bind(PublicApiRestClient.class).toInstance(new PublicApiRestClient(client, configuration.getPublicApiUrl()));
install(jpaModule(configuration));
install(new FactoryModuleBuilder().build(ProductFactory.class));
install(new FactoryModuleBuilder().build(PaymentFactory.class));
}
Aggregations