Examples of ComponentDefinitionRegistryImpl


Examples of org.apache.aries.blueprint.namespace.ComponentDefinitionRegistryImpl

        this.extenderBundle = extenderBundle;
        this.eventDispatcher = eventDispatcher;
        this.handlers = handlers;
        this.pathList = pathList;
        this.converter = new AggregateConverter(this);
        this.componentDefinitionRegistry = new ComponentDefinitionRegistryImpl();
        this.executors = executors;
        this.processors = new ArrayList<Processor>();
        if (System.getSecurityManager() != null) {
            this.accessControlContext = createAccessControlContext();
        }
View Full Code Here

Examples of org.apache.aries.blueprint.namespace.ComponentDefinitionRegistryImpl

      p.parse(bpxmlList);
      Set<URI> nsuris = p.getNamespaces();
      NamespaceHandlerSet nshandlers = nhri.getNamespaceHandlers(nsuris, b);
      p.validate(nshandlers.getSchema());
     
      ComponentDefinitionRegistry cdr = new ComponentDefinitionRegistryImpl();
      p.populate(nshandlers, cdr);
     
      BeanMetadata comp = (BeanMetadata) cdr.getComponentDefinition("top");
     
      BeanMetadata anon = (BeanMetadata) ((BeanProperty) comp.getProperties().get(0)).getValue();
      BeanMetadata anonToo = (BeanMetadata) ((BeanProperty) comp.getProperties().get(1)).getValue();

      assertEquals("Required", txenhancer.getComponentMethodTxAttribute(anon, "doSomething"));
View Full Code Here

Examples of org.apache.aries.blueprint.parser.ComponentDefinitionRegistryImpl

        this.extenderBundle = extenderBundle;
        this.eventDispatcher = eventDispatcher;
        this.handlers = handlers;
        this.pathList = pathList;
        this.converter = new AggregateConverter(this);
        this.componentDefinitionRegistry = new ComponentDefinitionRegistryImpl();
        this.executors = executor != null ? new ExecutorServiceWrapper(executor) : null;
        this.timer = timer;
        this.processors = new ArrayList<Processor>();
        if (System.getSecurityManager() != null) {
            this.accessControlContext = BlueprintDomainCombiner.createAccessControlContext(bundleContext);
View Full Code Here

Examples of org.apache.aries.blueprint.parser.ComponentDefinitionRegistryImpl

        this.extenderBundle = extenderBundle;
        this.eventDispatcher = eventDispatcher;
        this.handlers = handlers;
        this.pathList = pathList;
        this.converter = new AggregateConverter(this);
        this.componentDefinitionRegistry = new ComponentDefinitionRegistryImpl();
        this.executors = executor != null ? new ExecutorServiceWrapper(executor) : null;
        this.timer = timer;
        this.processors = new ArrayList<Processor>();
        if (System.getSecurityManager() != null) {
            this.accessControlContext = BlueprintDomainCombiner.createAccessControlContext(bundleContext);
View Full Code Here

Examples of org.apache.aries.blueprint.parser.ComponentDefinitionRegistryImpl

public class ReferencesTest extends AbstractBlueprintTest {



    public void testWiring() throws Exception {
        ComponentDefinitionRegistryImpl registry = parse("/test-references.xml");
        ProxyManager proxyManager = new AbstractProxyManager() {
            @Override
            protected Object createNewProxy(Bundle bundle, Collection<Class<?>> classes, Callable<Object> objectCallable, InvocationListener invocationListener) throws UnableToProxyException {
                return new Object();
            }
View Full Code Here

Examples of org.apache.aries.blueprint.parser.ComponentDefinitionRegistryImpl

import org.apache.aries.blueprint.pojos.SimpleBean;

public class BeanLoadingTest extends AbstractBlueprintTest {

    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);
View Full Code Here

Examples of org.apache.aries.blueprint.parser.ComponentDefinitionRegistryImpl

        assertNotNull(obj);
        assertTrue(obj instanceof SimpleBean);
    }

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

        Object obj = repository.create("simpleBeanNested");
        assertNotNull(obj);
View Full Code Here

Examples of org.apache.aries.blueprint.parser.ComponentDefinitionRegistryImpl

        };
        return parse(name, handlers);
    }

    protected ComponentDefinitionRegistryImpl parse(String name, NamespaceHandlerSet handlers) throws Exception {
        ComponentDefinitionRegistryImpl registry = new ComponentDefinitionRegistryImpl();
        Parser parser = new Parser();
        parser.parse(Collections.singletonList(getClass().getResource(name)));
        parser.populate(handlers, registry);
        return registry;
    }
View Full Code Here

Examples of org.apache.aries.blueprint.parser.ComponentDefinitionRegistryImpl

import org.osgi.service.blueprint.container.ComponentDefinitionException;

public class WiringTest extends AbstractBlueprintTest {

    public void testWiring() throws Exception {
        ComponentDefinitionRegistryImpl registry = parse("/test-wiring.xml");
        Repository repository = new TestBlueprintContainer(registry).getRepository();
       
        Object obj1 = repository.create("pojoA");
        assertNotNull(obj1);
        assertTrue(obj1 instanceof PojoA);
View Full Code Here

Examples of org.apache.aries.blueprint.parser.ComponentDefinitionRegistryImpl

        // test destroy-method
        assertEquals(true, pojob.getDestroyCalled());
    }
   
    public void testSetterDisambiguation() throws Exception {
        ComponentDefinitionRegistryImpl registry = parse("/test-wiring.xml");
        Repository repository = new TestBlueprintContainer(registry).getRepository();

        AmbiguousPojo pojo = (AmbiguousPojo) repository.create("ambiguousViaInt");
        assertEquals(5, pojo.getSum());
       
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.