Package org.apache.jackrabbit.vault.fs.api

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


*/
public class CmdRcp extends AbstractVaultCommand {

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


            StringBuffer uri = new StringBuffer(getProperty(KEY_DEFAULT_URI));
            uri.append("/").append(session.getWorkspace().getName());
            if (root != null && !"/".equals(root)) {
                uri.append(root);
            }
            RepositoryAddress mp =
                    new RepositoryAddress(uri.toString());
            log.info("Mounting JcrFs on {}", mp.toString());

            ExportRoot exportRoot = ExportRoot.findRoot(getPlatformFile("", true));
            MetaInf inf = exportRoot == null ? null : exportRoot.getMetaInf();

            // get config
View Full Code Here

        if (rep != null) {
            throw new ExecutionException("Already connected to " + getProperty(KEY_URI));
        } else {
            String uri = getProperty(KEY_DEFAULT_URI);
            try {
                rep = repProvider.getRepository(new RepositoryAddress(uri));
                setProperty(KEY_URI, uri);
                StringBuffer info = new StringBuffer();
                info.append(rep.getDescriptor(Repository.REP_NAME_DESC)).append(' ');
                info.append(rep.getDescriptor(Repository.REP_VERSION_DESC));
                log.info("Connected to {} ({})", uri, info.toString());
View Full Code Here

            cwd = new File(".").getCanonicalFile();
        } catch (IOException e) {
            throw new ExecutionException(e);
        }
        ExportRoot exportRoot = ExportRoot.findRoot(cwd);
        RepositoryAddress mountpoint = null;
        if (exportRoot != null) {
            try {
                File dir = new File(exportRoot.getJcrRoot(), VltDirectory.META_DIR_NAME);
                MetaDirectory rootMeta = VltContext.createMetaDirectory(dir);
                String addr = rootMeta.getRepositoryUrl();
                if (addr != null) {
                    mountpoint = new RepositoryAddress(addr);
                }
            } catch (Exception e) {
                // ignore
            }
        }
        if (mountpoint == null) {
            setProperty(KEY_DEFAULT_URI, DEFAULT_URI);
        } else {
            setProperty(KEY_DEFAULT_URI, mountpoint.getSpecificURI().toString());
            setProperty(KEY_DEFAULT_WORKSPACE, mountpoint.getWorkspace());
            setProperty(KEY_DEFAULT_MOUNTPOINT, mountpoint.getPath());
        }
        setProperty(KEY_PROMPT, "$ ");

        // add platform context
        console = new VaultFsConsole(this);
View Full Code Here

            try {
                String addr = rootMeta.getRepositoryUrl();
                if (addr == null) {
                    throw new VltException("Root directory must provide a repository url file.");
                }
                mountpoint = new RepositoryAddress(addr);
            } catch (IOException e) {
                throw new VltException("error while reading repository address.", e);
            } catch (URISyntaxException e) {
                throw new VltException("Illegal repository address.", e);
            }
View Full Code Here

     * @throws VltException if an error occurs
     */
    public void setFsRoot(VltDirectory dir) throws VltException {
        String aPath = dir.getAggregatePath();
        if (aPath != null) {
            RepositoryAddress adr = getMountpoint().resolve(aPath);
            setFsRoot(aPath);
            setMountpoint(adr);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.vault.fs.api.RepositoryAddress

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.