h1. Integration with eXo WCM

eXo Web Content Management (WCM) system provides CMIS access to its content storage features:
* WCM drives
* Document files and folders
* Symlinks
* Categories

To expose WCM drives as CMIS repositories there is special extension of _CmisRegistry_.
Read admin guide for configuration of _org.exoplatform.ecms.xcmis.sp.jcr.exo.DriveCmisRegistry_ component.

Work with CMIS is based on reference documents returned by services. 
Each CMIS service returns response containing links to other services describing the Document or operations on it. 
In most cases a Document will be asked by its ID. Some services accepts a Document path.

{info}
Notes for use cases:
To access the eXo CMIS services from the client side, use the Curl tool [http://curl.haxx.se/download.html].
CMIS AtomPub binding which is based upon the Atom (RFC4287) and Atom Publishing Protocol (RFC5023) will be used.

SOAP binding is not implemented in the eXo Platform 3.x.
{info}

h2. JCR namespaces and nodetypes

eXo CMIS uses special JCR namespaces _cmis_ and _xcmis_ internally. 

To expose drives content following nodetypes supported: 
* nt:file nodetype for representation of cmis:documents 
* nt:folder for representation of cmis:folder

Since CMIS specification not allows to have more root types except of described above (cmis:documents and cmis:folder), those two (nt:file and nt:folder) are mapped to CMIS types. 

There is two more node types which are used: cmis:policy and cmis:relationship which represent CMIS types with corresponded (see Services description for details). 

Additionally nodetypes used in WCM are mapped as follow:
* nt:unstructured + extentions as cmis:folder
* exo:taxonomy + extentions as cmis:folder

In other words only nodetypes extending nt:file, nt:folder, nt:unstructured and exo:taxonomy will be exposed correctly via CMIS API.

{warning}
  WCM's nodetype exo:article isn't supported by eXo CMIS due to not compliant structure to nt:file.
{warning}

h2. WCM drives as CMIS Repositories

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

{tip}
  Working with CMIS repositories it's important understand that a repository reflects a WCM Drive, which is a sub-tree in JCR workspace. And two or more drives can be mapped to a same workspace or a sub-tree.
  As a result changes in one repository can affect others. 
  Consult with WCM drives mappings to know actual location of a content you'll access or change.
{tip}

h3. Use Case: Browse Drives via _getRepository_

* Login to the website as a user with the developer role.
* Open *Group | Sites Explorer*, you can see the drives set of WCM, such as *Sites Management*, *DMS Administration*.
* Get the list of these WCM drives via CMIS using _Curl_, asking _getRepositories_ service:
{screen}
curl -o getrepos.xml -u root:gtn http://localhost:8080/rest/private/cmisatom/ 
{screen}

The requested file (getrepos.xml) contains the set of Repositories in the AtomPub format.
The root element represents the set of *workspaces* representing *WCM drives* related to resources, 
for example for *DMS Administration* the response will contains data like:
{code:language=xml}
   <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>
{code}

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 WCM node of *DMS Administration* drive by path, the *objectbypath* template can be used:
{code}
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}
{code}
where parameters include:
* Required:
** ID repositoryId: The identifier for the repository.
** String path: The path to the object.
* Optional:
** String filter
** Boolean includeAllowableActions
** Enum includeRelationships
** String renditionFilter
** Boolean includePolicyIds
** Boolean includeACL

{note}
  Find full description of all sepcefied services in the CMIS specefication.
{note}

h2. WCM Symlinks

Symlinks are used to organize the virtual access to documents in WCM, which is implemented like links in Unix/Linux/Mac OS (refer to ln command for more details).
{note}
JCR exo:symlink nodetype used for such type nodes.
{note}

h3. Use Case: Follow Symlinks

* Login to the acme website as a user with the developer role.
* Open *Group | Sites Explorer*, select *Sites Management*, go to folder /acme/documents.
* Upload any file (e.g. test.txt) /acme/documents 
* Add this file to *acme/News* category. It will create symlink to /acme/documents/test.txt in /acme/categories/acme/News
* Get content of folder /acme/categories/acme/News via CMIS:
{screen}
curl -o news.xml -u root:gtn http://localhost:8080/rest/private/cmisatom/Managed%20Sites/objectbypath?path=/acme/categories/acme/News
{screen}

