Package jodd.petite

Examples of jodd.petite.PetiteContainer


   */
  protected void initWebApplication() {
    log = LoggerFactory.getLogger(WebApplication.class);
    log.debug("Initializing Madvoc web application");

    madpc = new PetiteContainer();
    madpc.addSelf(MADVOC_CONTAINER_NAME);
  }
View Full Code Here


   */
  protected void initWebApplication() {
    log = LoggerFactory.getLogger(WebApplication.class);
    log.debug("Initializing Madvoc web application");

    madpc = new PetiteContainer();
    madpc.addSelf(MADVOC_CONTAINER_NAME);
  }
View Full Code Here

  @Test
  public void testInjection() {
    WebApplication webapp = new WebApplication(true);
    webapp.registerMadvocComponents();

    PetiteContainer madpc = (PetiteContainer) webapp.getComponent(WebApplication.MADVOC_CONTAINER_NAME);
    MadvocConfig madvocConfig = new MadvocConfig();

    String baseName = FooBean.class.getName();

    madpc.defineParameter("foo", "1");

    madpc.defineParameter(baseName + ".integer", "173");
    madpc.defineParameter(baseName + ".string", "jodd");
    madpc.defineParameter(baseName, "huh");

    MadvocParamsInjector madvocParamsInjector = new MadvocParamsInjector(madvocConfig);

    FooBean fooBean = new FooBean();
View Full Code Here

    appCore.initLogger();
    appCore.initProps();
    appCore.initScanner();
    appCore.startPetite();
    PetiteContainer pc = appCore.petite;

    AppScanner as = (AppScanner) pc.getBean(AppCore.PETITE_SCAN);

    assertSame(appCore.appScanner, as);

    assertTrue(as.ignoreExceptions);
    assertEquals(3, as.includedEntries.length);
View Full Code Here

  @Test
  public void testExpandStack() {
    InjectorsManager injectorsManager = new InjectorsManager();
    injectorsManager.scopeDataResolver = new ScopeDataResolver();
    injectorsManager.madvocConfig = new MadvocConfig();
    injectorsManager.madpc = new PetiteContainer();
    injectorsManager.createInjectors();

    InterceptorsManager im = new InterceptorsManager();
    im.contextInjectorComponent = new ContextInjectorComponent();
    im.contextInjectorComponent.injectorsManager = injectorsManager;
View Full Code Here

  @Test
  public void testExpandConfigurableStack() {
    InjectorsManager injectorsManager = new InjectorsManager();
    injectorsManager.scopeDataResolver = new ScopeDataResolver();
    injectorsManager.madvocConfig = new MadvocConfig();
    injectorsManager.madpc = new PetiteContainer();

    InterceptorsManager im = new InterceptorsManager();
    im.contextInjectorComponent = new ContextInjectorComponent();
    im.contextInjectorComponent.injectorsManager = injectorsManager;
    im.contextInjectorComponent.madvocController = new MadvocController();
View Full Code Here

  @Test
  public void testExpandStack2() {
    InjectorsManager injectorsManager = new InjectorsManager();
    injectorsManager.scopeDataResolver = new ScopeDataResolver();
    injectorsManager.madvocConfig = new MadvocConfig();
    injectorsManager.madpc = new PetiteContainer();
    injectorsManager.createInjectors();

    InterceptorsManager im = new InterceptorsManager();
    im.contextInjectorComponent = new ContextInjectorComponent();
    im.contextInjectorComponent.injectorsManager = injectorsManager;
View Full Code Here

   * {@link #providePetiteContainer() provided} to Madvoc.
   * This method does not have to be fired off if Petite
   * container is created on some other place!
   */
  protected PetiteContainer createPetiteContainer() {
    return new PetiteContainer();
  }
View Full Code Here

   * Provides {@link PetiteContainer Petite container} instance that will be used as application context.
   * By default it {@link #createPetiteContainer() creates new container instance} and performs
   * {@link jodd.petite.config.AutomagicPetiteConfigurator auto-magic configuration}.
   */
  protected PetiteContainer providePetiteContainer() {
    PetiteContainer pc = createPetiteContainer();

    AutomagicPetiteConfigurator configurator = new AutomagicPetiteConfigurator();

    configurator.configure(pc);

View Full Code Here

   */
  @Override
  public void registerMadvocComponents() {
    super.registerMadvocComponents();

    PetiteContainer petiteContainer = providePetiteContainer();
    registerComponent("petiteContainer", petiteContainer);

    registerComponent(PetiteMadvocController.class);
    registerComponent(PetiteFilterManager.class);
    registerComponent(PetiteInterceptorManager.class);
View Full Code Here

TOP

Related Classes of jodd.petite.PetiteContainer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.