Blogs
In brief, you could integrate Alfresco in the portal in following approaches.
· Web services, referring to the portlet Alfresco Content;
· RESTful services - OpenSearch, referring to the portlet Alfresco Content;
· RESTful services - web scripts, using alfresco as direct repository of Liferay, referring to chapter 6 Customizing the WYSIWYG Editor of the book Liferay Portal 5.2 Systems Development;
· CMIS – using CMIS document library hook;
· Portlets – using alfresco web client as a set of portlets. Refer to integrating-alfresco-web-client-as-a-set-of-portlets-with-liferay
Abstracted from the book: Liferay Portal 6 Enterprise Intranets
This article will introduce how to integrate Alfresco through CMIS in Liferay.
Introduction
Content Management Interoperability Services (CMIS) - a standards proposal consisting of a set of Web services for sharing information among disparate content repositories that seeks to ensure interoperability for people and applications using multiple content repositories. Alfresco, Day Software, Dennis Hamilton, EMC, FatWire, IBM, Microsoft, Open Text, Oracle and SAP have joined forces to propose CMIS.
From 6.0, Liferay provides CMIS hook to support CMIS (version 1.0). Refer to CMIS and Database Migration.
How to achieve it?
In five steps, you should be able to integrate Alfresco through CMIS.
- Install Liferay portal 6.0 or above at $LIFERAY_HOME; here we use Liferay-Tomcat bundle $TOMCAT_AS_DIR; and $PORTAL_ROOT_HOME = $TOMCAT_AS_DIR/webapps/ROOT;
- Download Alfresco 3.2 E or above ${alfresco.war} and ${shared.war}; you can find Alfresco 3.2 E at /palm_tree/book/0387/chapter12/cmis/;
- Drop ${alfresco.war} and ${shared.war} to $TOMCAT_AS_DIR/webapps;
- Create a database alfresco in MySQL.
drop database if exists alfresco;
create database alfresco character set utf8;
grant all on alfresco.* to 'alfresco'@'localhost.localdomain' identified by 'alfresco' with grant option;
- Create a file named portal-ext.properties at $PORTAL_ROOT_HOME/WEB-INF/classes and add following lines in portal-ext.properties.
dl.hook.impl=com.liferay.documentlibrary.util.CMISHook
cmis.credentials.username=admin
cmis.credentials.password=admin
cmis.repository.url=http://localhost:8080/alfresco/service/api/cmis
cmis.repository.version=1.0
cmis.system.root.dir=Liferay Home
After integration
Going to Content->Document Library, create a folder "Liferay Home" and upload a document under this folder.
Logging in Alfresco as "admin/admin", you would find the folder "Liferay Home" and the document.
Summary
CMIS allows for different CMS systems to interchange information. It is basically JSR-170 with two differences: not Java-specific and document-management-centric. This article showed an example to integrate Alfresco through CMIS. In fact, using CMIS hook we could integrate any CMS systems like Day Software, Dennis Hamilton, EMC, FatWire, IBM, Microsoft, Open Text, Oracle and SAP.
Last but not least, I'd like to send special thanks to Alexander Chow who did an amazing job to make CMIS hook a reality. Also to everyone else that helped during development and providing feedback.