The requested file (products.xml) contains the entry with information about the folder.
* The list of properties for the object (such as node Id or type).
* Allowable Actions can be performed on the document; for example, requesting the childrens list.
* ACL and policies information.
{code:language=xml}
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/">
   <id>f59a3539c0a80003625790bdadf566c5</id>
   <published>2010-09-09T18:11:57.707Z</published>
   <updated>2010-09-09T18:11:57.707Z</updated>
   <summary type="text"></summary>
   <author>
      <name>system</name>
   </author>
   <title type="text">News</title>
   <link href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites" rel="service" type="application/atomsvc+xml"></link>
   <link href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/object/f59a3539c0a80003625790bdadf566c5"
      rel="self"></link>
   <link href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/object/f59a3539c0a80003625790bdadf566c5"
      rel="edit"></link>
   <link href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/typebyid/exo%3Ataxonomy" rel="describedby"
      type="application/atom+xml; type=entry"></link>
   <link
      href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/allowableactions/f59a3539c0a80003625790bdadf566c5"
      rel="http://docs.oasis-open.org/ns/cmis/link/200908/allowableactions" type="application/cmis+xml; type=allowableActions"></link>
   <link
      href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/relationships/f59a3539c0a80003625790bdadf566c5"
      rel="http://docs.oasis-open.org/ns/cmis/link/200908/relationships" type="application/atom+xml; type=feed"></link>
   <link
      href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/policies/f59a3539c0a80003625790bdadf566c5"
      rel="http://docs.oasis-open.org/ns/cmis/link/200908/policies" type="application/atom+xml; type=feed"></link>
   <link href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/objacl/f59a3539c0a80003625790bdadf566c5"
      rel="http://docs.oasis-open.org/ns/cmis/link/200908/acl" type="application/cmisacl+xml"></link>
   <link
      href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/children/f59a3539c0a80003625790bdadf566c5"
      rel="down" type="application/atom+xml; type=feed"></link>
   <link
      href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/descendants/f59a3539c0a80003625790bdadf566c5"
      rel="down" type="application/cmistree+xml"></link>
   <link
      href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/foldertree/f59a3539c0a80003625790bdadf566c5"
      rel="http://docs.oasis-open.org/ns/cmis/link/200908/foldertree" type="application/atom+xml; type=feed"></link>
   <link href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/object/f59a3533c0a8000339af97059f243a25"
      rel="up" type="application/atom+xml; type=entry"></link>
   <content type="text">News</content>
   <cmisra:object xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/">
      <cmis:properties>
         <cmis:propertyId propertyDefinitionId="cmis:allowedChildObjectTypeIds" localName="cmis:allowedChildObjectTypeIds"
            displayName="cmis:allowedChildObjectTypeIds" queryName="cmis:allowedChildObjectTypeIds"></cmis:propertyId>
         <cmis:propertyString propertyDefinitionId="cmis:path" localName="cmis:path"
            displayName="cmis:path" queryName="cmis:path">
            <cmis:value>/acme/categories/acme/News</cmis:value>
         </cmis:propertyString>
         <cmis:propertyId propertyDefinitionId="cmis:objectTypeId" localName="cmis:objectTypeId"
            displayName="cmis:objectTypeId" queryName="cmis:objectTypeId">
            <cmis:value>exo:taxonomy</cmis:value>
         </cmis:propertyId>
         <cmis:propertyString propertyDefinitionId="cmis:lastModifiedBy" localName="cmis:lastModifiedBy"
            displayName="cmis:lastModifiedBy" queryName="cmis:lastModifiedBy"></cmis:propertyString>
         <cmis:propertyString propertyDefinitionId="cmis:name" localName="cmis:name"
            displayName="cmis:name" queryName="cmis:name">
            <cmis:value>News</cmis:value>
         </cmis:propertyString>
         <cmis:propertyString propertyDefinitionId="cmis:createdBy" localName="cmis:createdBy"
            displayName="cmis:createdBy" queryName="cmis:createdBy"></cmis:propertyString>
         <cmis:propertyId propertyDefinitionId="cmis:objectId" localName="cmis:objectId"
            displayName="cmis:objectId" queryName="cmis:objectId">
            <cmis:value>f59a3539c0a80003625790bdadf566c5</cmis:value>
         </cmis:propertyId>
         <cmis:propertyDateTime propertyDefinitionId="cmis:creationDate" localName="cmis:creationDate"
            displayName="cmis:creationDate" queryName="cmis:creationDate"></cmis:propertyDateTime>
         <cmis:propertyString propertyDefinitionId="cmis:changeToken" localName="cmis:changeToken"
            displayName="cmis:changeToken" queryName="cmis:changeToken"></cmis:propertyString>
         <cmis:propertyId propertyDefinitionId="cmis:baseTypeId" localName="cmis:baseTypeId"
            displayName="cmis:baseTypeId" queryName="cmis:baseTypeId">
            <cmis:value>cmis:folder</cmis:value>
         </cmis:propertyId>
         <cmis:propertyId propertyDefinitionId="cmis:parentId" localName="cmis:parentId"
            displayName="cmis:parentId" queryName="cmis:parentId">
            <cmis:value>f59a3533c0a8000339af97059f243a25</cmis:value>
         </cmis:propertyId>
         <cmis:propertyDateTime propertyDefinitionId="cmis:lastModificationDate"
            localName="cmis:lastModificationDate" displayName="cmis:lastModificationDate" queryName="cmis:lastModificationDate"></cmis:propertyDateTime>
      </cmis:properties>
      <cmis:acl></cmis:acl>
      <cmis:exactACL>false</cmis:exactACL>
      <cmis:policyIds></cmis:policyIds>
      <cmis:rendition></cmis:rendition>
   </cmisra:object>
