1.2.4.1.2. Content drives as CMIS Repositories

The Content drive is used to expose as an isolated repository via the CMIS service. Operations on the repository will reflect the drive immediately.

Tip

When working with CMIS repositories, it is important to understand that a repository reflects a Content Drive, which is a sub-tree in JCR workspace. Two or more drives can be mapped to the same workspace or a sub-tree. As a result, changes in one repository can affect others. Refer to the Content drives mappings to know actual location of a content you will access or change.

Use Case: Browse Drives via getRepository

curl -o getrepos.xml -u root:gtn http://localhost:8080/rest/private/cmisatom/

The requested file (getrepos.xml) contains the set of Repositories in the AtomPub format. The root element represents the set of workspaces representing Content drives related to resources, for example, for DMS Administration, the response will contain data like:


<service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/">
    <workspace>
        <atom:title type="text">DMS Administration</atom:title>
        <cmisra:repositoryInfo xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/">
            <cmis:repositoryId>DMS Administration</cmis:repositoryId>
            <cmis:repositoryName>DMS Administration</cmis:repositoryName>
            </cmisra:repositoryInfo>
            <collection href="http://localhost:8080/rest/private/cmisatom/DMS%20Administration/query">
            <atom:title type="text">Query</atom:title>
        <cmisra:collectionType>query</cmisra:collectionType>
        </collection>
        <collection href="http://localhost:8080/rest/private/cmisatom/DMS%20Administration/children/00exo0jcr0root0uuid0000000000000">
            <atom:title type="text">Folder Children</atom:title>
            <cmisra:collectionType>root</cmisra:collectionType>
            </collection>
            <collection href="http://localhost:8080/rest/private/cmisatom/DMS%20Administration/checkedout">
            <atom:title type="text">Checkedout collection</atom:title>
            <cmisra:collectionType>checkedout</cmisra:collectionType>
        </collection>
        <collection href="http://localhost:8080/rest/private/cmisatom/DMS%20Administration/unfiled">
            <atom:title type="text">Unfiled collection</atom:title>
            <cmisra:collectionType>unfiled</cmisra:collectionType>
        </collection>
        <collection href="http://localhost:8080/rest/private/cmisatom/DMS%20Administration/types">
            <atom:title type="text">Types Children</atom:title>
            <cmisra:collectionType>types</cmisra:collectionType>
        </collection>
        <cmisra:uritemplate>
            <cmisra:template>http://localhost:8080/rest/private/cmisatom/DMS%20Administration/object/{id}?filter={filter}&amp;includeAllowableActions={includeAllowableActions}&amp;includePolicyIds={includePolicyIds}&amp;includeRelationships={includeRelationships}&amp;includeACL={includeACL}&amp;renditionFilter={renditionFilter}
            </cmisra:template>
            <cmisra:type>objectbyid</cmisra:type>
            <cmisra:mediatype>application/atom+xml;type=entry</cmisra:mediatype>
        </cmisra:uritemplate>
        <cmisra:uritemplate>
            <cmisra:template>http://localhost:8080/rest/private/cmisatom/DMS%20Administration/objectbypath?path={path}&amp;filter={filter}&amp;includeAllowableActions={includeAllowableActions}&amp;includePolicyIds={includePolicyIds}&amp;includeRelationships={includeRelationships}&amp;includeACL={includeACL}&amp;renditionFilter={renditionFilter}
            </cmisra:template>
            <cmisra:type>objectbypath</cmisra:type>
            <cmisra:mediatype>application/atom+xml;type=entry</cmisra:mediatype>
        </cmisra:uritemplate>
        <cmisra:uritemplate>
            <cmisra:template>http://localhost:8080/rest/private/cmisatom/DMS%20Administration/query?q={q}&amp;searchAllVersions={searchAllVersions}&amp;maxItems={maxItems}&amp;skipCount={skipCount}&amp;includeAllowableActions={includeAllowableActions}=&amp;includeRelationships={includeRelationships}
            </cmisra:template>
            <cmisra:type>query</cmisra:type>
            <cmisra:mediatype>application/atom+xml;type=feed</cmisra:mediatype>
        </cmisra:uritemplate>
        <cmisra:uritemplate>
            <cmisra:template>http://localhost:8080/rest/private/cmisatom/DMS%20Administration/typebyid/{id}
            </cmisra:template>
            <cmisra:type>typebyid</cmisra:type>
            <cmisra:mediatype>application/atom+xml;type=entry</cmisra:mediatype>
        </cmisra:uritemplate>
    </workspace>
 </service>

Here are the collection of services and predefined templates which can be used from the client side to request resources related to this repository. For example, to get the Content node of the DMS Administration drive by path, the objectbypath template can be used:

http://localhost:8080/rest/private/cmisatom/DMS%20Administration/objectbypath?path={path}&amp;filter={filter}&amp;includeAllowableActions={includeAllowableActions}&amp;includePolicyIds={includePolicyIds}&amp;includeRelationships={includeRelationships}&amp;includeACL={includeACL}&amp;renditionFilter={renditionFilter}

where parameters include:

Note

Find the full description of all specified services in the CMIS specification.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus