Package org.apache.sling.jcr.resource.internal.helper.jcr

Examples of org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory


        componentContext.getBundleContext()
                .registerService(SlingRepository.class.getName(), this.slingRepository, null);

        // setup real sling JCR resource provider implementation for use in
        // mocked context
        JcrResourceProviderFactory jcrResourceProviderFactory = new JcrResourceProviderFactory();
        MockOsgi.injectServices(jcrResourceProviderFactory, componentContext.getBundleContext());
        MockOsgi.activate(jcrResourceProviderFactory, componentContext.getBundleContext(),
                ImmutableMap.<String, Object> of());
       
        ResourceProvider resourceProvider;
        if (isAdmin) {
            resourceProvider = jcrResourceProviderFactory.getAdministrativeResourceProvider(authenticationInfo);
        }
        else {
            resourceProvider = jcrResourceProviderFactory.getResourceProvider(authenticationInfo);
        }
       
        Dictionary<Object, Object> resourceProviderProps = new Hashtable<Object, Object>();
        resourceProviderProps.put(ResourceProvider.ROOTS, new String[] { "/" });
        componentContext.getBundleContext().registerService(ResourceProvider.class.getName(), resourceProvider,
View Full Code Here


        }

        public void init(String rootPath, Session session, SlingRepository repository) throws Exception {
            ResourceResolverFactoryActivator activator = new ResourceResolverFactoryActivator();

            JcrResourceProviderFactory providerFactory = new JcrResourceProviderFactory();
            PrivateAccessor.setField(providerFactory, "repository", repository);

            Map<String, Object> props = new HashMap<String, Object>();
            props.put(Constants.SERVICE_ID, -1l);
            props.put(ResourceProviderFactory.PROPERTY_REQUIRED, true);
View Full Code Here

        }

        public void init(String rootPath, Session session, SlingRepository repository) throws Exception {
            ResourceResolverFactoryActivator activator = new ResourceResolverFactoryActivator();

            JcrResourceProviderFactory providerFactory = new JcrResourceProviderFactory();
            PrivateAccessor.setField(providerFactory, "repository", repository);

            Map<String, Object> props = new HashMap<String, Object>();
            props.put(Constants.SERVICE_ID, -1l);
            props.put(ResourceProviderFactory.PROPERTY_REQUIRED, true);
View Full Code Here

TOP

Related Classes of org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory

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.