Examples of PathFilterSet


Examples of org.apache.jackrabbit.vault.fs.api.PathFilterSet

        // respective aggregator building sub aggregates
        NodeIterator nIter = node.getNodes();
        while (nIter.hasNext()) {
            Node n = nIter.nextNode();
            String path = n.getPath();
            PathFilterSet coverSet = mgr.getWorkspaceFilter().getCoveringFilterSet(path);
            boolean isAncestor = mgr.getWorkspaceFilter().isAncestor(path);
            boolean isIncluded = mgr.getWorkspaceFilter().contains(path);
            if (coverSet == null && !isAncestor) {
                continue;
            }
            // check if another aggregator can handle this node
            Aggregator a = mgr.getAggregator(n, path);
            // - if the aggregator is null
            // - or the aggregator is the same as ours or the default
            // - and if we include the content as well
            // - then don't use the matched aggregator
            if ((a == null)
                    || ((a == aggregator || a.isDefault())
                        && (aggregator.includes(getNode(), n, path)))) {
                // if workspace does not include this node, ignore it
                if (!isIncluded && !isAncestor) {
                    continue;
                }
                include(n, path);
                prepare(n, true);
            } else {
                // otherwise create sub node and collect items if needed
                // but only if the node is either an ancestor or is included
                // or if the workspace filter set contains relative pattern (ACL export case).
                boolean onlyRelativePatterns = coverSet !=null && coverSet.hasOnlyRelativePatterns();
                if (isAncestor || isIncluded || onlyRelativePatterns) {
                    AggregateImpl sub = new AggregateImpl(this, path, a);
                    sub.filterArtifacts = !isIncluded && onlyRelativePatterns;
                    if (leaves == null) {
                        leaves = new LinkedList<AggregateImpl>();
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.PathFilterSet

        }

        Session session = defNode.getSession();
        String rootPath = defNode.getPath();
        DefaultWorkspaceFilter filter = new DefaultWorkspaceFilter();
        filter.add(new PathFilterSet(rootPath));

        try {
            Node rootNode = session.getNode(rootPath);
            String defPath = defNode.getPath().substring(1);
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.PathFilterSet

                    defNode.getProperty(PN_LAST_UNPACKED_BY).remove();
                }

                String rootPath = defNode.getPath();
                DefaultWorkspaceFilter filter = new DefaultWorkspaceFilter();
                filter.add(new PathFilterSet(rootPath));
                RepositoryAddress addr;
                try {
                    addr = new RepositoryAddress(
                            Text.escapePath("/" + defNode.getSession().getWorkspace().getName() + rootPath));
                } catch (URISyntaxException e) {
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.PathFilterSet

        }
        rcp.setUpdate(cl.hasOption(optUpdate));
        rcp.setOnlyNewer(cl.hasOption(optNewer));
        rcp.setNoOrdering(cl.hasOption(optNoOrdering));
        DefaultWorkspaceFilter srcFilter = new DefaultWorkspaceFilter();
        PathFilterSet excludes = new PathFilterSet("/");
        for (Object e: cl.getValues(optExclude)) {
            excludes.addExclude(new DefaultPathFilter(e.toString()));
        }
        srcFilter.add(excludes);
        rcp.setSourceFilter(srcFilter);
        rcp.copy(src, dst, recursive);
    }
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.PathFilterSet

    }

    @Test
    public void testFullCoverage() throws IOException, RepositoryException, ConfigurationException {
        DefaultWorkspaceFilter filter = new DefaultWorkspaceFilter();
        PathFilterSet set1 = new PathFilterSet(TEST_ROOT + "/content");
        filter.add(set1);
        Collector listener = new Collector();
        filter.dumpCoverage(admin, listener, false);
        checkResults("Full coverage needs to include all paths", ALL_PATHS, listener.paths);
    }
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.PathFilterSet

    }

    @Test
    public void testNoJcrContentCoverage() throws IOException, RepositoryException, ConfigurationException {
        DefaultWorkspaceFilter filter = new DefaultWorkspaceFilter();
        PathFilterSet set1 = new PathFilterSet(TEST_ROOT + "/content");
        filter.add(set1);
        Collector listener = new Collector();
        filter.dumpCoverage(admin, listener, true);
        checkResults("Partial coverage needs to include all pages", ALL_PAGES, listener.paths);
    }
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.PathFilterSet


    @Test
    public void testSplitRootsCoverage() throws IOException, RepositoryException, ConfigurationException {
        DefaultWorkspaceFilter filter = new DefaultWorkspaceFilter();
        PathFilterSet set1 = new PathFilterSet(TEST_ROOT + "/content/en");
        PathFilterSet set2 = new PathFilterSet(TEST_ROOT + "/content/fr");
        filter.add(set1);
        filter.add(set2);
        Collector listener = new Collector();
        filter.dumpCoverage(admin, listener, true);
        checkResults("Split roots", LANGUAGE_PAGES, listener.paths);
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.PathFilterSet

                        strict);
            } else {
                inf = new DefaultMetaInf();
                inf.setSettings(VaultSettings.createDefault());
                DefaultWorkspaceFilter filter = new DefaultWorkspaceFilter();
                PathFilterSet filterSet = new PathFilterSet(rootPath);
                filter.add(filterSet);
                inf.setFilter(filter);

                // if archive is rooted, create intermediate entries
                if (chRoot != null && chRoot.length() > 0) {
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.api.PathFilterSet

                    config = exportRoot.getMetaInf().getConfig();
                }
                if (filter == null && defaultFilterRoots.length > 0) {
                    filter = new DefaultWorkspaceFilter();
                    for (String root: defaultFilterRoots) {
                        filter.add(new PathFilterSet(root));
                    }
                    stdout.printf("Created default filter:%n%s", filter.getSourceAsString());
                }
                if (filter == null && defaultFilter != null) {
                    filter = new DefaultWorkspaceFilter();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.