Package org.apache.chemistry.opencmis.commons.data

Examples of org.apache.chemistry.opencmis.commons.data.RepositoryInfo


     * getRepositoryInfo.
     */
    public static void getRepositoryInfo(CallContext context, CmisService service, String repositoryId,
            HttpServletRequest request, HttpServletResponse response) throws Exception {
        // execute
        RepositoryInfo ri = service.getRepositoryInfo(repositoryId, null);
        String repositoryUrl = BrowserBindingUtils.compileRepositoryUrl(request, ri.getId()).toString();
        String rootUrl = BrowserBindingUtils.compileRootUrl(request, ri.getId()).toString();

        JSONObject jsonRi = JSONConverter.convert(ri, repositoryUrl, rootUrl);

        response.setStatus(HttpServletResponse.SC_OK);
        BrowserBindingUtils.writeJSON(jsonRi, request, response);
View Full Code Here


        assertFalse(repositories.isEmpty());

        log.info("geRepositoryInfo(), found " + repositories.size() + " repository/repositories).");

        for (RepositoryInfo repository : repositories) {
            RepositoryInfo repository2 = fRepSvc.getRepositoryInfo(repository.getId(), null);
            assertNotNull(repository2);
            assertEquals(repository.getId(), repository2.getId());
            log.info("found repository" + repository2.getId());
        }

        log.info("... testRepositoryInfo() finished.");
    }
View Full Code Here

        // get types
        int depth = -1;
        String wrongTypeId = "UnknownType";

        try {
            RepositoryInfo repInf = fRepSvc.getRepositoryInfo(wrongRepositoryId, null);
            log.debug("getRepositoryInfo(): " + repInf);
            fail("getRepositoryInfo() with illegal repository id should throw InvalidArgumentException.");
        } catch (CmisInvalidArgumentException e) {
            log.info("getRepositoryInfo() with depth==0 raised expected exception: " + e);
        }
View Full Code Here

        log.info("... testInheritedProperties() finished.");
    }

    private String getRepositoryId() {
        List<RepositoryInfo> repositories = fRepSvc.getRepositoryInfos(null);
        RepositoryInfo repository = repositories.get(0);
        assertNotNull(repository);
        return repository.getId();
    }
View Full Code Here

        if (this.fixture.getParamter().containsKey(Fixture.TEST_ROOT_FOLDER_ID)) {
            // test root folder
            this.rootFolderId = this.fixture.getParamter().get(Fixture.TEST_ROOT_FOLDER_ID);
            Assert.assertNotNull(this.rootFolderId);
        } else {
            RepositoryInfo rid = this.binding.getRepositoryService().getRepositoryInfo(this.repositoryId, null);
            Assert.assertNotNull(rid);
            this.rootFolderId = rid.getRootFolderId();
            Assert.assertNotNull(this.rootFolderId);
        }

        // object types
        String documentTypeId = FixtureData.DOCUMENT_TYPE_ID.value();
View Full Code Here

        assertNotNull(fRepSvc);
        assertNotNull(fObjSvc);
        assertNotNull(fNavSvc);

        RepositoryInfo rep = fRepSvc.getRepositoryInfo(REPOSITORY_ID, null);
        fRootFolderId = rep.getRootFolderId();
        fRepositoryId = rep.getId();

        assertNotNull(fRepositoryId);
        assertNotNull(fRootFolderId);
    }
View Full Code Here

    }

    private static String getRootFolderId(CmisBinding binding, String repositoryId, String rootFolderId) {
        RepositoryService repSvc = binding.getRepositoryService();

        RepositoryInfo rep = repSvc.getRepositoryInfo(repositoryId, null);
        if (null == rootFolderId || rootFolderId.length() == 0) {
            rootFolderId = rep.getRootFolderId();
        }

        return rootFolderId;
    }
View Full Code Here

          // from everywhere
          DummyCallContext ctx = new DummyCallContext();
          svc.setCallContext(ctx);

          // Build the tree
          RepositoryInfo rep = svc.getRepositoryInfo(repositoryId, null);
          String rootFolderId = rep.getRootFolderId();

          try {
              gen.createFolderHierachy(levels, childrenPerLevel, rootFolderId);
              // Dump the tree
              gen.dumpFolder(rootFolderId, "*");
 
View Full Code Here

        LOG.debug("Initializing done. ");              
    }
   
    private void getRepositoryInfo() {
        LOG.debug("getting repository info for repository " + repositoryId);
        RepositoryInfo repoInfo = repSvc.getRepositoryInfo(repositoryId, null);
        LOG.debug("root folder id is: " + repoInfo.getId());
        rootFolderId =  repoInfo.getRootFolderId();       
        renameFiles("getRepositoryInfo");
        requestCounter++;
        LOG.debug("getRepositoryInfo() done.");
    }
View Full Code Here

    }

    public abstract void run(Session session) throws Exception;

    protected RepositoryInfo getRepositoryInfo(Session session) {
        RepositoryInfo ri = session.getRepositoryInfo();

        CmisTestResult failure = createResult(FAILURE, "Repository info is null!", true);
        addResult(assertNotNull(ri, null, failure));

        return ri;
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.commons.data.RepositoryInfo

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.