Search in sources :

Example 1 with PaymentConfig

use of org.killbill.billing.util.config.definition.PaymentConfig in project killbill by killbill.

the class PaymentModule method configure.

@Override
protected void configure() {
    final ConfigurationObjectFactory factory = new ConfigurationObjectFactory(skifeConfigSource);
    final PaymentConfig paymentConfig = factory.build(PaymentConfig.class);
    bind(PaymentConfig.class).annotatedWith(Names.named(STATIC_CONFIG)).toInstance(paymentConfig);
    bind(PaymentConfig.class).to(MultiTenantPaymentConfig.class).asEagerSingleton();
    bind(new TypeLiteral<OSGIServiceRegistration<PaymentPluginApi>>() {
    }).toProvider(DefaultPaymentProviderPluginRegistryProvider.class).asEagerSingleton();
    bind(new TypeLiteral<OSGIServiceRegistration<PaymentControlPluginApi>>() {
    }).toProvider(DefaultPaymentControlProviderPluginRegistryProvider.class).asEagerSingleton();
    bind(PaymentPluginServiceRegistration.class).asEagerSingleton();
    bind(PaymentApi.class).to(DefaultPaymentApi.class).asEagerSingleton();
    bind(PaymentGatewayApi.class).to(DefaultPaymentGatewayApi.class).asEagerSingleton();
    bind(AdminPaymentApi.class).to(DefaultAdminPaymentApi.class).asEagerSingleton();
    bind(PaymentBusEventHandler.class).asEagerSingleton();
    bind(PaymentTagHandler.class).asEagerSingleton();
    bind(PaymentService.class).to(DefaultPaymentService.class).asEagerSingleton();
    bind(PaymentExecutors.class).asEagerSingleton();
    installPaymentProviderPlugins(paymentConfig);
    installPaymentDao();
    installProcessors(paymentConfig);
    installStateMachines();
    installAutomatonRunner();
    installRetryEngines();
    installJanitor();
}
Also used : DefaultPaymentGatewayApi(org.killbill.billing.payment.api.DefaultPaymentGatewayApi) OSGIServiceRegistration(org.killbill.billing.osgi.api.OSGIServiceRegistration) ConfigurationObjectFactory(org.skife.config.ConfigurationObjectFactory) DefaultAdminPaymentApi(org.killbill.billing.payment.api.DefaultAdminPaymentApi) MultiTenantPaymentConfig(org.killbill.billing.payment.config.MultiTenantPaymentConfig) PaymentPluginServiceRegistration(org.killbill.billing.payment.core.PaymentPluginServiceRegistration) PaymentBusEventHandler(org.killbill.billing.payment.bus.PaymentBusEventHandler) PaymentTagHandler(org.killbill.billing.payment.invoice.PaymentTagHandler) PaymentExecutors(org.killbill.billing.payment.core.PaymentExecutors) PaymentConfig(org.killbill.billing.util.config.definition.PaymentConfig) MultiTenantPaymentConfig(org.killbill.billing.payment.config.MultiTenantPaymentConfig) DefaultPaymentApi(org.killbill.billing.payment.api.DefaultPaymentApi)

Aggregations

OSGIServiceRegistration (org.killbill.billing.osgi.api.OSGIServiceRegistration)1 DefaultAdminPaymentApi (org.killbill.billing.payment.api.DefaultAdminPaymentApi)1 DefaultPaymentApi (org.killbill.billing.payment.api.DefaultPaymentApi)1 DefaultPaymentGatewayApi (org.killbill.billing.payment.api.DefaultPaymentGatewayApi)1 PaymentBusEventHandler (org.killbill.billing.payment.bus.PaymentBusEventHandler)1 MultiTenantPaymentConfig (org.killbill.billing.payment.config.MultiTenantPaymentConfig)1 PaymentExecutors (org.killbill.billing.payment.core.PaymentExecutors)1 PaymentPluginServiceRegistration (org.killbill.billing.payment.core.PaymentPluginServiceRegistration)1 PaymentTagHandler (org.killbill.billing.payment.invoice.PaymentTagHandler)1 PaymentConfig (org.killbill.billing.util.config.definition.PaymentConfig)1 ConfigurationObjectFactory (org.skife.config.ConfigurationObjectFactory)1