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;
}
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);
}
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;
}
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);
}
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;
}
Aggregations