Examples of VltContext


Examples of org.apache.jackrabbit.vault.vlt.VltContext

    protected void doExecute(VaultFsApp app, CommandLine cl) throws Exception {
        List<String> localPaths = cl.getValues(argLocalPath);
        List<File> localFiles = app.getPlatformFiles(localPaths, false);
        File localDir = app.getPlatformFile("", true);

        VltContext vCtx = app.createVaultContext(localDir);
        vCtx.setQuiet(cl.hasOption(OPT_QUIET));
        PropSet a = new PropSet(localDir,
                localFiles,
                !cl.hasOption(optRecursive),
                (String) cl.getValue(argPropName),
                (String) cl.getValue(argPropValue));
        vCtx.execute(a);
    }
View Full Code Here

Examples of org.apache.jackrabbit.vault.vlt.VltContext

            }
        }
        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;
        }
View Full Code Here

Examples of org.apache.jackrabbit.vault.vlt.VltContext

    @SuppressWarnings("unchecked")
    protected void doExecute(VaultFsApp app, CommandLine cl) throws Exception {
        List<String> localPaths = cl.getValues(argLocalPath);
        List<File> localFiles = app.getPlatformFiles(localPaths, false);
        File localDir = app.getPlatformFile("", true);
        VltContext vCtx = app.createVaultContext(localDir);
        vCtx.setQuiet(cl.hasOption(OPT_QUIET));
        Revert r = new Revert(localDir, localFiles, cl.hasOption(optRecursive));
        vCtx.execute(r);
    }
View Full Code Here

Examples of org.apache.jackrabbit.vault.vlt.VltContext

            throw new ExecutionException("Local file must be a directory: " + localFile.getPath());
        }
        if (!localFile.exists()) {
            localFile.mkdir();
        }
        VltContext vCtx = app.createVaultContext(localFile);
        vCtx.setVerbose(cl.hasOption(OPT_VERBOSE));
        vCtx.setQuiet(cl.hasOption(OPT_QUIET));
        vCtx.setDefaultFilter((String) cl.getValue(optFilter));
        Checkout c = new Checkout(addr, jcrPath, localFile);
        c.setForce(cl.hasOption(optForce));
        vCtx.execute(c);
    }
View Full Code Here

Examples of org.apache.jackrabbit.vault.vlt.VltContext

    @SuppressWarnings("unchecked")
    protected void doExecute(VaultFsApp app, CommandLine cl) throws Exception {
        List<String> localPaths = cl.getValues(argLocalPath);
        List<File> localFiles = app.getPlatformFiles(localPaths, false);
        File localDir = app.getPlatformFile("", true);
        VltContext vCtx = app.createVaultContext(localDir);
        vCtx.setVerbose(cl.hasOption(OPT_VERBOSE));
        vCtx.setQuiet(cl.hasOption(OPT_QUIET));
        Delete d = new Delete(localDir, localFiles, false, cl.hasOption(optForce));
        vCtx.execute(d);
    }
View Full Code Here

Examples of org.apache.jackrabbit.vault.vlt.VltContext

        }
        if (!localFile.exists()) {
            localFile.mkdir();
        }

        VltContext vCtx = ctx.getVaultFsApp().createVaultContext(localFile);
        vCtx.setVerbose(cl.hasOption(OPT_VERBOSE));
        vCtx.setQuiet(cl.hasOption(OPT_QUIET));
        Checkout c = new Checkout(addr, jcrPath, localFile);
        c.setForce(cl.hasOption(optForce));
        vCtx.execute(c);
    }
View Full Code Here

Examples of org.apache.jackrabbit.vault.vlt.VltContext

    protected void doExecute(VaultFsApp app, CommandLine cl) throws Exception {
        List<String> localPaths = cl.getValues(argLocalPath);
        List<File> localFiles = app.getPlatformFiles(localPaths, false);
        File localDir = app.getPlatformFile("", true);

        VltContext vCtx = app.createVaultContext(localDir);
        vCtx.setVerbose(cl.hasOption(OPT_VERBOSE));
        vCtx.setQuiet(cl.hasOption(OPT_QUIET));

        Add a = new Add(localDir, localFiles, cl.hasOption(optNonRecursive), cl.hasOption(optForce));
        vCtx.execute(a);
    }
View Full Code Here

Examples of org.apache.jackrabbit.vault.vlt.VltContext

    protected void doExecute(VaultFsApp app, CommandLine cl) throws Exception {
        List<String> localPaths = cl.getValues(argLocalPath);
        List<File> localFiles = app.getPlatformFiles(localPaths, false);
        File localDir = app.getPlatformFile("", true);

        VltContext vCtx = app.createVaultContext(localDir);
        vCtx.setVerbose(cl.hasOption(OPT_VERBOSE));
        vCtx.setQuiet(cl.hasOption(optOnlyControlled));
        Action a = cl.hasOption(optShowUpdate)
                ? new RemoteStatus(localDir, localFiles, cl.hasOption(optNonRecursive))
                : new Status(localDir, localFiles, cl.hasOption(optNonRecursive));
        vCtx.execute(a);
    }
View Full Code Here

Examples of org.apache.jackrabbit.vault.vlt.VltContext

    protected void doExecute(VaultFsApp app, CommandLine cl) throws Exception {
        List<String> localPaths = cl.getValues(argLocalPath);
        List<File> localFiles = app.getPlatformFiles(localPaths, false);
        File localDir = app.getPlatformFile("", true);

        VltContext vCtx = app.createVaultContext(localDir);
        vCtx.setQuiet(cl.hasOption(OPT_QUIET));
        PropGet a = new PropGet(localDir,
            localFiles,
            !cl.hasOption(optRecursive),
            (String) cl.getValue(argPropName));
        vCtx.execute(a);
    }
View Full Code Here

Examples of org.apache.jackrabbit.vault.vlt.VltContext

            // hack for setting the default credentials
            if (ctxRepository != null) {
                defCredsProvider.setDefaultCredentials(getProperty(KEY_DEFAULT_CREDS));
            }
            File cwd = getPlatformFile("", true).getCanonicalFile();
            return new VltContext(cwd, localFile, repProvider, confCredsProvider);
        } catch (IOException e) {
            throw new ExecutionException(e);
        } catch (ConfigurationException e) {
            throw new ExecutionException(e);
        }
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.