Package org.apache.sling.resourceresolver.impl.helper

Examples of org.apache.sling.resourceresolver.impl.helper.ResourceResolverContext


            @Override
            public RootResourceProviderEntry getRootProviderEntry() {
                return rrp;
            }
        };
        resolver = new ResourceResolverImpl(crf, new ResourceResolverContext(false, null, new ResourceAccessSecurityTracker()));
    }
View Full Code Here


        if (authenticationInfo != null) {
            newAuthenticationInfo.putAll(authenticationInfo);
        }

        // create new context
        final ResourceResolverContext newContext = new ResourceResolverContext(this.context.isAdmin(),
                newAuthenticationInfo, factory.getResourceAccessSecurityTracker());
        this.factory.getRootProviderEntry().loginToRequiredFactories(newContext);

        // create a regular resource resolver
        return new ResourceResolverImpl(this.factory, newContext);
View Full Code Here

    private ResourceResolverFactoryImpl resFac;

    @Before public void setup() {
        commonFactory = new CommonResourceResolverFactoryImpl(new ResourceResolverFactoryActivator());
        resFac = new ResourceResolverFactoryImpl(commonFactory, /* TODO: using Bundle */ null, null);
        resResolver = new ResourceResolverImpl(commonFactory, new ResourceResolverContext(false, null, new ResourceAccessSecurityTracker()));
    }
View Full Code Here

        resFac = new ResourceResolverFactoryImpl(commonFactory, /* TODO: using Bundle */ null, null);
        resResolver = new ResourceResolverImpl(commonFactory, new ResourceResolverContext(false, null, new ResourceAccessSecurityTracker()));
    }

    @Test public void testClose() throws Exception {
        final ResourceResolver rr = new ResourceResolverImpl(commonFactory, new ResourceResolverContext(false, null, new ResourceAccessSecurityTracker()));
        assertTrue(rr.isLive());
        rr.close();
        assertFalse(rr.isLive());
        // close is always allowed to be called
        rr.close();
View Full Code Here

                            throws LoginException {
                        return resolvers.get(0);
                    }

                },
                new ResourceResolverContext(false, null, new ResourceAccessSecurityTracker()));
        resolvers.add(resolver);

        // the resources to test
        final Resource r = Mockito.mock(Resource.class);
        Mockito.when(r.getResourceType()).thenReturn("a:b");
View Full Code Here

                            throws LoginException {
                        return resolvers.get(0);
                    }

                },
                new ResourceResolverContext(false, null, new ResourceAccessSecurityTracker()));
        resolvers.add(resolver);
        final Resource r = new SyntheticResource(resolver, "/a", "a:b") {
            @Override
            public String getResourceSuperType() {
                return "d:e";
View Full Code Here

     */
    public ResourceResolver getResourceResolverInternal(final Map<String, Object> authenticationInfo,
                    final boolean isAdmin)
    throws LoginException {
        // create context
        final ResourceResolverContext ctx = new ResourceResolverContext(isAdmin, authenticationInfo, this.activator.getResourceAccessSecurityTracker());

        // login
        this.activator.getRootProviderEntry().loginToRequiredFactories(ctx);

        return new ResourceResolverImpl(this, ctx);
View Full Code Here

TOP

Related Classes of org.apache.sling.resourceresolver.impl.helper.ResourceResolverContext

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.