Examples of PathFilterSet


Examples of com.day.jcr.vault.fs.api.PathFilterSet

    @Before
    public void setUp() throws Exception {

        packageOneFilterSets = new ArrayList<PathFilterSet>();
        packageOneFilterSets.add(new PathFilterSet("/a/b/c"));
        packageOneFilterSets.add(new PathFilterSet("/d/e/f"));
        packageOneFilterSets.add(new PathFilterSet("/g/h/i"));

        packageTwoFilterSets = new ArrayList<PathFilterSet>();

        when(packaging.getPackageManager(any(Session.class))).thenReturn(jcrPackageManager);
View Full Code Here

Examples of com.day.jcr.vault.fs.api.PathFilterSet

    @Test
    public void testCreatePackageFromPathFilterSets() throws Exception {
        Map<String, String> properties = new HashMap<String, String>();

        final List<PathFilterSet> pathFilterSets = new ArrayList<PathFilterSet>();
        pathFilterSets.add(new PathFilterSet("/a/b/c"));
        pathFilterSets.add(new PathFilterSet("/d/e/f"));
        pathFilterSets.add(new PathFilterSet("/g/h/i"));

        when(jcrPackageManager.create(packageGroup, packageName, packageOneVersion)).thenReturn(packageOne);

        packageHelper.createPackageFromPathFilterSets(pathFilterSets, session, packageGroup, packageName, packageOneVersion,
                PackageHelper.ConflictResolution.None, properties);
View Full Code Here

Examples of com.day.jcr.vault.fs.api.PathFilterSet


    @Test
    public void testGetPathFilterSetPreviewJSON() throws Exception {
        final List<PathFilterSet> pathFilterSets = new ArrayList<PathFilterSet>();
        pathFilterSets.add(new PathFilterSet("/a/b/c"));
        pathFilterSets.add(new PathFilterSet("/d/e/f"));
        pathFilterSets.add(new PathFilterSet("/g/h/i"));

        final String actual = packageHelper.getPathFilterSetPreviewJSON(pathFilterSets);
        final JSONObject json = new JSONObject(actual);

        assertEquals("preview", json.getString("status"));
View Full Code Here

Examples of com.day.jcr.vault.fs.api.PathFilterSet

            throws IOException, RepositoryException {

        final List<PathFilterSet> pathFilterSets = new ArrayList<PathFilterSet>();

        for (final Resource resource : resources) {
            pathFilterSets.add(new PathFilterSet(resource.getPath()));
        }

        return this.createPackageFromPathFilterSets(pathFilterSets, session, groupName, name, version,
                conflictResolution, packageDefinitionProperties);
    }
View Full Code Here

Examples of com.day.jcr.vault.fs.api.PathFilterSet

     */
    public String getPreviewJSON(final Collection<Resource> resources) throws JSONException {
        final List<PathFilterSet> pathFilterSets = new ArrayList<PathFilterSet>();

        for (Resource resource : resources) {
            pathFilterSets.add(new PathFilterSet(resource.getPath()));
        }

        return this.getPathFilterSetPreviewJSON(pathFilterSets);
    }
View Full Code Here

Examples of com.day.jcr.vault.fs.api.PathFilterSet

                packageResources.addAll(this.getPrincipalResources(resourceResolver, principalNames));
            }

            // Add the ACL Packager Configuration page
            if (properties.get(INCLUDE_CONFIGURATION, DEFAULT_INCLUDE_CONFIGURATION)) {
                final PathFilterSet tmp = this.getACLPackagerPageResource(request);
                if (tmp != null) {
                    packageResources.add(tmp);
                }
            }
View Full Code Here

Examples of com.day.jcr.vault.fs.api.PathFilterSet

                }
            }
        }

        for (final Resource resource : resources) {
            pathFilterSets.add(new PathFilterSet(resource.getPath()));
        }

        log.debug("Found {} matching rep:policy resources.", pathFilterSets.size());
        return pathFilterSets;
    }
View Full Code Here

Examples of com.day.jcr.vault.fs.api.PathFilterSet

        for (final String principalName : principalNames) {
            final Authorizable authorizable = userManager.getAuthorizable(principalName);
            if (authorizable != null) {
                final Resource resource = resourceResolver.getResource(authorizable.getPath());
                if (resource != null) {
                    final PathFilterSet principal = new PathFilterSet(resource.getPath());
                    // Exclude tokens as they are not vlt installable in AEM6/Oak
                    principal.addExclude(new DefaultPathFilter(resource.getPath() + "/\\.tokens"));
                    pathFilterSets.add(principal);
                }
            }
        }
View Full Code Here

Examples of com.day.jcr.vault.fs.api.PathFilterSet

        final ResourceResolver resourceResolver = request.getResourceResolver();
        final PageManager pageManager = resourceResolver.adaptTo(PageManager.class);
        final Page page = pageManager.getContainingPage(request.getResource());

        if (page != null) {
            return new PathFilterSet(page.getPath());
        }

        return null;
    }
View Full Code Here

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

            DefaultWorkspaceFilter filter = new DefaultWorkspaceFilter();
            DefaultMetaInf inf = new DefaultMetaInf();
            ExportOptions opts = new ExportOptions();
            for (String path : paths) {
                filter.add(new PathFilterSet(path));
            }
            inf.setFilter(filter);

            Properties props = new Properties();
            String packageGroup = "sling/replication";
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.