Package org.apache.jackrabbit.vault.util

Examples of org.apache.jackrabbit.vault.util.RepositoryCopier


    protected void doExecute(VaultFsApp app, CommandLine cl) throws Exception {
        boolean quiet = cl.hasOption(OPT_QUIET);
        RepositoryAddress src = new RepositoryAddress((String) cl.getValue(srcAddr));
        RepositoryAddress dst = new RepositoryAddress((String) cl.getValue(dstAddr));
        boolean recursive = cl.hasOption(optRecursive);
        RepositoryCopier rcp = new RepositoryCopier();
        if (!quiet) {
            rcp.setTracker(new DefaultProgressListener());
        }
        if (cl.hasOption(optSize)) {
            rcp.setBatchSize(Integer.parseInt(cl.getValue(optSize).toString()));
        }
        if (cl.hasOption(optThrottle)) {
            rcp.setThrottle(Integer.parseInt(cl.getValue(optThrottle).toString()));
        }
        if (cl.hasOption(optResumeFrom)) {
            rcp.setResumeFrom(cl.getValue(optResumeFrom).toString());
        }
        rcp.setUpdate(cl.hasOption(optUpdate));
        rcp.setOnlyNewer(cl.hasOption(optNewer));
        rcp.setNoOrdering(cl.hasOption(optNoOrdering));
        rcp.setCredentialsProvider(app.getCredentialsStore());
        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


    protected void doExecute(VaultFsApp app, CommandLine cl) throws Exception {
        boolean quiet = cl.hasOption(OPT_QUIET);
        RepositoryAddress src = new RepositoryAddress((String) cl.getValue(srcAddr));
        RepositoryAddress dst = new RepositoryAddress((String) cl.getValue(dstAddr));
        boolean recursive = cl.hasOption(optRecursive);
        RepositoryCopier rcp = new RepositoryCopier();
        if (!quiet) {
            rcp.setTracker(new DefaultProgressListener());
        }
        if (cl.hasOption(optSize)) {
            rcp.setBatchSize(Integer.parseInt(cl.getValue(optSize).toString()));
        }
        if (cl.hasOption(optThrottle)) {
            rcp.setThrottle(Integer.parseInt(cl.getValue(optThrottle).toString()));
        }
        if (cl.hasOption(optResumeFrom)) {
            rcp.setResumeFrom(cl.getValue(optResumeFrom).toString());
        }
        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

TOP

Related Classes of org.apache.jackrabbit.vault.util.RepositoryCopier

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.