</entry>
{code}
 
To get the file which has uploaded above, use the *children* service to get the list of child nodes of /acme/documents. Find this service URL in the response XML above:
{screen}
curl -o childs.xml -u root:gtn http://localhost:8080/rest/private/cmisatom/Managed%20Sites/children/f59a3539c0a80003625790bdadf566c5
{screen}

In the requested file (childs.xml), find the entry related to *test.txt* file uploaded via *Sites Explorer*. Find by title for name "test.txt".
{code:language=xml}
   <entry xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/">
      <id>f708e208c0a80003554babb97bd934ba</id>
      <published>2010-09-09T18:06:31.987Z</published>
      <updated>2010-09-09T18:06:31.987Z</updated>
      <summary type="text"></summary>
      <author>
         <name>system</name>
      </author>
      <title type="text">test.txt</title>
      <link href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites" rel="service"
         type="application/atomsvc+xml"></link>
      <link
         href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/object/f708e208c0a80003554babb97bd934ba"
         rel="self"></link>
      <link
         href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/object/f708e208c0a80003554babb97bd934ba"
         rel="edit"></link>
      <link href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/typebyid/cmis%3Adocument"
         rel="describedby" type="application/atom+xml; type=entry"></link>
      <link
         href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/allowableactions/f708e208c0a80003554babb97bd934ba"
         rel="http://docs.oasis-open.org/ns/cmis/link/200908/allowableactions" type="application/cmis+xml; type=allowableActions"></link>
      <link
         href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/relationships/f708e208c0a80003554babb97bd934ba"
         rel="http://docs.oasis-open.org/ns/cmis/link/200908/relationships" type="application/atom+xml; type=feed"></link>
      <link
         href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/policies/f708e208c0a80003554babb97bd934ba"
         rel="http://docs.oasis-open.org/ns/cmis/link/200908/policies" type="application/atom+xml; type=feed"></link>
      <link
         href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/objacl/f708e208c0a80003554babb97bd934ba"
         rel="http://docs.oasis-open.org/ns/cmis/link/200908/acl" type="application/cmisacl+xml"></link>
      <link
         href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/versions/f708a0f1c0a8000333e3681f99fab760"
         rel="version-history" type="application/atom+xml; type=feed"></link>
      <link
         href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/object/f708e208c0a80003554babb97bd934ba?returnVersion=latest"
         rel="current-version" type="application/atom+xml; type=entry"></link>
      <link
         href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/parents/f708e208c0a80003554babb97bd934ba"
         rel="up" type="application/atom+xml; type=feed"></link>
      <link
         href="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/file/f708e208c0a80003554babb97bd934ba"
         rel="edit-media"></link>
      <content type="text/plain"
         src="http://localhost:8080/rest/private/cmisatom/Managed%20Sites/file/f708e208c0a80003554babb97bd934ba"></content>
      <cmisra:object xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/">
         <cmis:properties>
            <cmis:propertyBoolean propertyDefinitionId="cmis:isLatestMajorVersion"
               localName="cmis:isLatestMajorVersion" displayName="cmis:isLatestMajorVersion" queryName="cmis:isLatestMajorVersion">
               <cmis:value>false</cmis:value>
            </cmis:propertyBoolean>
            <cmis:propertyInteger propertyDefinitionId="cmis:contentStreamLength"
               localName="cmis:contentStreamLength" displayName="cmis:contentStreamLength" queryName="cmis:contentStreamLength">
               <cmis:value>38</cmis:value>
            </cmis:propertyInteger>
            <cmis:propertyId propertyDefinitionId="cmis:contentStreamId" localName="cmis:contentStreamId"
               displayName="cmis:contentStreamId" queryName="cmis:contentStreamId">
               <cmis:value>f708a0c2c0a800033bedeb35caddeed1</cmis:value>
            </cmis:propertyId>
            <cmis:propertyId propertyDefinitionId="cmis:objectTypeId" localName="cmis:objectTypeId"
               displayName="cmis:objectTypeId" queryName="cmis:objectTypeId">
               <cmis:value>cmis:document</cmis:value>
            </cmis:propertyId>
            <cmis:propertyString propertyDefinitionId="cmis:versionSeriesCheckedOutBy"
               localName="cmis:versionSeriesCheckedOutBy" displayName="cmis:versionSeriesCheckedOutBy"
               queryName="cmis:versionSeriesCheckedOutBy"></cmis:propertyString>
            <cmis:propertyId propertyDefinitionId="cmis:versionSeriesCheckedOutId" localName="cmis:versionSeriesCheckedOutId"
               displayName="cmis:versionSeriesCheckedOutId" queryName="cmis:versionSeriesCheckedOutId"></cmis:propertyId>
            <cmis:propertyString propertyDefinitionId="cmis:name" localName="cmis:name"
               displayName="cmis:name" queryName="cmis:name">
               <cmis:value>test.txt</cmis:value>
            </cmis:propertyString>
            <cmis:propertyString propertyDefinitionId="cmis:contentStreamMimeType"
               localName="cmis:contentStreamMimeType" displayName="cmis:contentStreamMimeType" queryName="cmis:contentStreamMimeType">
               <cmis:value>text/plain</cmis:value>
            </cmis:propertyString>
            <cmis:propertyId propertyDefinitionId="cmis:versionSeriesId" localName="cmis:versionSeriesId"
               displayName="cmis:versionSeriesId" queryName="cmis:versionSeriesId">
               <cmis:value>f708a0f1c0a8000333e3681f99fab760</cmis:value>
            </cmis:propertyId>
            <cmis:propertyDateTime propertyDefinitionId="cmis:creationDate" localName="cmis:creationDate"
               displayName="cmis:creationDate" queryName="cmis:creationDate">
               <cmis:value>2010-09-09T18:06:31.987Z</cmis:value>
            </cmis:propertyDateTime>
            <cmis:propertyString propertyDefinitionId="cmis:changeToken" localName="cmis:changeToken"
               displayName="cmis:changeToken" queryName="cmis:changeToken"></cmis:propertyString>
            <cmis:propertyBoolean propertyDefinitionId="cmis:isLatestVersion" localName="cmis:isLatestVersion"
               displayName="cmis:isLatestVersion" queryName="cmis:isLatestVersion">
               <cmis:value>true</cmis:value>
            </cmis:propertyBoolean>
            <cmis:propertyString propertyDefinitionId="cmis:versionLabel" localName="cmis:versionLabel"
               displayName="cmis:versionLabel" queryName="cmis:versionLabel">
               <cmis:value>latest</cmis:value>
            </cmis:propertyString>
            <cmis:propertyBoolean propertyDefinitionId="cmis:isVersionSeriesCheckedOut"
               localName="cmis:isVersionSeriesCheckedOut" displayName="cmis:isVersionSeriesCheckedOut"
               queryName="cmis:isVersionSeriesCheckedOut">
               <cmis:value>false</cmis:value>
            </cmis:propertyBoolean>
            <cmis:propertyString propertyDefinitionId="cmis:lastModifiedBy" localName="cmis:lastModifiedBy"
               displayName="cmis:lastModifiedBy" queryName="cmis:lastModifiedBy"></cmis:propertyString>
            <cmis:propertyString propertyDefinitionId="cmis:createdBy" localName="cmis:createdBy"
               displayName="cmis:createdBy" queryName="cmis:createdBy"></cmis:propertyString>
            <cmis:propertyString propertyDefinitionId="cmis:checkinComment" localName="cmis:checkinComment"
               displayName="cmis:checkinComment" queryName="cmis:checkinComment"></cmis:propertyString>
            <cmis:propertyId propertyDefinitionId="cmis:objectId" localName="cmis:objectId"
               displayName="cmis:objectId" queryName="cmis:objectId">
               <cmis:value>f708e208c0a80003554babb97bd934ba</cmis:value>
            </cmis:propertyId>
            <cmis:propertyBoolean propertyDefinitionId="cmis:isImmutable" localName="cmis:isImmutable"
               displayName="cmis:isImmutable" queryName="cmis:isImmutable">
               <cmis:value>false</cmis:value>
            </cmis:propertyBoolean>
            <cmis:propertyBoolean propertyDefinitionId="cmis:isMajorVersion" localName="cmis:isMajorVersion"
               displayName="cmis:isMajorVersion" queryName="cmis:isMajorVersion">
               <cmis:value>false</cmis:value>
            </cmis:propertyBoolean>
            <cmis:propertyId propertyDefinitionId="cmis:baseTypeId" localName="cmis:baseTypeId"
               displayName="cmis:baseTypeId" queryName="cmis:baseTypeId">
               <cmis:value>cmis:document</cmis:value>
            </cmis:propertyId>
            <cmis:propertyString propertyDefinitionId="cmis:contentStreamFileName"
               localName="cmis:contentStreamFileName" displayName="cmis:contentStreamFileName" queryName="cmis:contentStreamFileName">
               <cmis:value>test.txt</cmis:value>
            </cmis:propertyString>
            <cmis:propertyDateTime propertyDefinitionId="cmis:lastModificationDate"
               localName="cmis:lastModificationDate" displayName="cmis:lastModificationDate" queryName="cmis:lastModificationDate">
               <cmis:value>2010-09-09T18:06:31.987Z</cmis:value>
            </cmis:propertyDateTime>
         </cmis:properties>
         <cmis:acl></cmis:acl>
         <cmis:exactACL>false</cmis:exactACL>
         <cmis:policyIds></cmis:policyIds>
         <cmis:rendition></cmis:rendition>
      </cmisra:object>
   </entry>
{code}

