Search in sources :

Example 1 with TranslatorConfig

use of org.killbill.billing.util.template.translation.TranslatorConfig in project killbill by killbill.

the class DefaultInvoiceModule method installNotifiers.

protected void installNotifiers() {
    bind(NextBillingDateNotifier.class).to(DefaultNextBillingDateNotifier.class).asEagerSingleton();
    bind(NextBillingDatePoster.class).to(DefaultNextBillingDatePoster.class).asEagerSingleton();
    final TranslatorConfig config = new ConfigurationObjectFactory(skifeConfigSource).build(TranslatorConfig.class);
    bind(TranslatorConfig.class).toInstance(config);
    bind(InvoiceFormatterFactory.class).to(config.getInvoiceFormatterFactoryClass()).asEagerSingleton();
}
Also used : DefaultNextBillingDateNotifier(org.killbill.billing.invoice.notification.DefaultNextBillingDateNotifier) TranslatorConfig(org.killbill.billing.util.template.translation.TranslatorConfig) ConfigurationObjectFactory(org.skife.config.ConfigurationObjectFactory) DefaultNextBillingDatePoster(org.killbill.billing.invoice.notification.DefaultNextBillingDatePoster)

Example 2 with TranslatorConfig

use of org.killbill.billing.util.template.translation.TranslatorConfig in project killbill by killbill.

the class TestHtmlInvoiceGenerator method beforeClass.

@Override
@BeforeClass(groups = "fast")
public void beforeClass() throws Exception {
    super.beforeClass();
    final TranslatorConfig config = new ConfigurationObjectFactory(skifeConfigSource).build(TranslatorConfig.class);
    final TemplateEngine templateEngine = new MustacheTemplateEngine();
    final InvoiceFormatterFactory factory = new DefaultInvoiceFormatterFactory();
    g = new HtmlInvoiceGenerator(factory, templateEngine, config, null, resourceBundleFactory, null);
}
Also used : InvoiceFormatterFactory(org.killbill.billing.invoice.api.formatters.InvoiceFormatterFactory) DefaultInvoiceFormatterFactory(org.killbill.billing.invoice.template.formatters.DefaultInvoiceFormatterFactory) TemplateEngine(org.killbill.billing.util.email.templates.TemplateEngine) MustacheTemplateEngine(org.killbill.billing.util.email.templates.MustacheTemplateEngine) MustacheTemplateEngine(org.killbill.billing.util.email.templates.MustacheTemplateEngine) DefaultInvoiceFormatterFactory(org.killbill.billing.invoice.template.formatters.DefaultInvoiceFormatterFactory) TranslatorConfig(org.killbill.billing.util.template.translation.TranslatorConfig) ConfigurationObjectFactory(org.skife.config.ConfigurationObjectFactory) HtmlInvoiceGenerator(org.killbill.billing.invoice.template.HtmlInvoiceGenerator) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

TranslatorConfig (org.killbill.billing.util.template.translation.TranslatorConfig)2 ConfigurationObjectFactory (org.skife.config.ConfigurationObjectFactory)2 InvoiceFormatterFactory (org.killbill.billing.invoice.api.formatters.InvoiceFormatterFactory)1 DefaultNextBillingDateNotifier (org.killbill.billing.invoice.notification.DefaultNextBillingDateNotifier)1 DefaultNextBillingDatePoster (org.killbill.billing.invoice.notification.DefaultNextBillingDatePoster)1 HtmlInvoiceGenerator (org.killbill.billing.invoice.template.HtmlInvoiceGenerator)1 DefaultInvoiceFormatterFactory (org.killbill.billing.invoice.template.formatters.DefaultInvoiceFormatterFactory)1 MustacheTemplateEngine (org.killbill.billing.util.email.templates.MustacheTemplateEngine)1 TemplateEngine (org.killbill.billing.util.email.templates.TemplateEngine)1 BeforeClass (org.testng.annotations.BeforeClass)1