Examples of RepositoryInfo


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

        return (result.getStatus().getLevel() <= OK.getLevel() ? null : result);
    }

    protected boolean supportsQuery(Session session) {
        RepositoryInfo repository = session.getRepositoryInfo();

        if (repository.getCapabilities().getQueryCapability() == null) {
            return false;
        }

        return repository.getCapabilities().getQueryCapability() != CapabilityQuery.NONE;
    }
View Full Code Here

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

            addResult(createResult(SKIPPED, "Content Changes not supported. Test Skipped!"));
        }
    }

    protected boolean supportsContentChanges(Session session) {
        RepositoryInfo repository = session.getRepositoryInfo();

        if (repository.getCapabilities().getChangesCapability() == null) {
            return false;
        }

        return repository.getCapabilities().getChangesCapability() != CapabilityChanges.NONE;
    }
View Full Code Here

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

        CapabilityAcl aclCap = getAclCapability(session);
        return (aclCap != null) && (aclCap != CapabilityAcl.NONE);
    }

    protected CapabilityAcl getAclCapability(Session session) {
        RepositoryInfo repository = session.getRepositoryInfo();

        if (repository.getCapabilities().getAclCapability() == null) {
            return null;
        }

        return repository.getCapabilities().getAclCapability();
    }
View Full Code Here

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

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

        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

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

        // 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

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

        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

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

        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

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

        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

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

    }

    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
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.