CMIS
  • 22 Nov 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

CMIS

  • Dark
    Light
  • PDF

Article summary

CMIS

CMIS is an OASIS standard defining services for interoperability of content management tools.

Reference: https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=cmis

The CMIS implementation of Constellio is partial and based on the Apache Chemistry library: https://chemistry.apache.org/project/cmis.html

Warning
Using the CMIS API is no longer recommended. It is preferable to focus on REST services instead.

Supported queries

Constellio implements many of the CMIS standard queries. The description of each of these queries is available in the official documentation of the CMIS standard.

Directory Services

  • getRepositoryInfo
  • getRepositoryInfos
  • getTypeChildren
  • getTypeDefinition
  • getTypeDescendants
  • getChildren
  • getFolderParent
  • getObjectParents
  • getCheckedOutDocs

Object Services

  • Create
  • createDocument
  • createFolder
  • deleteObjectOrCancelCheckOut
  • deleteTree
  • getAllowableActions
  • getContentStream
  • getObject
  • getObjectByPath
  • getProperties
  • getRenditions
  • setContentStream
  • appendContentStream
  • updateProperties
  • bulkUpdateProperties

Versioning Services

  • getAllVersions
  • Checkout
  • checkIn
  • getPropertiesOfLatestVersion

Access Control Services (ACL)

  • getAcl
  • applyAcl

Use

Graphical tool: You can use CMIS Workbench to connect to the Constellio CMIS service. To download: http://chemistry.apache.org/java/developing/tools/dev-tools-workbench.html 

Instructions: 

  1. URL for CMIS service: http://<host>:<port>/constellio/atom
  2. Use Constellio tokens (see article Importing users, Generate a token). The username corresponds to the "serviceKey" and the password to the "token"
  3. Code examples using CMIS (Java):
    1. https://github.com/doculibre/constellio/blob/master/sdk/src/com/constellio/app/api/cmis/rm/CmisTestMain.java
    2. https://github.com/doculibre/constellio/blob/master/sdk/src/com/constellio/app/api/cmis/accept/CmisACLAcceptanceTest.java
  4. How to create a folder:
    session.createFolder() with the following properties
    'cmis:objectTypeId': 'folder_default'
    'administrativeUnitEntered': '00000000XXX'
    'categoryEntered': '000000000XX'
    'retentionRuleEntered': '00000000XXX'
    'title': 'Your folder title'
    'openingDate': '2018-02-10T11:52:53.294+02:00' 
  5.   How to create a document:
    a) First create the form, of type cmis:folder with the following properties:
    'cmis:objectTypeId': 'document_default',
    'title': 'test.pdf'
    b) Then add the file of type cmis:document
    session.createDocument()
    'cmis:objectTypeId': 'cmis:document',
    'cmis:name': 'test.pdf',
    'metadata': 'content'



Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.