Examples of registerComponentImplementation()


Examples of org.exoplatform.services.jcr.impl.WorkspaceContainer.registerComponentImplementation()

                     // add data receiver
                     AbstractWorkspaceDataReceiver dataReceiver = null;

                     if (mode.equals(PROXY_MODE))
                     {
                        wContainer.registerComponentImplementation(WorkspaceDataManagerProxy.class);
                        wContainer.registerComponentImplementation(ProxyWorkspaceDataReceiver.class);
                        dataReceiver =
                           (ProxyWorkspaceDataReceiver)wContainer
                              .getComponentInstanceOfType(ProxyWorkspaceDataReceiver.class);
                     }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.WorkspaceContainer.registerComponentImplementation()

                     AbstractWorkspaceDataReceiver dataReceiver = null;

                     if (mode.equals(PROXY_MODE))
                     {
                        wContainer.registerComponentImplementation(WorkspaceDataManagerProxy.class);
                        wContainer.registerComponentImplementation(ProxyWorkspaceDataReceiver.class);
                        dataReceiver =
                           (ProxyWorkspaceDataReceiver)wContainer
                              .getComponentInstanceOfType(ProxyWorkspaceDataReceiver.class);
                     }
                     else if (mode.equals(PERSISTENT_MODE))
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.WorkspaceContainer.registerComponentImplementation()

                           (ProxyWorkspaceDataReceiver)wContainer
                              .getComponentInstanceOfType(ProxyWorkspaceDataReceiver.class);
                     }
                     else if (mode.equals(PERSISTENT_MODE))
                     {
                        wContainer.registerComponentImplementation(PersistentWorkspaceDataReceiver.class);
                        dataReceiver =
                           (PersistentWorkspaceDataReceiver)wContainer
                              .getComponentInstanceOfType(PersistentWorkspaceDataReceiver.class);
                     }
View Full Code Here

Examples of org.nanocontainer.DefaultNanoContainer.registerComponentImplementation()

        String builderClass = (String) attributes.remove(CLASS);
        NanoContainer factory = new DefaultNanoContainer();
        MutablePicoContainer parentPico = parentContainer.getPico();
        factory.getPico().registerComponentInstance(MutablePicoContainer.class, parentPico);
        try {
            factory.registerComponentImplementation(GroovyObject.class, builderClass);
        } catch (ClassNotFoundException e) {
            throw new NanoContainerMarkupException("ClassNotFoundException " + builderClass);
        }
        Object componentInstance = factory.getPico().getComponentInstance(GroovyObject.class);
        return componentInstance;
View Full Code Here

Examples of org.nanocontainer.NanoContainer.registerComponentImplementation()

        String builderClass = (String) attributes.remove(CLASS);
        NanoContainer factory = new DefaultNanoContainer();
        MutablePicoContainer parentPico = parentContainer.getPico();
        factory.getPico().registerComponentInstance(MutablePicoContainer.class, parentPico);
        try {
            factory.registerComponentImplementation(GroovyObject.class, builderClass);
        } catch (ClassNotFoundException e) {
            throw new NanoContainerMarkupException("ClassNotFoundException " + builderClass);
        }
        Object componentInstance = factory.getPico().getComponentInstance(GroovyObject.class);
        return componentInstance;
View Full Code Here

Examples of org.nanocontainer.NanoPicoContainer.registerComponentImplementation()

    public void testNamedChildContainerIsAccessible() {
        StringBuffer sb = new StringBuffer();
        final NanoPicoContainer parent = (NanoPicoContainer) createPicoContainer(null);
        parent.registerComponentInstance(sb);
        final NanoPicoContainer child = (NanoPicoContainer) parent.makeChildContainer("foo");
        child.registerComponentImplementation(LifeCycleMonitoring.class,LifeCycleMonitoring.class);
        LifeCycleMonitoring o = (LifeCycleMonitoring) parent.getComponentInstance("foo/*" + LifeCycleMonitoring.class.getName());
        assertNotNull(o);
    }

    // TODO - go to a Nano TCK?
View Full Code Here

Examples of org.nanocontainer.aop.AspectablePicoContainer.registerComponentImplementation()

    }
   
    public void testMakeChildContainer(){
        AspectablePicoContainerFactory aspectableContainerFactory = new DynaopAspectablePicoContainerFactory();
        AspectablePicoContainer parent = aspectableContainerFactory.createContainer();
        parent.registerComponentImplementation("t1", SimpleTouchable.class);
        AspectablePicoContainer child = aspectableContainerFactory.makeChildContainer(parent);
        Object t1 = child.getParent().getComponentInstance("t1");       
        assertNotNull(t1);
        assertTrue(t1 instanceof SimpleTouchable);       
    }
View Full Code Here

Examples of org.nanocontainer.reflection.DefaultNanoPicoContainer.registerComponentImplementation()

    }


    public void testBuildContainerWithParentDependencyAndAssemblyScope() {
        DefaultNanoPicoContainer parent = new DefaultNanoPicoContainer();
        parent.registerComponentImplementation("a", A.class);

        Reader script = new StringReader("" +
                "package org.nanocontainer.script.groovy\n" +
                "builder = new CustomGroovyNodeBuilder()\n" +
                "nano = builder.container(parent:parent) {\n" +
View Full Code Here

Examples of org.picocontainer.MutablePicoContainer.registerComponentImplementation()

    protected AbstractEventChannel newEventChannel()
    {
        final MutablePicoContainer _container = newContainerForChannel();

        _container.registerComponentImplementation(AbstractEventChannel.class, TypedEventChannelImpl.class);

        return (AbstractEventChannel) _container.getComponentInstance(AbstractEventChannel.class);
    }

    public int[] get_all_typed_channels()
View Full Code Here

Examples of org.picocontainer.MutablePicoContainer.registerComponentImplementation()

    protected AbstractAdmin newConsumerAdmin(final int id)
    {
        final MutablePicoContainer _adminContainer = newContainerForAdmin(id);

        _adminContainer.registerComponentImplementation(AbstractAdmin.class, ConsumerAdminImpl.class);

        return (AbstractAdmin) _adminContainer.getComponentInstanceOfType(AbstractAdmin.class);
    }

    protected AbstractSupplierAdmin newSupplierAdmin(final int id)
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.