Package org.apache.aries.blueprint.di

Examples of org.apache.aries.blueprint.di.Repository.create()


        assertTrue(obj instanceof PojoGenerics);
        pojo = (PojoGenerics) obj;
       
        assertEquals(expectedSet, pojo.getSet());
       
        obj = repository.create("constructorMap");
        assertTrue(obj instanceof PojoGenerics);
        pojo = (PojoGenerics) obj;
       
        assertEquals(expectedMap, pojo.getMap());
       
View Full Code Here


        assertTrue(obj instanceof PojoGenerics);
        pojo = (PojoGenerics) obj;
       
        assertEquals(expectedMap, pojo.getMap());
       
        obj = repository.create("genericPojo");
        assertTrue(obj instanceof Primavera);
        assertEquals("string", ((Primavera) obj).prop);
       
        obj = repository.create("doubleGenericPojo");
        assertTrue(obj instanceof Primavera);
View Full Code Here

       
        obj = repository.create("genericPojo");
        assertTrue(obj instanceof Primavera);
        assertEquals("string", ((Primavera) obj).prop);
       
        obj = repository.create("doubleGenericPojo");
        assertTrue(obj instanceof Primavera);
        assertEquals("stringToo", ((Primavera) obj).prop);
    }
   
    public void testCircular() throws Exception {
View Full Code Here

        String name = recipe.getName();
        Repository repo = blueprintContainer.getRepository();
        if (repo.getRecipe(name) != recipe) {
            repo.putRecipe(name, recipe);
        }
        return repo.create(name);
    }
  
    private String getComponentName() {
        if (metadata.getServiceComponent() instanceof RefMetadata) {
            RefMetadata ref = (RefMetadata) metadata.getServiceComponent();
View Full Code Here

        String name = recipe.getName();
        Repository repo = blueprintContainer.getRepository();
        if (repo.getRecipe(name) != recipe) {
            repo.putRecipe(name, recipe);
        }
        return repo.create(name);
    }
   
    private String getComponentName() {
        if (metadata.getServiceComponent() instanceof RefMetadata) {
            RefMetadata ref = (RefMetadata) metadata.getServiceComponent();
View Full Code Here

        String name = recipe.getName();
        Repository repo = blueprintContainer.getRepository();
        if (repo.getRecipe(name) != recipe) {
            repo.putRecipe(name, recipe);
        }
        return repo.create(name);
    }
  
    private String getComponentName() {
        if (metadata.getServiceComponent() instanceof RefMetadata) {
            RefMetadata ref = (RefMetadata) metadata.getServiceComponent();
View Full Code Here

                return false;
            }
        };
        Repository repository = new TestBlueprintContainer(registry, proxyManager).getRepository();
       
        repository.create("refItf");

        try {
            repository.create("refClsErr");
            fail("Should have failed");
        } catch (ComponentDefinitionException e) {
View Full Code Here

        Repository repository = new TestBlueprintContainer(registry, proxyManager).getRepository();
       
        repository.create("refItf");

        try {
            repository.create("refClsErr");
            fail("Should have failed");
        } catch (ComponentDefinitionException e) {

        }
View Full Code Here

            fail("Should have failed");
        } catch (ComponentDefinitionException e) {

        }

        repository.create("refClsOk");
    }

    static class ProxyGenerationException extends RuntimeException {
    }
   
View Full Code Here

    public void testLoadSimpleBean() throws Exception {
        ComponentDefinitionRegistryImpl registry = parse("/test-bean-classes.xml");
        Repository repository = new TestBlueprintContainer(registry)
                .getRepository();

        Object obj = repository.create("simpleBean");
        assertNotNull(obj);
        assertTrue(obj instanceof SimpleBean);
    }

    public void testLoadSimpleBeanNested() throws Exception {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.