use of org.killbill.billing.util.glue.KillBillShiroAopModule in project killbill by killbill.
the class TestEntitlementModule method configure.
@Override
protected void configure() {
super.configure();
install(new CacheModule(configSource));
install(new ConfigModule(configSource));
install(new EventModule(configSource));
install(new CallContextModule(configSource));
install(new MockTenantModule(configSource));
install(new KillBillShiroModuleOnlyIniRealm(configSource));
install(new KillBillShiroAopModule(configSource));
install(new SecurityModule(configSource));
}
use of org.killbill.billing.util.glue.KillBillShiroAopModule in project killbill by killbill.
the class KillpayServerModule method installKillbillModules.
@Override
protected void installKillbillModules() {
install(new AuditModule(configSource));
install(new NodesModule(configSource));
install(new BroadcastModule(configSource));
install(new BeatrixModule(configSource));
install(new CacheModule(configSource));
install(new ConfigModule(configSource));
install(new EventModule(configSource));
install(new CallContextModule(configSource));
install(new CurrencyModule(configSource));
install(new CustomFieldModule(configSource));
install(new DefaultAccountModule(configSource));
install(new ExportModule(configSource));
install(new GlobalLockerModule(configSource));
install(new KillBillShiroAopModule(configSource));
final ConfigurationObjectFactory factory = new ConfigurationObjectFactory(skifeConfigSource);
final JaxrsConfig jaxrsConfig = factory.build(JaxrsConfig.class);
install(new KillbillApiAopModule(jaxrsConfig));
install(new JaxRSAopModule(jaxrsConfig));
install(new KillBillShiroWebModule(servletContext, skifeConfigSource));
install(new NonEntityDaoModule(configSource));
install(new PaymentModule(configSource));
install(new RecordIdModule(configSource));
install(new SecurityModule(configSource));
install(new TagStoreModule(configSource));
install(new DefaultTenantModule(configSource));
// TODO Required by payment for InvoiceInternalApi and InvoicePaymentApi
install(new DefaultInvoiceModule(configSource));
// TODO Dependencies for DefaultInvoiceModule
install(new CatalogModule(configSource));
install(new DefaultEntitlementModule(configSource));
install(new DefaultJunctionModule(configSource));
install(new DefaultSubscriptionModule(configSource));
install(new TemplateModule(configSource));
install(new UsageModule(configSource));
install(new DefaultJaxrsModule(configSource));
// TODO Dependencies for AccountResource
install(new DefaultOverdueModule(configSource));
}
use of org.killbill.billing.util.glue.KillBillShiroAopModule in project killbill by killbill.
the class TestPermissionAnnotationMethodInterceptor method testAOPForInterface.
@Test(groups = "fast")
public void testAOPForInterface() throws Exception {
// Make sure it works as expected without any AOP magic
final IAopTester simpleTester = new AopTesterImpl();
try {
simpleTester.createRefund();
} catch (Exception e) {
Assert.fail(e.getLocalizedMessage());
}
// Now, verify the interception works
configureShiro();
final Injector injector = Guice.createInjector(Stage.PRODUCTION, new ShiroModuleNoDB(configSource), new KillBillShiroAopModule(configSource), new TestSecurityModuleNoDB(configSource), new CacheModule(configSource), new AbstractModule() {
@Override
public void configure() {
bind(IDBI.class).toInstance(Mockito.mock(IDBI.class));
bind(IDBI.class).annotatedWith(Names.named(MAIN_RO_DATA_SOURCE_ID)).toInstance(Mockito.mock(IDBI.class));
bind(IAopTester.class).to(AopTesterImpl.class).asEagerSingleton();
bind(TenantInternalApi.class).toInstance(Mockito.mock(TenantInternalApi.class));
bind(NonEntityDao.class).toInstance(Mockito.mock(NonEntityDao.class));
}
});
final IAopTester aopedTester = injector.getInstance(IAopTester.class);
verifyAopedTester(aopedTester);
}
use of org.killbill.billing.util.glue.KillBillShiroAopModule in project killbill by killbill.
the class TestPermissionAnnotationMethodInterceptor method testAOPForClass.
@Test(groups = "fast")
public void testAOPForClass() throws Exception {
// Make sure it works as expected without any AOP magic
final IAopTester simpleTester = new AopTester();
try {
simpleTester.createRefund();
} catch (Exception e) {
Assert.fail(e.getLocalizedMessage());
}
// Now, verify the interception works
configureShiro();
final Injector injector = Guice.createInjector(Stage.PRODUCTION, new ShiroModuleNoDB(configSource), new KillBillShiroAopModule(configSource), new TestSecurityModuleNoDB(configSource), new CacheModule(configSource), new AbstractModule() {
@Override
protected void configure() {
bind(IDBI.class).toInstance(Mockito.mock(IDBI.class));
bind(IDBI.class).annotatedWith(Names.named(MAIN_RO_DATA_SOURCE_ID)).toInstance(Mockito.mock(IDBI.class));
bind(TenantInternalApi.class).toInstance(Mockito.mock(TenantInternalApi.class));
bind(NonEntityDao.class).toInstance(Mockito.mock(NonEntityDao.class));
}
});
final AopTester aopedTester = injector.getInstance(AopTester.class);
verifyAopedTester(aopedTester);
}
use of org.killbill.billing.util.glue.KillBillShiroAopModule in project killbill by killbill.
the class KillbillServerModule method installKillbillModules.
protected void installKillbillModules() {
install(new AuditModule(configSource));
install(new NodesModule(configSource));
install(new BroadcastModule(configSource));
install(new BeatrixModule(configSource));
install(new CacheModule(configSource));
install(new ConfigModule(configSource));
install(new EventModule(configSource));
install(new CallContextModule(configSource));
install(new CatalogModule(configSource));
install(new CurrencyModule(configSource));
install(new CustomFieldModule(configSource));
install(new DefaultAccountModule(configSource));
install(new DefaultEntitlementModule(configSource));
install(new DefaultInvoiceModule(configSource));
install(new DefaultJunctionModule(configSource));
install(new DefaultOverdueModule(configSource));
install(new DefaultSubscriptionModule(configSource));
install(new ExportModule(configSource));
install(new GlobalLockerModule(configSource));
install(new KillBillShiroAopModule(configSource));
final ConfigurationObjectFactory factory = new ConfigurationObjectFactory(skifeConfigSource);
final JaxrsConfig jaxrsConfig = factory.build(JaxrsConfig.class);
install(new KillbillApiAopModule(jaxrsConfig));
install(new JaxRSAopModule(jaxrsConfig));
install(new KillBillShiroWebModule(servletContext, skifeConfigSource));
install(new NonEntityDaoModule(configSource));
install(new PaymentModule(configSource));
install(new RecordIdModule(configSource));
install(new SecurityModule(configSource));
install(new TagStoreModule(configSource));
install(new TemplateModule(configSource));
install(new DefaultTenantModule(configSource));
install(new UsageModule(configSource));
install(new DefaultJaxrsModule(configSource));
}
Aggregations