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.setVerbose(cl.hasOption(OPT_VERBOSE));
        vCtx.setQuiet(cl.hasOption(OPT_QUIET));
        Update u = new Update(localDir, localFiles, cl.hasOption(optNonRecursive));
        u.setForce(cl.hasOption(optForce));
        vCtx.execute(u);
    }
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));

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

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

        if (jcrPath == null) {
            jcrPath = "/";
        }
        File localFile = app.getPlatformFile(localPath, false);

        VltContext vCtx = app.createVaultContext(localFile);
        vCtx.setVerbose(cl.hasOption(OPT_VERBOSE));


        if (cl.hasOption(optSysView)) {
            if (!localFile.isFile()) {
                VaultFsApp.log.error("--sysview specified but local path does not point to a file.");
                return;
            }
            // todo: move to another location
            InputStream ins = FileUtils.openInputStream(localFile);
            try {
                Session session = vCtx.getFileSystem(addr).getAggregateManager().getSession();
                session.getWorkspace().importXML(jcrPath, ins, ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING);
                return;
            } finally {
                IOUtils.closeQuietly(ins);
            }
        }


        VaultFile vaultFile = vCtx.getFileSystem(addr).getFile(jcrPath);

        VaultFsApp.log.info("Importing {} to {}", localFile.getCanonicalPath(), vaultFile.getPath());
        Archive archive;
        if (localFile.isFile()) {
            archive = new ZipArchive(localFile);
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));
        Diff a = new Diff(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.setVerbose(cl.hasOption(OPT_VERBOSE));
        vCtx.setQuiet(cl.hasOption(OPT_QUIET));
        Commit s = new Commit(localDir,
                localFiles,
                cl.hasOption(optNonRecursive),
                cl.hasOption(optForce));
        vCtx.execute(s);
    }
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));
        Info u = new Info(localDir, localFiles, !cl.hasOption(optRecursive));
        vCtx.execute(u);
    }
View Full Code Here

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

        File localDir = app.getPlatformFile("", true);
        List<String> commands = cl.getValues(argCommand);
        for (String cmd: commands) {
            if (cmd.equals("binary")) {
                Debug dbg = new Debug(localDir);
                VltContext vCtx = app.createVaultContext(localDir);
                vCtx.setVerbose(cl.hasOption(OPT_VERBOSE));
                vCtx.setQuiet(cl.hasOption(OPT_QUIET));
                vCtx.execute(dbg);
            }
        }
    }
View Full Code Here

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

            // hack for setting the default credentials
            if (ctxRepository != null) {
                confCredsProvider.setDefaultCredentials(getProperty(KEY_DEFAULT_CREDS));
            }
            File cwd = getPlatformFile("", true).getCanonicalFile();
            return new VltContext(cwd, localFile, repProvider, credentialsStore);
        } catch (IOException e) {
            throw new ExecutionException(e);
        } catch (ConfigurationException e) {
            throw new ExecutionException(e);
        }
View Full Code Here

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

                ? null
                : new RepositoryAddress(root);

        String localPath = (String) cl.getValue(argLocalPath);
        File localFile = app.getPlatformFile(localPath == null ? "." : localPath, false).getCanonicalFile();
        VltContext vCtx = app.createVaultContext(localFile);
        vCtx.setVerbose(cl.hasOption(OPT_VERBOSE));
        vCtx.setQuiet(cl.hasOption(OPT_QUIET));
        Sync sc = new Sync(cmd, addr, localFile);
        sc.setForce(cl.hasOption(optForce));
        vCtx.execute(sc);
    }
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));
        PropList a = new PropList(localDir,
                localFiles,
                !cl.hasOption(optRecursive));
        vCtx.execute(a);
    }
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.