Package org.apache.jackrabbit.spi.commons.conversion

Examples of org.apache.jackrabbit.spi.commons.conversion.NameResolver


    @Override
    protected void setUp() throws Exception {
        super.setUp();

        if (superuser instanceof SessionImpl) {
            NameResolver resolver = (SessionImpl) superuser;
            protectedUserProps.add(resolver.getJCRName(UserConstants.P_PASSWORD));
            protectedUserProps.add(resolver.getJCRName(UserConstants.P_IMPERSONATORS));
            protectedUserProps.add(resolver.getJCRName(UserConstants.P_PRINCIPAL_NAME));
            protectedUserProps.add(resolver.getJCRName(UserConstants.P_DISABLED));

            protectedGroupProps.add(resolver.getJCRName(UserConstants.P_MEMBERS));
            protectedGroupProps.add(resolver.getJCRName(UserConstants.P_PRINCIPAL_NAME));
        } else {
            throw new NotExecutableException();
        }
    }
View Full Code Here


    protected void setUp() throws Exception {
        super.setUp();
        if (!(userMgr instanceof UserManagerImpl)) {
            throw new NotExecutableException("UserManagerImpl expected -> cannot perform test.");
        }
        NameResolver resolver = (SessionImpl) superuser;
        pPrincipalName = resolver.getJCRName(UserConstants.P_PRINCIPAL_NAME);
        pUserID = resolver.getJCRName(UserConstants.P_USERID);
    }
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();

        if (superuser instanceof SessionImpl) {
            NameResolver resolver = (SessionImpl) superuser;
            protectedUserProps.add(resolver.getJCRName(UserConstants.P_USERID));
            protectedUserProps.add(resolver.getJCRName(UserConstants.P_PASSWORD));
            protectedUserProps.add(resolver.getJCRName(UserConstants.P_GROUPS));
            protectedUserProps.add(resolver.getJCRName(UserConstants.P_IMPERSONATORS));
            protectedUserProps.add(resolver.getJCRName(UserConstants.P_PRINCIPAL_NAME));
            protectedUserProps.add(resolver.getJCRName(UserConstants.P_REFEREES));

            protectedUserProps.add(resolver.getJCRName(UserConstants.P_GROUPS));
            protectedGroupProps.add(resolver.getJCRName(UserConstants.P_PRINCIPAL_NAME));
            protectedGroupProps.add(resolver.getJCRName(UserConstants.P_REFEREES));
        } else {
            throw new NotExecutableException();
        }
    }
View Full Code Here

    public void testGetRestrictionNames() throws RepositoryException {
        List names = Arrays.asList(createEmptyTemplate(getTestPath()).getRestrictionNames());

        assertEquals(2, names.size());
        NameResolver resolver = (NameResolver) superuser;
        assertTrue(names.contains(resolver.getJCRName(ACLTemplate.P_NODE_PATH)));
        assertTrue(names.contains(resolver.getJCRName(ACLTemplate.P_GLOB)));
    }
View Full Code Here

    }

    public void testGetRestrictionTypes() throws RepositoryException {
        JackrabbitAccessControlList acl = createEmptyTemplate(getTestPath());

        NameResolver resolver = (NameResolver) superuser;
        assertEquals(PropertyType.PATH, acl.getRestrictionType(resolver.getJCRName(ACLTemplate.P_NODE_PATH)));
        assertEquals(PropertyType.STRING, acl.getRestrictionType(resolver.getJCRName(ACLTemplate.P_GLOB)));
    }
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();

        if (superuser instanceof NameResolver) {
            NameResolver resolver = (NameResolver) superuser;
            nodePath = resolver.getJCRName(ACLTemplate.P_NODE_PATH);
            glob = resolver.getJCRName(ACLTemplate.P_GLOB);
        } else {
            throw new NotExecutableException();
        }

        restrictions = new HashMap(2);
View Full Code Here

        membershipCache = new LRUMap();

        // listen to modifications of group-membership
        String[] ntNames = new String[1];
        if (securitySession instanceof SessionImpl) {
            NameResolver resolver = (SessionImpl) securitySession;
            ntNames[0] = resolver.getJCRName(UserManagerImpl.NT_REP_USER);
            pGroupName = resolver.getJCRName(UserManagerImpl.P_GROUPS);
            pPrincipalName = resolver.getJCRName(UserManagerImpl.P_PRINCIPAL_NAME);
        } else {
            ntNames[0] = "rep:User";
            pGroupName = "rep:groups";
            pPrincipalName = "rep:principalName";
        }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.spi.commons.conversion.NameResolver

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.