Package org.apache.jackrabbit.oak.namepath

Examples of org.apache.jackrabbit.oak.namepath.NameMapper


    @Before
    public void before() throws Exception {
        super.before();

        registerNamespace(TEST_PREFIX, TEST_URI);
        NameMapper nameMapper = new GlobalNameMapper(root);
        npMapper = new NamePathMapperImpl(nameMapper);

        acMgr = getAccessControlManager(npMapper);
        valueFactory = new ValueFactoryImpl(root, npMapper);
View Full Code Here


        List<String> testPaths = new ArrayList<String>();
        testPaths.add('/' + TEST_LOCAL_PREFIX + ":testRoot");
        testPaths.add("/{" + TEST_URI + "}testRoot");

        NameMapper remapped = new LocalNameMapper(
                root, singletonMap(TEST_LOCAL_PREFIX, TEST_URI));

        AccessControlManager acMgr =
                getAccessControlManager(new NamePathMapperImpl(remapped));
        for (String path : testPaths) {
View Full Code Here

        List<String> testPaths = new ArrayList<String>();
        testPaths.add('/' + TEST_LOCAL_PREFIX + ":testRoot");
        testPaths.add("/{" + TEST_URI + "}testRoot");

        NameMapper remapped = new LocalNameMapper(
                root, singletonMap(TEST_LOCAL_PREFIX, TEST_URI));

        AccessControlManager acMgr =
                getAccessControlManager(new NamePathMapperImpl(remapped));
        for (String path : testPaths) {
View Full Code Here

        return aggr.toArray(new Privilege[aggr.size()]);
    }

    @Test
    public void testGetPath() {
        NameMapper nameMapper = new GlobalNameMapper(
                Collections.singletonMap("jr", "http://jackrabbit.apache.org"));
        NamePathMapper npMapper = new NamePathMapperImpl(nameMapper);

        // map of jcr-path to standard jcr-path
        Map<String, String> paths = new HashMap<String, String>();
View Full Code Here

    private AccessControlManagerImpl getTestAccessControlManager() throws Exception {
        return new AccessControlManagerImpl(getTestRoot(), getNamePathMapper(), getSecurityProvider());
    }

    private NamePathMapper getLocalNamePathMapper() {
        NameMapper remapped = new TestNameMapper(nameMapper, TestNameMapper.LOCAL_MAPPING);
        return new NamePathMapperImpl(remapped);
    }
View Full Code Here

        return aggr.toArray(new Privilege[aggr.size()]);
    }

    @Test
    public void testGetPath() {
        NameMapper nameMapper = new GlobalNameMapper() {
            @Override
            protected Map<String, String> getNamespaceMap() {
                return Collections.singletonMap("jr", "http://jackrabbit.apache.org");
            }
        };
View Full Code Here

        this.root = contentSession.getLatestRoot();
        // FIXME: do not pass partially initialized 'this'
        this.workspace = new WorkspaceImpl(this);

        Map<String, String> namespaces = Maps.newHashMap();
        NameMapper mapper = new LocalNameMapper(namespaces) {
            @Override
            protected Map<String, String> getNamespaceMap() {
                return Namespaces.getNamespaceMap(root.getTree("/"));
            }
        };
View Full Code Here

        return aggr.toArray(new Privilege[aggr.size()]);
    }

    @Test
    public void testGetPath() {
        NameMapper nameMapper = new GlobalNameMapper() {
            @Override
            protected Map<String, String> getNamespaceMap() {
                return Collections.singletonMap("jr", "http://jackrabbit.apache.org");
            }
        };
View Full Code Here

    private AccessControlManagerImpl getAccessControlManager(NamePathMapper npMapper) {
        return new AccessControlManagerImpl(root, npMapper, getSecurityProvider());
    }

    private NamePathMapper getLocalNamePathMapper() {
        NameMapper remapped = new TestNameMapper(nameMapper, TestNameMapper.LOCAL_MAPPING);
        return new NamePathMapperImpl(remapped);
    }
View Full Code Here

        return aggr.toArray(new Privilege[aggr.size()]);
    }

    @Test
    public void testGetPath() {
        NameMapper nameMapper = new GlobalNameMapper() {
            @Override
            protected Map<String, String> getNamespaceMap() {
                return Collections.singletonMap("jr", "http://jackrabbit.apache.org");
            }
        };
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.namepath.NameMapper

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.