Skip to content

Commit

Permalink
Merge pull request #153 from reshmabidikar/custom-invoice-v6
Browse files Browse the repository at this point in the history
Changes for InvoiceFormatterFactory
  • Loading branch information
reshmabidikar committed Feb 13, 2024
2 parents e794cf8 + f325e85 commit 8cf32cf
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.killbill.billing.control.plugin.api.PaymentControlPluginApi;
import org.killbill.billing.currency.plugin.api.CurrencyPluginApi;
import org.killbill.billing.entitlement.plugin.api.EntitlementPluginApi;
import org.killbill.billing.invoice.plugin.api.InvoiceFormatterFactory;
import org.killbill.billing.invoice.plugin.api.InvoicePluginApi;
import org.killbill.billing.osgi.api.Healthcheck;
import org.killbill.billing.osgi.api.OSGIConfigProperties;
Expand Down Expand Up @@ -139,6 +140,11 @@ public void addCurrencyPluginApiOSGIServiceRegistration(@Nullable final OSGIServ
allRegistrationHandlers.add(currencyProviderPluginRegistry);
}

@Inject
public void addInvoiceFormatterFactoryOSGIServiceRegistration(@Nullable final OSGIServiceRegistration<InvoiceFormatterFactory> invoiceFormatterFactoryRegistry) {
allRegistrationHandlers.add(invoiceFormatterFactoryRegistry);
}

@Inject
public void addPaymentControlPluginApiOSGIServiceRegistration(@Nullable final OSGIServiceRegistration<PaymentControlPluginApi> paymentControlProviderPluginRegistry) {
allRegistrationHandlers.add(paymentControlProviderPluginRegistry);
Expand Down
2 changes: 1 addition & 1 deletion platform-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
<artifactId>killbill-platform-api</artifactId>
<packaging>jar</packaging>
<name>killbill-platform-api</name>
<dependencies />
<dependencies/>
</project>
4 changes: 2 additions & 2 deletions platform-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@
<phase>initialize</phase>
<configuration>
<tasks>
<copy file="${basedir}/../osgi-bundles/tests/beatrix/target/killbill-platform-osgi-bundles-test-beatrix-${project.version}.jar" tofile="${basedir}/src/test/resources/killbill-osgi-bundles-test-beatrix-jar-with-dependencies.jar" />
<copy file="${basedir}/../osgi-bundles/tests/payment/target/killbill-platform-osgi-bundles-test-payment-${project.version}.jar" tofile="${basedir}/src/test/resources/killbill-osgi-bundles-test-payment-jar-with-dependencies.jar" />
<copy file="${basedir}/../osgi-bundles/tests/beatrix/target/killbill-platform-osgi-bundles-test-beatrix-${project.version}.jar" tofile="${basedir}/src/test/resources/killbill-osgi-bundles-test-beatrix-jar-with-dependencies.jar"/>
<copy file="${basedir}/../osgi-bundles/tests/payment/target/killbill-platform-osgi-bundles-test-payment-${project.version}.jar" tofile="${basedir}/src/test/resources/killbill-osgi-bundles-test-payment-jar-with-dependencies.jar"/>
</tasks>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.killbill.billing.entitlement.api.SubscriptionApi;
import org.killbill.billing.entitlement.plugin.api.EntitlementPluginApi;
import org.killbill.billing.invoice.api.InvoiceUserApi;
import org.killbill.billing.invoice.plugin.api.InvoiceFormatterFactory;
import org.killbill.billing.invoice.plugin.api.InvoicePluginApi;
import org.killbill.billing.osgi.api.Healthcheck;
import org.killbill.billing.osgi.api.OSGIServiceDescriptor;
Expand Down Expand Up @@ -116,6 +117,7 @@ protected void bindOsgiServiceRegistration() {
bind(new TypeLiteral<OSGIServiceRegistration<PaymentPluginApi>>() {}).toInstance(new TestPlatformPaymentProviderPluginRegistry<>(PaymentPluginApi.class));
bind(new TypeLiteral<OSGIServiceRegistration<CurrencyPluginApi>>() {}).toInstance(new TestPlatformPaymentProviderPluginRegistry<>(CurrencyPluginApi.class));
bind(new TypeLiteral<OSGIServiceRegistration<InvoicePluginApi>>() {}).toInstance(new TestPlatformPaymentProviderPluginRegistry<>(InvoicePluginApi.class));
bind(new TypeLiteral<OSGIServiceRegistration<InvoiceFormatterFactory>>() {}).toInstance(new TestPlatformPaymentProviderPluginRegistry<>(InvoiceFormatterFactory.class));
bind(new TypeLiteral<OSGIServiceRegistration<PaymentControlPluginApi>>() {}).toInstance(new TestPlatformPaymentProviderPluginRegistry<>(PaymentControlPluginApi.class));
bind(new TypeLiteral<OSGIServiceRegistration<CatalogPluginApi>>() {}).toInstance(new TestPlatformPaymentProviderPluginRegistry<>(CatalogPluginApi.class));
bind(new TypeLiteral<OSGIServiceRegistration<EntitlementPluginApi>>() {}).toInstance(new TestPlatformPaymentProviderPluginRegistry<>(EntitlementPluginApi.class));
Expand All @@ -135,6 +137,8 @@ public TestPlatformPaymentProviderPluginRegistry(final Class<T> serviceType) {
this.serviceType = serviceType;
}



@Override
public void registerService(final OSGIServiceDescriptor desc, final T service) {
pluginsByName.put(desc.getRegistrationName(), service);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.kill-bill.billing</groupId>
<artifactId>killbill-oss-parent</artifactId>
<version>0.146.24</version>
<version>0.146.28</version>
</parent>
<artifactId>killbill-platform</artifactId>
<version>0.41.7-SNAPSHOT</version>
Expand Down

0 comments on commit 8cf32cf

Please sign in to comment.