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

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


            Repository jcrRepo = RepositoryUtils.getRepository(repo.getRepositoryInfo());
            Credentials credentials = RepositoryUtils.getCredentials(repo.getRepositoryInfo());
           
            session = jcrRepo.login(credentials);

            RepositoryAddress address = RepositoryUtils.getRepositoryAddress(repo.getRepositoryInfo());

            fs = fsLocator.getFileSystem(address, contentSyncRoot, session);
       
        } catch (org.apache.sling.ide.transport.RepositoryException e) {
            throw new SerializationException(e);
View Full Code Here


    private static final String[] WEBDAV_URL_LOCATIONS = new String[] { "server/-/jcr:root", "crx/-/jcr:root" };
    private static final RepositoryFactory FACTORY = new DAVExRepositoryFactory();
    private static final Map<RepositoryAddress, Repository> REGISTERED_REPOSITORIES = new HashMap<RepositoryAddress, Repository>();
   
    public static Repository getRepository(RepositoryInfo repositoryInfo) throws RepositoryException {
        final RepositoryAddress repositoryAddress = getRepositoryAddress(repositoryInfo);
        synchronized (SYNC) {
            // will be populated implicitly by call to getRepositoryAddress
            return REGISTERED_REPOSITORIES.get(repositoryAddress);
        }
    }
View Full Code Here

        for (String webDavUrlLocation : WEBDAV_URL_LOCATIONS) {

            Session session = null;
            String url = repositoryInfo.getUrl() + webDavUrlLocation;
            try {
                RepositoryAddress address = new RepositoryAddress(url);
                Repository repository;
                synchronized (SYNC) {
                    repository = REGISTERED_REPOSITORIES.get(address);

                    if (repository == null) {
                        Set<String> supportedSchemes = FACTORY.getSupportedSchemes();
                        if (!supportedSchemes.contains(address.getURI().getScheme())) {
                            throw new IllegalArgumentException("Unable to create a a repository for "
                                    + address.getURI()
                                    + ", since the scheme is unsupported. Only schemes '" + supportedSchemes
                                    + "' are supported");
                        }

                        // SLING-3739: ensure that a well-known ClassLoader is used
View Full Code Here

    static final String EXTENSION_XML = ".xml";

    private VltSerializationDataBuilder builder;

    public static void main(String[] args) throws RepositoryException, URISyntaxException, IOException {
        RepositoryAddress address = new RepositoryAddress("http://localhost:8080/server/root");
        Repository repo = new RepositoryProvider().getRepository(address);
        Session session = repo.login(new SimpleCredentials("admin", "admin".toCharArray()));

        VaultFileSystem fs = Mounter.mount(null, null, address, "/", session);
View Full Code Here

        VltEntry e = file.getEntry();
        out.printf("  Path: %s%n", dir.getContext().getCwdRelativePath(file.getPath()));
        out.printf("Status: %s%n", file.getStatus().name().toLowerCase());
        if (e != null) {
            RepositoryAddress root = dir.getContext().getMountpoint();
            RepositoryAddress addr = root.resolve(e.getAggregatePath());
            addr = addr.resolve(e.getRepoRelPath());
            out.printf("   URL: %s%n", addr.toString());
            print(out, "  Work", e.work());
            print(out, "  Base", e.base());
            print(out, "  Mine", e.mine());
            print(out, "Theirs", e.theirs());
        }
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

            // --------------------------------------------------------------------------------------------< create >---
            if ("create".equals(cmd)) {
                String src = data.optString(PARAM_SRC, "");
                String dst = data.optString(PARAM_DST, "");
                String id = data.optString(PARAM_ID, null);
                RepositoryAddress address = new RepositoryAddress(src);
                task = taskMgr.addTask(address, dst, id);

                // add additional data
                if (data.has(PARAM_BATCHSIZE)) {
                    task.getRcp().setBatchSize((int) data.getLong(PARAM_BATCHSIZE));
View Full Code Here

                }

                String rootPath = defNode.getPath();
                DefaultWorkspaceFilter filter = new DefaultWorkspaceFilter();
                filter.add(new PathFilterSet(rootPath));
                RepositoryAddress addr;
                try {
                    addr = new RepositoryAddress(
                            Text.escapePath("/" + defNode.getSession().getWorkspace().getName() + rootPath));
                } catch (URISyntaxException e) {
                    throw new IllegalArgumentException(e);
                }
                VaultFileSystem jcrfs = Mounter.mount(null, filter, addr, "/definition", defNode.getSession());
View Full Code Here

        if (excludeList != null && excludeList.size() > 0) {
            excludes = (String[]) excludeList.toArray(new String[excludeList.size()]);
        }
        */
        String root = (String) cl.getValue(argMountpoint);
        RepositoryAddress addr = new RepositoryAddress(root);

        if (jcrPath == null) {
            jcrPath = "/";
        }
        File localFile = app.getPlatformFile(localPath, false);
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.