Search in sources :

Example 6 with OSGIServiceDescriptor

use of org.killbill.billing.osgi.api.OSGIServiceDescriptor in project killbill by killbill.

the class NoOpInvoiceProviderPluginProvider method get.

@Override
public DefaultNoOpInvoiceProviderPlugin get() {
    final DefaultNoOpInvoiceProviderPlugin plugin = new DefaultNoOpInvoiceProviderPlugin(clock);
    final OSGIServiceDescriptor desc = new OSGIServiceDescriptor() {

        @Override
        public String getPluginSymbolicName() {
            return null;
        }

        @Override
        public String getPluginName() {
            return instanceName;
        }

        @Override
        public String getRegistrationName() {
            return instanceName;
        }
    };
    registry.registerService(desc, plugin);
    return plugin;
}
Also used : OSGIServiceDescriptor(org.killbill.billing.osgi.api.OSGIServiceDescriptor)

Example 7 with OSGIServiceDescriptor

use of org.killbill.billing.osgi.api.OSGIServiceDescriptor in project killbill by killbill.

the class TestWithTaxItems method beforeClass.

@BeforeClass(groups = "slow")
public void beforeClass() throws Exception {
    super.beforeClass();
    this.testInvoicePluginApi = new TestInvoicePluginApi();
    pluginRegistry.registerService(new OSGIServiceDescriptor() {

        @Override
        public String getPluginSymbolicName() {
            return "TaxInvoicePluginApi";
        }

        @Override
        public String getPluginName() {
            return "TaxInvoicePluginApi";
        }

        @Override
        public String getRegistrationName() {
            return "TaxInvoicePluginApi";
        }
    }, testInvoicePluginApi);
}
Also used : OSGIServiceDescriptor(org.killbill.billing.osgi.api.OSGIServiceDescriptor) BeforeClass(org.testng.annotations.BeforeClass)

Example 8 with OSGIServiceDescriptor

use of org.killbill.billing.osgi.api.OSGIServiceDescriptor in project killbill by killbill.

the class DefaultPaymentControlProviderPluginRegistryProvider method get.

@Override
public OSGIServiceRegistration<PaymentControlPluginApi> get() {
    final DefaultPaymentControlProviderPluginRegistry pluginRegistry = new DefaultPaymentControlProviderPluginRegistry();
    // Make the external payment provider plugin available by default
    final OSGIServiceDescriptor desc = new OSGIServiceDescriptor() {

        @Override
        public String getPluginSymbolicName() {
            return null;
        }

        @Override
        public String getPluginName() {
            return DefaultPaymentControlProviderPlugin.PLUGIN_NAME;
        }

        @Override
        public String getRegistrationName() {
            return DefaultPaymentControlProviderPlugin.PLUGIN_NAME;
        }
    };
    pluginRegistry.registerService(desc, externalPaymentControlProviderPlugin);
    // Hack, because this is not a real plugin, so it can't register itself during lifecycle as it should.
    final OSGIServiceDescriptor desc2 = new OSGIServiceDescriptor() {

        @Override
        public String getPluginSymbolicName() {
            return null;
        }

        @Override
        public String getPluginName() {
            return InvoicePaymentControlPluginApi.PLUGIN_NAME;
        }

        @Override
        public String getRegistrationName() {
            return InvoicePaymentControlPluginApi.PLUGIN_NAME;
        }
    };
    pluginRegistry.registerService(desc2, invoicePaymentControlPlugin);
    return pluginRegistry;
}
Also used : DefaultPaymentControlProviderPluginRegistry(org.killbill.billing.payment.provider.DefaultPaymentControlProviderPluginRegistry) OSGIServiceDescriptor(org.killbill.billing.osgi.api.OSGIServiceDescriptor)

Example 9 with OSGIServiceDescriptor

use of org.killbill.billing.osgi.api.OSGIServiceDescriptor in project killbill by killbill.

the class TestDefaultAdminPaymentApi method beforeMethod.

