If you want to write your own CMIS client, profound knowledge about the CMIS standard is mandatory. As a starting point the OpenCMIS client examples may be helpful: https://chemistry.apache.org/java/examples/: new window
Note: Apache Chemistry does not support aspects.
The available repositories can be configured the following way:
Syntax |
---|
override CMISFilterRepositories{ RepositoryFilterType repo2 = coort.CreateAggregate(#RepositoryFilterType); repositories += repo1; |
The aspect parameter can be used to retrieve all properties of an object that are defined on a specified form and that contain a value. Additionally, the standard properties atom:icon, cmis:baseTypeId and cmis:createdBy are available.
Usage:
To get a list of all child objects following URL can be used:
https://<webserver>/<vdir>/cmis/<repository>/<object>/children?aspect=<action>
Note: When accessing object lists via CMIS, a maximum of 1000 objects can be loaded without paging. When using paging (maxItems parameter), more than 1000 objects can still be loaded. In addition, in children requests that set the aspect parameter, the estimated total number of objects in a list is transmitted in the fsc:estimatedNumItems XML attribute.
To get the values of all available properties (that contain a value) the following URL can be used:
https://<webserver>/<vdir>/cmis/<repository>/<object>/entry?aspect=<action>
The value of the aspect parameter is matched with the value of the Action property. The Action property can be defined on the desired object class, on the “User Interface” tab in the Forms property. The matching action determines the used form. The form contains form pages. All properties of a basic type (string, integer, date, contents and so on) that are assigned to the form pages and that contain a value are included in the response XML. Properties that contain no value are not included in the XML due to performance reasons.
In the following example properties of the form that matches the COOATTREDIT@1.1:EditObjectAttributes action are returned.
Example |
---|
https://at.cloud.fabasoft.com/folio/cmis/COO.1.3285.1.1346/COO.1.3285.4.945/ |
In the following example the properties objname and objversmaxnr of the object COO.1.3285.4.945 are set.
Example |
---|
curl.exe -X PUT -u "user":"passwd" " https://at.cloud.fabasoft.com/folio/cmis/COO.1.3285.1.1346/COO.1.3285.4.945/ changeprops.xml <?xml version="1.0" encoding="utf-8"?> <entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/"> <cmis:propertyInteger propertyDefinitionId="COOSYSTEM@1.1:objversmaxnr"> |
In the following example a Microsoft Word document is created directly on the desk. The name “My document” and the subject “My subject” are set.
Example |
---|
curl.exe -X POST -u "user":"passwd" " https://at.cloud.fabasoft.com/folio/cmis/COO.1.3285.1.1346/COO.1.3285.1.1346/ createdoc.xml <?xml version="1.0" encoding="utf-8"?> <entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/"> <cmis:propertyId propertyDefinitionId="cmis:objectTypeId"> <cmis:propertyId propertyDefinitionId="cmis:baseTypeId"> <cmis:propertyString propertyDefinitionId="COOSYSTEM@1.1:objsubject"> |
In the following example an object should be created in a folder that consists of several object lists. The document should be created in the folder COO.1.3285.4.934 in the object list COO.1.1.1.1907.
Example |
---|
curl.exe -X POST -u "user":"passwd" " https://at.cloud.fabasoft.com/folio/cmis/COO.1.3285.1.1346/ |
The aspect=true parameter is only for internal use. It reduces the amount of data that is transferred to the client (the response XML contains only the most important information). This setting does not conform to the CMIS specification.
Note: The URL pointing to the PDF overview is included for objects without content.
The CMIS service “updateProperties” can be used to modify properties that are defined in the aspect.
The following example shows how to use the aspect parameter in a SOAP message.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://docs.oasis-open.org/ns/cmis/messaging/200908/" xmlns:fsc="http://www.fabasoft.com/">
<soapenv:Header/>
<soapenv:Body>
<ns:getChildren>
<ns:repositoryId>COO.1.506.1.215</ns:repositoryId>
<ns:folderId>COO.1.506.1.345</ns:folderId>
<ns:extension>
<fsc:aspect>true</fsc:aspect>
</ns:extension>
</ns:getChildren>
</soapenv:Body>
</soapenv:Envelope>
The HTTP header x-fsc-statekey enables optimized loading of long object lists by using a state server.
The properties of user-defined forms can be accessed like any other property.
When you create a “Container With User Data” or “Room With User Data” containing one list or several lists on the same form page the first list can be retrieved the following way.
Example |
---|
curl.exe -u "user":"passwd" " https://at.cloud.fabasoft.com/folio/cmis/root/ |
If several lists on different form pages are available the $ operator can be used to access each list.
Example |
---|
Provides an overview of all available lists: curl.exe -u "user":"passwd" " https://at.cloud.fabasoft.com/folio/ As a result, the following entries are returned: <id>cmisrep:entry:COO.1.506.3.4539$COO.1.506.1.8467</id> The following way one of these lists can be accessed: curl.exe -u "user":"passwd" " https://at.cloud.fabasoft.com/folio/cmis/root/ Note: Depending on the used shell, the $ sign may need to be escaped (\$). |
In the following example, properties of the form that matches the COOATTREDIT@1.1:EditObjectAttributes action are returned. The properties of the user-defined form are included.
Example |
---|
curl.exe -u "user":"passwd" " https://at.cloud.fabasoft.com/folio/ |
If a user quota is defined for a Fabasoft Folio Domain, the data is also available in the response XML of the following call:
https://<webserver>[<port>]/<vdir>/cmis
Example:
<fsc:properties>
<cmis:property propertyDefinitionId="fsc:maxquota">
<cmis:value>10240</cmis:value>
</cmis:property>
<cmis:property propertyDefinitionId="fsc:maxobjcount">
<cmis:value>10000</cmis:value>
</cmis:property>
<cmis:property propertyDefinitionId="fsc:curobjcount">
<cmis:value>115</cmis:value>
</cmis:property>
<cmis:property propertyDefinitionId="fsc:curquota">
<cmis:value>1701483</cmis:value>
</cmis:property>
<cmis:property propertyDefinitionId="fsc:maxcontsize">
<cmis:value>2147483647</cmis:value>
</cmis:property>
</fsc:properties>
The following URL can be used to get a collection of all objects that are marked as synchronized by a user:
https://<webserver>[<port>]/<vdir>/cmis/<repository>/-/synchronize
Following properties are available:
The properties canSetContentStream and contentStreamEncryption are only included in the response XML if the object is modifiable or encrypted.
Example:
<cmis:propertyBoolean propertyDefinitionId="fsc:canSetContentStream">
<cmis:value>true</cmis:value>
</cmis:propertyBoolean>
<cmis:propertyString propertyDefinitionId="fsc:contentStreamEncryption">
<cmis:value>AES 256 CBC</cmis:value>
</cmis:propertyString>
The available document types are defined in the Web Service Configuration:
Please be aware that some operations like getting the folder tree of a large structure may exceed the system resources.
The following additional arguments are available:
Parameter needChoices
To reduce the amount of data generated choices are no longer provided by default, starting with version 2019. If these additional choices are needed the URL parameter needChoices=true may be added.