Codota Logo
KillBillShiroAopModule
Code IndexAdd Codota to your IDE (free)

How to use
KillBillShiroAopModule
in
com.ning.billing.util.glue

Best Java code snippets using com.ning.billing.util.glue.KillBillShiroAopModule (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: com.ning.billing/killbill-util

  protected final void bindShiroInterceptorWithHierarchy(final AnnotationMethodInterceptor methodInterceptor) {
    bindInterceptor(Matchers.any(),
            new AbstractMatcher<Method>() {
              public boolean matches(final Method method) {
                final Class<? extends Annotation> annotation = methodInterceptor.getHandler().getAnnotationClass();
                return resolver.getAnnotationFromMethod(method, annotation) != null;
              }
            },
            new AopAllianceMethodInterceptorAdapter(methodInterceptor));
  }
}
origin: com.ning.billing/killbill-util

@Override
protected void configureInterceptors(final AnnotationResolver resolver) {
  super.configureInterceptors(resolver);
  if (!KillBillShiroModule.isRBACEnabled()) {
    return;
  }
  final PermissionAnnotationHandler permissionAnnotationHandler = new PermissionAnnotationHandler();
  // Inject the Security API
  requestInjection(permissionAnnotationHandler);
  final PermissionAnnotationMethodInterceptor methodInterceptor = new PermissionAnnotationMethodInterceptor(permissionAnnotationHandler, resolver);
  bindShiroInterceptorWithHierarchy(methodInterceptor);
}
origin: com.ning.billing/killbill-util

@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();
  // Shutdown the cache manager to avoid duplicate exceptions
  CacheManager.getInstance().shutdown();
  final Injector injector = Guice.createInjector(Stage.PRODUCTION,
                          new KillBillShiroModule(configSource),
                          new KillBillShiroAopModule(),
                          new SecurityModule(),
                          new AbstractModule() {
                            @Override
                            protected void configure() {
                              bind(IDBI.class).toInstance(Mockito.mock(IDBI.class));
                            }
                          });
  final AopTester aopedTester = injector.getInstance(AopTester.class);
  verifyAopedTester(aopedTester);
}
origin: com.ning.billing/killbill-util

@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();
  // Shutdown the cache manager to avoid duplicate exceptions
  CacheManager.getInstance().shutdown();
  final Injector injector = Guice.createInjector(Stage.PRODUCTION,
                          new KillBillShiroModule(configSource),
                          new KillBillShiroAopModule(),
                          new SecurityModule(),
                          new AbstractModule() {
                            @Override
                            public void configure() {
                              bind(IDBI.class).toInstance(Mockito.mock(IDBI.class));
                              bind(IAopTester.class).to(AopTesterImpl.class).asEagerSingleton();
                            }
                          });
  final IAopTester aopedTester = injector.getInstance(IAopTester.class);
  verifyAopedTester(aopedTester);
}
origin: com.ning.billing/killbill-util

  @Override
  protected void configure() {
    super.configure();
    install(new GuicyKillbillTestNoDBModule());

    install(new MockNonEntityDaoModule());
    install(new MockGlobalLockerModule());
    install(new InMemoryBusModule(configSource));
    install(new MockNotificationQueueModule(configSource));

    installAuditMock();

    install(new KillBillShiroModule(configSource));
    install(new KillBillShiroAopModule());
    install(new SecurityModule());
  }
}
com.ning.billing.util.glueKillBillShiroAopModule

Most used methods

  • <init>
  • bindInterceptor
  • bindShiroInterceptorWithHierarchy
  • requestInjection

Popular in Java

  • Making http post requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • startActivity (Activity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • ImageIO (javax.imageio)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now