@BeforeMethod(groups = "slow")
public void beforeMethod() throws Exception {
    super.beforeMethod();
    mockPaymentProviderPlugin.clear();
    account = testHelper.createTestAccount("bobo@gmail.com", true);
    final PaymentControlPluginApi mockPaymentControlProviderPlugin = new MockPaymentControlProviderPlugin();
    controlPluginRegistry.registerService(new OSGIServiceDescriptor() {

        @Override
        public String getPluginSymbolicName() {
            return null;
        }

        @Override
        public String getPluginName() {
            return MockPaymentControlProviderPlugin.PLUGIN_NAME;
        }

        @Override
        public String getRegistrationName() {
            return MockPaymentControlProviderPlugin.PLUGIN_NAME;
        }
    }, mockPaymentControlProviderPlugin);
}
Also used : PaymentControlPluginApi(org.killbill.billing.control.plugin.api.PaymentControlPluginApi) OSGIServiceDescriptor(org.killbill.billing.osgi.api.OSGIServiceDescriptor) MockPaymentControlProviderPlugin(org.killbill.billing.payment.provider.MockPaymentControlProviderPlugin) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 10 with OSGIServiceDescriptor

use of org.killbill.billing.osgi.api.OSGIServiceDescriptor in project killbill by killbill.

the class DefaultPaymentProviderPluginRegistryProvider method get.

@Override
public OSGIServiceRegistration<PaymentPluginApi> get() {
    final DefaultPaymentProviderPluginRegistry pluginRegistry = new DefaultPaymentProviderPluginRegistry(paymentConfig);
    // Make the external payment provider plugin available by default
    final OSGIServiceDescriptor desc = new OSGIServiceDescriptor() {

        @Override
        public String getPluginSymbolicName() {
            return null;
        }

        @Override
        public String getPluginName() {
            return ExternalPaymentProviderPlugin.PLUGIN_NAME;
        }

        @Override
        public String getRegistrationName() {
            return ExternalPaymentProviderPlugin.PLUGIN_NAME;
        }
    };
    pluginRegistry.registerService(desc, externalPaymentProviderPlugin);
    return pluginRegistry;
}
Also used : DefaultPaymentProviderPluginRegistry(org.killbill.billing.payment.provider.DefaultPaymentProviderPluginRegistry) OSGIServiceDescriptor(org.killbill.billing.osgi.api.OSGIServiceDescriptor)

Aggregations

OSGIServiceDescriptor (org.killbill.billing.osgi.api.OSGIServiceDescriptor)15 BeforeMethod (org.testng.annotations.BeforeMethod)6 BeforeClass (org.testng.annotations.BeforeClass)5 MockPaymentControlProviderPlugin (org.killbill.billing.payment.provider.MockPaymentControlProviderPlugin)3 ImmutableList (com.google.common.collect.ImmutableList)2 ArrayList (java.util.ArrayList)2 List (java.util.List)2 PluginProperty (org.killbill.billing.payment.api.PluginProperty)2 DefaultPlanPhasePriceOverride (org.killbill.billing.catalog.DefaultPlanPhasePriceOverride)1 StandaloneCatalogWithPriceOverride (org.killbill.billing.catalog.StandaloneCatalogWithPriceOverride)1 PlanPhasePriceOverride (org.killbill.billing.catalog.api.PlanPhasePriceOverride)1 PriceOverride (org.killbill.billing.catalog.override.PriceOverride)1 PaymentControlPluginApi (org.killbill.billing.control.plugin.api.PaymentControlPluginApi)1 PaymentOptions (org.killbill.billing.payment.api.PaymentOptions)1 DefaultPaymentControlProviderPluginRegistry (org.killbill.billing.payment.provider.DefaultPaymentControlProviderPluginRegistry)1 DefaultPaymentProviderPluginRegistry (org.killbill.billing.payment.provider.DefaultPaymentProviderPluginRegistry)1