Package org.apache.chemistry.opencmis.jcr

Examples of org.apache.chemistry.opencmis.jcr.JcrRepository


    @Override
    public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension) {
        ArrayList<RepositoryInfo> info = new ArrayList<RepositoryInfo>();
        Set<String> IDs = jcrRepositories.keySet();
        for (String Id : IDs) {
            JcrRepository repo = jcrRepositories.get(Id);
            info.addAll(repo.getRepositoryInfos(login(Id)));
        }
        return info;
    }
View Full Code Here


        return session;
    }

    private JcrRepository jcrRepository(String repositoryId) {
        String name = name(repositoryId);
        JcrRepository repo = jcrRepositories.get(name);
        if (repo == null) {
            throw new CmisInvalidArgumentException("Repository lookup failed for \"" + repositoryId + "\" (using name \"" + name + "\")");
        }
        return repo;
    }
View Full Code Here

        for (String repositoryId : names) {
            // Map params = jcrConfig.get(repositoryId);
            // Repository repository = acquireJcrRepository(params);
            try {
                Repository repository = RepositoryManager.getRepository(repositoryId);
                list.put(repositoryId, new JcrRepository(repository, pathManger, typeManager, typeHandlerManager));
                log.debug("--- loaded repository " + repositoryId);
            } catch (NoSuchRepositoryException e) {
                // should never happen;
                e.printStackTrace();
            }
View Full Code Here

     * should return "bar".
     */
    @Test
    public void testWorkspace() {
        String[] names = {"foo", "", "baz", "a"};
        JcrRepository mockRepo = mock(JcrRepository.class);
        Map<String, JcrRepository> jrs = new HashMap<String, JcrRepository>();
        for (String name : names) {
            jrs.put(name, mockRepo);
        }

View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.jcr.JcrRepository

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.