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

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


            addCheckBox("Changes incomplete:").setSelected(is(repInfo.getChangesIncomplete()));
            addLine("Changes on type:").setText(
                    repInfo.getChangesOnType() == null ? "" : repInfo.getChangesOnType().toString());

            if (repInfo.getCapabilities() != null) {
                RepositoryCapabilities cap = repInfo.getCapabilities();

                addLine("Capabilities", true).setText("");

                addCheckBox("Get descendants supported:").setSelected(is(cap.isGetDescendantsSupported()));
                addCheckBox("Get folder tree supported:").setSelected(is(cap.isGetFolderTreeSupported()));
                addCheckBox("Unfiling supported:").setSelected(is(cap.isUnfilingSupported()));
                addCheckBox("Multifiling supported:").setSelected(is(cap.isMultifilingSupported()));
                addCheckBox("Version specific filing supported:").setSelected(
                        is(cap.isVersionSpecificFilingSupported()));
                addLine("Query:").setText(str(cap.getQueryCapability()));
                addLine("Joins:").setText(str(cap.getJoinCapability()));
                addCheckBox("All versions searchable:").setSelected(is(cap.isAllVersionsSearchableSupported()));
                addCheckBox("PWC searchable:").setSelected(is(cap.isPwcSearchableSupported()));
                addCheckBox("PWC updatable:").setSelected(is(cap.isPwcUpdatableSupported()));
                addLine("Content stream updates:").setText(str(cap.getContentStreamUpdatesCapability()));
                addLine("Renditions:").setText(str(cap.getRenditionsCapability()));
                addLine("Changes:").setText(str(cap.getChangesCapability()));
                addLine("ACLs:").setText(str(cap.getAclCapability()));
            }

            if (repInfo.getAclCapabilities() != null) {
                AclCapabilities cap = repInfo.getAclCapabilities();

                addLine("ACL Capabilities", true).setText("");

                addLine("Supported permissions:").setText(str(cap.getSupportedPermissions()));
                addLine("ACL propagation:").setText(str(cap.getAclPropagation()));

                if (cap.getPermissions() != null) {
                    String[][] data = new String[cap.getPermissions().size()][2];

                    int i = 0;
                    for (PermissionDefinition pd : cap.getPermissions()) {
                        data[i][0] = pd.getId();
                        data[i][1] = pd.getDescription();
                        i++;
                    }

                    JTable permTable = new JTable(data, new String[] { "Permission", "Description" });
                    permTable.setFillsViewportHeight(true);
                    addComponent("Permissions", new JScrollPane(permTable));
                }

                if (cap.getPermissionMapping() != null) {
                    String[][] data = new String[cap.getPermissionMapping().size()][2];

                    int i = 0;
                    for (PermissionMapping pm : cap.getPermissionMapping().values()) {
                        data[i][0] = pm.getKey();
                        data[i][1] = (pm.getPermissions() == null ? "" : pm.getPermissions().toString());
                        i++;
                    }
View Full Code Here


        }
    }

    public synchronized boolean supportsQuery() {
        try {
            RepositoryCapabilities cap = getRepositoryInfo().getCapabilities();
            if (cap == null) {
                return true;
            }

            return (cap.getQueryCapability() != null) && (cap.getQueryCapability() != CapabilityQuery.NONE);
        } catch (Exception e) {
            return false;
        }
    }
View Full Code Here

        }
    }

    public synchronized boolean supportsChangeLog() {
        try {
            RepositoryCapabilities cap = getRepositoryInfo().getCapabilities();
            if (cap == null) {
                return true;
            }

            return (cap.getChangesCapability() != null) && (cap.getChangesCapability() != CapabilityChanges.NONE);
        } catch (Exception e) {
            return false;
        }
    }
