Liferay 6.1 introduced the ability to mount multiple repositories into the Documents and Media portlet (renamed from Document Library portlet). One of the protocols it uses to mount third-party repositories is CMIS 1.0.
Most configurations are fairly straight forward. The first thing you need to know is credentials. In order to log into a CMIS repository, we need to basically pass the credentials you used in Liferay through to CMIS. So, you need to make sure to set your portal-ext.properties to allow Liferay to store your password in the session:
Next, you need to make sure that the means in which you login to Liferay is the same as for your repository. For most, this means that you need the same screenname. So, in portal-ext.properties, I have:
This can alternatively be configured in the control panel under Portal Settings > Authentication. Of course, what this means is that if I log into, say Nuxeo using "joeblogs" and "secretpassword", then I have to login to Liferay with those same credentials as well.
Most people would have some kind of an LDAP or something like this anyhow, so that should be fine. Without the same credentials, obviously, you will have a principal exception and your users will be complaining to you about why they can't see their data.. you don't want that.
Mounting a Repository #
Now, startup your server and login as the administrator. In the Documents and Media control panel, you will see under the "Add" menu a selection to add a repository. After selecting that, you will be given a form that looks like you are adding a folder -- but instead, you are adding a new repository.
Select your repository type. Most people would use CMIS AtomPub, but we have provided CMIS WebServices as well (but it's a pain because of all the different parameters you have to set… go with AtomPub if you can!). The following are some of the most common AtomPub URLs for various vendor repositories:
For CMIS, all of the entries are required with the exception of repositoryId. If you do not enter a repositoryId, then it will just look for the first repository using the given parameters and set it to that -- many systems only have one.
- Why do I get a CmisRuntimeException thrown when I search? In some CMIS servers, you will get a response like this: "Function SCORE() used without matching CONTAINS() function" in their logs. This is generally a problem with how the vendor is parsing the scoring keyword for search. There's a workaround in Liferay where you can disable search scoring in your portal-ext.properties by setting the following parameter: index.search.scoring.enabled=false. If you are using Alfresco 4.0.a, this is fixed in Alfresco 4.0.b.
- How do I setup SSO with CMIS repositories? Well, unfortunately, that's not possible. As of right now, there are many vendor-specific ways of handling SSO, but nothing that is generic enough (e.g., the use of CAS) that we could put in Liferay's OOTB CMIS repository implementation.
- Why do some files I create in IBM FileNet not seem to show up in Liferay? This is discussed in the ticket LPS-20509. Basically, this is a problem with the way IBM FileNet implements the CMIS Query Language which only returns major versions. Hence, within Liferay, we will only create major versions if the vendor is IBM FileNet.
- Why doesn't Sharepoint or Documentum work? I thought they support CMIS? In our tests, we have found some inconsistencies in how Sharepoint and Documentum have implemented CMIS. So, in Liferay 6.1 EE we have developed vendor-specific implementations for these two, while leveraging their proprietary APIs.