Package org.apache.jackrabbit.oak.namepath

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


            @Override
            protected Map<String, String> getSessionLocalMappings() {
                return namespaces.getSessionLocalMappings();
            }
        };
        this.namePathMapper = new NamePathMapperImpl(
                nameMapper, delegate.getIdManager());
        this.valueFactory = new ValueFactoryImpl(
                delegate.getRoot(), namePathMapper);
    }
View Full Code Here


        this.commitRateLimiter = commitRateLimiter;
        SessionStats sessionStats = delegate.getSessionStats();
        sessionStats.setAttributes(attributes);

        this.namespaces = new SessionNamespaces(delegate.getRoot());
        this.namePathMapper = new NamePathMapperImpl(
                namespaces, delegate.getIdManager());
        this.valueFactory = new ValueFactoryImpl(
                delegate.getRoot(), namePathMapper);
    }
View Full Code Here

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

        AccessControlManager acMgr =
                getAccessControlManager(new NamePathMapperImpl(remapped));
        for (String path : testPaths) {
            Privilege[] supported = acMgr.getSupportedPrivileges(path);

            assertNotNull(supported);
            assertEquals(allPrivileges.size(), supported.length);
View Full Code Here

            @Nonnull CommitInfo commitInfo);

    @Override
    public void contentChanged(@Nonnull NodeState root, @Nullable CommitInfo info) {
        if (previousRoot != null) {
            NamePathMapper namePathMapper = new NamePathMapperImpl(
                    new GlobalNameMapper(new ImmutableRoot(root)));

            Set<String> oakPropertyNames = Sets.newHashSet();
            for (String name : propertyNames) {
                String oakName = namePathMapper.getOakNameOrNull(name);
                if (oakName == null) {
                    LOG.warn("Ignoring invalid property name: {}", name);
                } else {
                    oakPropertyNames.add(oakName);
                }
            }

            NodeState before = previousRoot;
            NodeState after = root;
            EventHandler handler = new FilteredHandler(
                    new VisibleFilter(),
                    new NodeEventHandler("/", info, namePathMapper, oakPropertyNames));

            String oakPath = namePathMapper.getOakPath(path);
            if (oakPath == null) {
                LOG.warn("Cannot listen for changes on invalid path: {}", path);
                return;
            }
View Full Code Here

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

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

        acMgr = getAccessControlManager(npMapper);
        valueFactory = new ValueFactoryImpl(root, npMapper);

        NodeUtil rootNode = new NodeUtil(root.getTree("/"), npMapper);
View Full Code Here

    private static Query parseQuery(
            String statement, String language, ExecutionContext context,
            Map<String, String> mappings) throws ParseException {
        LOG.debug("Parsing {} statement: {}", language, statement);

        NamePathMapper mapper = new NamePathMapperImpl(
                new LocalNameMapper(context.getRoot(), mappings));

        NodeState types = context.getBaseState()
                .getChildNode(JCR_SYSTEM)
                .getChildNode(JCR_NODE_TYPES);
View Full Code Here

        this.commitRateLimiter = commitRateLimiter;
        SessionStats sessionStats = delegate.getSessionStats();
        sessionStats.setAttributes(attributes);

        this.namespaces = new SessionNamespaces(delegate.getRoot());
        this.namePathMapper = new NamePathMapperImpl(
                namespaces, delegate.getIdManager());
        this.valueFactory = new ValueFactoryImpl(
                delegate.getRoot(), namePathMapper);
    }
View Full Code Here

    @Override
    public void contentChanged(@Nonnull NodeState root, @Nullable CommitInfo info) {
        if (previousRoot != null) {
            try {
                NamePathMapper namePathMapper = new NamePathMapperImpl(
                        new GlobalNameMapper(new ImmutableRoot(root)));

                Set<String> oakPropertyNames = Sets.newHashSet();
                for (String name : propertyNames) {
                    String oakName = namePathMapper.getOakNameOrNull(name);
                    if (oakName == null) {
                        LOG.warn("Ignoring invalid property name: {}", name);
                    } else {
                        oakPropertyNames.add(oakName);
                    }
                }

                NodeState before = previousRoot;
                NodeState after = root;
                EventHandler handler = new FilteredHandler(
                        VISIBLE_FILTER,
                        new NodeEventHandler("/", info, namePathMapper, oakPropertyNames));

                String oakPath = namePathMapper.getOakPath(path);
                if (oakPath == null) {
                    LOG.warn("Cannot listen for changes on invalid path: {}", path);
                    return;
                }
View Full Code Here

                return root;
            }
        };

        this.vf = new ValueFactoryImpl(
                root, new NamePathMapperImpl(new GlobalNameMapper(root)));
    }
View Full Code Here

    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);

        NodeUtil rootNode = new NodeUtil(root.getTree("/"), npMapper);
View Full Code Here

TOP

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

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.