CMIS FileShare should work out of the box without any complex configuration. How advanced users can set up multiple repositories, add logins, custom types and manipulate property values is explained on this page.
CMIS FileShare expects the configuration file cmisfs-config.xml in your home directory. It defines repositories, logins and custom types.
An arbitrary number of repositories can be configured. The repository ids must be unique. The root attribute must be an absolute path of an existing folder.
An arbitrary number of logins can be configured. The login names must be unique. The login names and passwords must not be empty.
See below.
<?xml version="1.0" encoding="UTF-8"?> <cmisfs:config xmlns:cmisfs="http://fmui.de/cmisfs/20091" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <repositories> <repository repositoryId="test" root="/tmp/myrepository"> <user name="test" readOnly="false" /> <user name="reader" readOnly="true" /> </repository> </repositories> <logins> <login name="test" password="test" /> <login name="reader" password="reader" /> </logins> <types> ... </types> </cmisfs:config>
Custom type definitions can be added to the configuration file into the <types> tag. Document types are enclosed in <documentType> tags; folder types in <folderType> tags. All parts of the type definitions are mandatory to assure compatibility with CMIS clients. Just a few are checked by CMIS FileShare, though.
Here is an example for a document type:
<types> <documentType xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200901"> <cmis:id>myTestDocumentType</cmis:id> <cmis:localName>myTestDocumentType</cmis:localName> <cmis:localNamespace>http://cmisfs.fmui.de/demo/</cmis:localNamespace> <cmis:parentId>cmis:document</cmis:parentId> <cmis:displayName>My Test Document Type</cmis:displayName> <cmis:queryName>TESTDOCTYPE</cmis:queryName> <cmis:description>My Test Document Type</cmis:description> <cmis:baseTypeId>cmis:document</cmis:baseTypeId> <cmis:creatable>true</cmis:creatable> <cmis:fileable>true</cmis:fileable> <cmis:queryable>false</cmis:queryable> <cmis:fulltextindexed>false</cmis:fulltextindexed> <cmis:includedInSupertypeQuery>true</cmis:includedInSupertypeQuery> <cmis:controllablePolicy>false</cmis:controllablePolicy> <cmis:controllableACL>false</cmis:controllableACL> <cmis:versionable>false</cmis:versionable> <cmis:contentStreamAllowed>required</cmis:contentStreamAllowed> <cmis:propertyStringDefinition> <cmis:id>testProperty</cmis:id> <cmis:localName>testProperty</cmis:localName> <cmis:displayName>A test property</cmis:displayName> <cmis:queryName>testProperty</cmis:queryName> <cmis:description>Just a string</cmis:description> <cmis:propertyType>string</cmis:propertyType> <cmis:cardinality>single</cmis:cardinality> <cmis:updatability>readwrite</cmis:updatability> <cmis:inherited>false</cmis:inherited> <cmis:required>false</cmis:required> <cmis:queryable>false</cmis:queryable> <cmis:orderable>false</cmis:orderable> </cmis:propertyStringDefinition> </documentType> </types>
CMIS FileShare creates XML files for all documents and folders that are created or updated through the CMIS interface. The XML files contain all properties of custom types and some properties of the base types. For folders this file is called cmis.xml and it resides in the folder. For documents this file is called <filename>.cmis.xml in stored next to the document file.
These files can be manipulated for test purposes. Properties can be added, deleted and changed. CMIS FileShare doesn't check the content of the XML files for correctness. Manipulated XML files can cause invalid CMIS responses.
The XML files follow the CMIS schema. It's the same format that is transported via SOAP and AtomPub. Here is an example:
<?xml version="1.0" encoding="UTF-8"?> <ns1:object xmlns:ns1="http://docs.oasis-open.org/ns/cmis/core/200901"> <ns1:properties> <ns1:propertyString pdid="MyProperty"> <ns1:value>Here is my value!</ns1:value> </ns1:propertyString> </ns1:properties> </ns1:object>