Then, get the *test.txt* file content via CMIS by using the *file* service and *id* of the file "test.txt" from *childs.xml*:
{screen}
curl -o test.txt -u root:gtn http://localhost:8080/rest/private/cmisatom/Managed%20Sites/file/f708e208c0a80003554babb97bd934ba
{screen}

Get results in the test.txt file in the local folder.
In this way we got file stored in *Sites Explorer* to folder /acme/documents/test.txt via *eXo CMIS* by symlink path /acme/categories/acme/News/test.txt.
As it seen file's actual content referenced by id in CMIS. Path has no matter for content read or change.


h2. Modify WCM via CMIS

{note}
Upload the modified local file using the command with id of the file stored in WCM (it's jcr:uuid of the file in JCR Workspace). Note that you should run this command from the folder where the local file is stored.
{note}

To update any file via CMIS, use the *file* service and the PUT request. Use the same file as in the previous usecase (/acme/documents/test.txt, id:f708e208c0a80003554babb97bd934ba).

{screen}
curl -T test.txt -X PUT -H "Content-Type:text/plain; charset=UTF-8" -u root:gtn http://localhost:8080/rest/private/cmisatom/Managed%20Sites/file/f708e208c0a80003554babb97bd934ba
{screen}

Go to the *Sites Explorer* and see changes applied from the local file in /acme/documents/test.txt.

h2. CMIS search 

{warning}
CMIS search is disable in eXo CMIS by default.
For more details and configuration refer to CMIS Administrator guide.
{warning}
