Examples of OSGiServiceInjector


Examples of org.apache.sling.models.impl.injectors.OSGiServiceInjector

        MockModelAdapterFactory mockModelAdapterFactory = new MockModelAdapterFactory(componentContext);
        bundleContext.registerService(AdapterFactory.class.getName(), mockModelAdapterFactory, null);

        // register some injectors
        bundleContext.registerService(Injector.class.getName(), new RequestAttributeInjector(), null);
        OSGiServiceInjector osgiServiceInjector = new OSGiServiceInjector();
        osgiServiceInjector.activate(componentContext);
        bundleContext.registerService(Injector.class.getName(), osgiServiceInjector, null);

        // register implementation pickers
        bundleContext.registerService(ImplementationPicker.class.getName(), new FirstImplementationPicker(), null);
View Full Code Here

Examples of org.apache.sling.models.impl.injectors.OSGiServiceInjector

        when(componentCtx.getProperties()).thenReturn(new Hashtable<String, Object>());

        factory = new ModelAdapterFactory();
        factory.activate(componentCtx);

        osgiInjector = new OSGiServiceInjector();
        osgiInjector.activate(componentCtx);

        BindingsInjector bindingsInjector = new BindingsInjector();
        ValueMapInjector valueMapInjector = new ValueMapInjector();
        ChildResourceInjector childResourceInjector = new ChildResourceInjector();
View Full Code Here

Examples of org.apache.sling.models.impl.injectors.OSGiServiceInjector

        when(componentCtx.getProperties()).thenReturn(new Hashtable<String, Object>());

        factory = new ModelAdapterFactory();
        factory.activate(componentCtx);

        OSGiServiceInjector injectorFactory = new OSGiServiceInjector();
        injectorFactory.activate(componentCtx);
        factory.bindInjector(injectorFactory, new ServicePropertiesMap(1, 1));

        bindings.setSling(helper);
    }
View Full Code Here

Examples of org.apache.sling.models.impl.injectors.OSGiServiceInjector

        registerService(AdapterFactory.class, modelAdapterFactory);

        // sling models injectors
        registerService(Injector.class, new BindingsInjector());
        registerService(Injector.class, new ChildResourceInjector());
        OSGiServiceInjector osgiServiceInjector = new OSGiServiceInjector();
        osgiServiceInjector.activate(componentContext());
        registerService(Injector.class, osgiServiceInjector);
        registerService(Injector.class, new RequestAttributeInjector());
        registerService(Injector.class, new ResourcePathInjector());
        registerService(Injector.class, new ResourceResolverInjector());
        registerService(Injector.class, new SelfInjector());
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.