View Full Code Here

        // capabilities
        if (ri.getCapabilities() == null) {
            addResult(createResult(FAILURE, "Capabilities are not set!"));
        } else {
            RepositoryCapabilities cap = ri.getCapabilities();

            // ACL capability
            success = createResult(OK, "ACL capability: " + cap.getAclCapability());
            failure = createResult(FAILURE, "ACL capability is not set!");
            addResult(assertNotNull(cap.getAclCapability(), success, failure));

            // changes capability
            success = createResult(OK, "Changes capability: " + cap.getChangesCapability());
            failure = createResult(WARNING, "Changes capability is not set!");
            addResult(assertNotNull(cap.getChangesCapability(), success, failure));

            // content stream updates capability
            success = createResult(OK, "Content stream updates capability: " + cap.getContentStreamUpdatesCapability());
            failure = createResult(FAILURE, "Content stream updates is not set!");
            addResult(assertNotNull(cap.getContentStreamUpdatesCapability(), success, failure));

            // get descendants capability
            success = createResult(OK, "Get descendants capability: " + cap.isGetDescendantsSupported());
            failure = createResult(FAILURE, "Get descendants capability is not set!");
            addResult(assertNotNull(cap.isGetDescendantsSupported(), success, failure));

            // get folder tree capability
            success = createResult(OK, "Get folder tree capability: " + cap.isGetFolderTreeSupported());
            failure = createResult(FAILURE, "Get folder tree capability is not set!");
            addResult(assertNotNull(cap.isGetFolderTreeSupported(), success, failure));

            // multifiling capability
            success = createResult(OK, "Multifiling capability: " + cap.isMultifilingSupported());
            failure = createResult(FAILURE, "Multifiling capability is not set!");
            addResult(assertNotNull(cap.isMultifilingSupported(), success, failure));

            // unfiling capability
            success = createResult(OK, "Unfiling capability: " + cap.isUnfilingSupported());
            failure = createResult(FAILURE, "Unfiling capability is not set!");
            addResult(assertNotNull(cap.isUnfilingSupported(), success, failure));

            // version specific filing capability
            success = createResult(OK, "Version specific filing capability: " + cap.isVersionSpecificFilingSupported());
            failure = createResult(FAILURE, "Version specific filing capability is not set!");
            addResult(assertNotNull(cap.isVersionSpecificFilingSupported(), success, failure));

            // query capability
            success = createResult(OK, "Query capability: " + cap.getQueryCapability());
            failure = createResult(FAILURE, "Query capability is not set!");
            addResult(assertNotNull(cap.getQueryCapability(), success, failure));

            // JOIN capability
            success = createResult(OK, "JOIN capability: " + cap.getJoinCapability());
            failure = createResult(FAILURE, "JOIN capability is not set!");
            addResult(assertNotNull(cap.getJoinCapability(), success, failure));

            // all versions searchable capability
            success = createResult(OK, "All versions searchable capability: " + cap.isAllVersionsSearchableSupported());
            failure = createResult(FAILURE, "All versions searchable capability is not set!");
            addResult(assertNotNull(cap.isAllVersionsSearchableSupported(), success, failure));

            // PWC searchable capability
            success = createResult(OK, "PWC searchable capability: " + cap.isPwcSearchableSupported());
            failure = createResult(FAILURE, "PWC searchable capability is not set!");
            addResult(assertNotNull(cap.isPwcSearchableSupported(), success, failure));

            // PWC updatable capability
            success = createResult(OK, "PWC updatable capability: " + cap.isPwcUpdatableSupported());
            failure = createResult(FAILURE, "PWC updatable capability is not set!");
            addResult(assertNotNull(cap.isPwcUpdatableSupported(), success, failure));

            // renditions capability
            success = createResult(OK, "Renditions capability: " + cap.getRenditionsCapability());
            failure = createResult(FAILURE, "Renditions capability is not set!");
            addResult(assertNotNull(cap.getRenditionsCapability(), success, failure));
        }

        // ACL capabilities
        if (ri.getAclCapabilities() == null) {
            addResult(createResult(WARNING, "ACL capabilities are not set!"));
View Full Code Here

    @Before
    public void setup() throws Exception {
        RepositoryInfo r = this.session.getRepositoryInfo();
        // capabilities
        RepositoryCapabilities repcap = r.getCapabilities();
        CapabilityAcl capacl = repcap.getAclCapability();

        if (capacl != CapabilityAcl.NONE) {
            // acl capabilities
            this.aclCapabilities = r.getAclCapabilities();
        }
View Full Code Here

    public void repositoryCapabilitiesAclSupport() {
        RepositoryInfo r = this.session.getRepositoryInfo();
        Assert.assertNotNull(r);

        // capabilities
        RepositoryCapabilities repcap = r.getCapabilities();
        Assert.assertNotNull(repcap);

        CapabilityAcl capacl = repcap.getAclCapability();
        Assert.assertNotNull(capacl);
        switch (capacl) {
        case DISCOVER:
        case MANAGE:
        case NONE:
View Full Code Here

    public void repositoryCapabilitiesChangesSupport() {
        RepositoryInfo r = this.session.getRepositoryInfo();
        Assert.assertNotNull(r);

        // capabilities
        RepositoryCapabilities repcap = r.getCapabilities();
        Assert.assertNotNull(repcap);
        CapabilityChanges capch = repcap.getChangesCapability();
        Assert.assertNotNull(capch);
        switch (capch) {
        case ALL:
        case OBJECTIDSONLY:
        case PROPERTIES:
View Full Code Here

    public void repositoryCapabilitiesContentStreamUpdateabilitySupport() {
        RepositoryInfo r = this.session.getRepositoryInfo();
        Assert.assertNotNull(r);

        // capabilities
        RepositoryCapabilities repcap = r.getCapabilities();
        Assert.assertNotNull(repcap);
        CapabilityContentStreamUpdates ccsu = repcap.getContentStreamUpdatesCapability();
        Assert.assertNotNull(ccsu);
        switch (ccsu) {
        case ANYTIME:
        case NONE:
        case PWCONLY:
View Full Code Here

    public void repositoryCapabilitiesJointSupport() {
        RepositoryInfo r = this.session.getRepositoryInfo();
        Assert.assertNotNull(r);

        // capabilities
        RepositoryCapabilities repcap = r.getCapabilities();
        Assert.assertNotNull(repcap);

        CapabilityJoin capj = repcap.getJoinCapability();
        Assert.assertNotNull(capj);

        switch (capj) {
        case INNERANDOUTER:
        case INNERONLY:
View Full Code Here

    public void repositoryCapabilitiesQuerySupport() {
        RepositoryInfo r = this.session.getRepositoryInfo();
        Assert.assertNotNull(r);

        // capabilities
        RepositoryCapabilities repcap = r.getCapabilities();
        Assert.assertNotNull(repcap);

        CapabilityQuery capq = repcap.getQueryCapability();
        Assert.assertNotNull(capq);
        switch (capq) {
        case BOTHCOMBINED:
        case BOTHSEPARATE:
        case FULLTEXTONLY:
View Full Code Here

TOP

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

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.