Package org.apache.sling.models.impl.injectors

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


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

        factory = new ModelAdapterFactory();
        factory.activate(componentCtx);
        factory.bindInjector(new ValueMapInjector(), new ServicePropertiesMap(0, 0));
        factory.bindInjector(new SelfInjector(), new ServicePropertiesMap(1, 1));
    }
View Full Code Here


        when(resourceResolver.getResource("/some/other/path")).thenReturn(byPropertyValueResource);
        when(resourceResolver.getResource("/some/other/path2")).thenReturn(byPropertyValueResource2);

        factory = new ModelAdapterFactory();
        factory.activate(componentCtx);
        factory.bindInjector(new SelfInjector(), new ServicePropertiesMap(1, Integer.MAX_VALUE));
        factory.bindInjector(new ValueMapInjector(), new ServicePropertiesMap(2, 2000));
        factory.bindInjector(new ResourcePathInjector(), new ServicePropertiesMap(3, 2500));
        factory.bindInjectAnnotationProcessorFactory(new ResourcePathInjector(), new ServicePropertiesMap(3, 2500));
    }
View Full Code Here

        when(request.getAttribute("attribute2")).thenReturn(STRING_VALUE);

        factory = new ModelAdapterFactory();
        factory.activate(componentCtx);
        factory.bindInjector(new RequestAttributeInjector(), new ServicePropertiesMap(1, 1));
        factory.bindInjector(new SelfInjector(), new ServicePropertiesMap(2, 2));
    }
View Full Code Here

        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());
        registerService(Injector.class, new SlingObjectInjector());
        registerService(Injector.class, new ValueMapInjector());

        // sling models implementation pickers
        registerService(ImplementationPicker.class, new FirstImplementationPicker());
View Full Code Here

            }
        });

        factory = new ModelAdapterFactory();
        factory.activate(componentCtx);
        factory.bindInjector(new SelfInjector(), new ServicePropertiesMap(1, 1));
    }
View Full Code Here

TOP

Related Classes of org.apache.sling.models.impl.injectors.SelfInjector

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.