Examples of AbstractExporter


Examples of org.apache.jackrabbit.vault.fs.io.AbstractExporter

            }
        }
        File localFile = app.getPlatformFile(localPath, false);

        AbstractExporter exporter;
        VltContext vCtx;
        if (type.equals("platform")) {
            if (!localFile.exists()) {
                localFile.mkdirs();
            }
            exporter = new PlatformExporter(localFile);
            ((PlatformExporter) exporter).setPruneMissing(cl.hasOption(optPrune));
            vCtx = app.createVaultContext(localFile);
        } else if (type.equals("jar")) {
            exporter = new JarExporter(localFile);
            vCtx = app.createVaultContext(localFile.getParentFile());
        } else {
            throw new Exception("Type " + type + " not supported");
        }

        vCtx.setVerbose(cl.hasOption(OPT_VERBOSE));
        VaultFile vaultFile = vCtx.getFileSystem(addr).getFile(jcrPath);
        if (vaultFile == null) {
            VaultFsApp.log.error("Not such remote file: {}", jcrPath);
            return;
        }

        VaultFsApp.log.info("Exporting {} to {}", vaultFile.getPath(), localFile.getCanonicalPath());
        if (verbose) {
            exporter.setVerbose(new DefaultProgressListener());
        }
        exporter.export(vaultFile);
        VaultFsApp.log.info("Exporting done.");
    }
View Full Code Here

Examples of org.apache.jackrabbit.vault.fs.io.AbstractExporter

        if (localPath == null) {
            localPath = vaultFile.getName();
        }
        File localFile = ctx.getVaultFsApp().getPlatformFile(localPath, false);

        AbstractExporter exporter;
        if (type.equals("platform")) {
            if (!localFile.exists()) {
                localFile.mkdirs();
            }
            exporter = new PlatformExporter(localFile);
            ((PlatformExporter) exporter).setPruneMissing(cl.hasOption(optPrune));
        } else if (type.equals("jar")) {
            exporter = new JarExporter(localFile);
        } else {
            throw new Exception("Type " + type + " not supported");
        }
        if (jcrPath == null || !jcrPath.startsWith("/")) {
            exporter.setRelativePaths(true);
        }
        VaultFsApp.log.info("Exporting {} to {}", vaultFile.getPath(), localFile.getCanonicalPath());
        if (verbose) {
            exporter.setVerbose(new DefaultProgressListener());
        }
        exporter.export(vaultFile);
        VaultFsApp.log.info("Exporting done.");
    }
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.