{{Obsolete}}
This functionality was removed from Alfresco in 5.0.b. The best way to integrate Alfresco and Liferay is the Liferay Documents and Media portlet that uses CMIS.
The DocLib Portlet provides the rich document management capabilities of the Share Document Library page component within a portal. Two types of portlet are provided, enabling you to choose between site-based document libraries or the entire repository view.
In the site-based portlets, you are able to access all of the sites that you are already a member of, plus all public sites.
The Share DocLib Portlets include most of the functionality available in a standard Share Document Library.
The following Document Library features are not available in the DocLib Portlet:
As the Share header does not display in the DocLib Portlet, the following framework functionality is not available:
Refer to the Document Library page component section of the Share User Help for full details of the functionality available.
This section describes how to install and configure the Alfresco DocLib Portlets within Liferay.
Before proceeding with the installation and configuration, ensure the following:
If you are running Liferay and Alfresco on the same machine, you will need to change the port numbers used by the Liferay Tomcat server to prevent conflicts. Locate the following lines in the file <LIFERAY_HOME>/tomcat-6.0.18/conf/server.xml and update the port numbers as below.
<Server port='8105' shutdown='SHUTDOWN'>
<Connector port='8180' protocol='HTTP/1.1'
connectionTimeout='20000'
redirectPort='8443' URIEncoding='UTF-8' />
<Connector port='8109' protocol='AJP/1.3' redirectPort='8443' URIEncoding='UTF-8' />
Add the following to <ALFRESCO_HOME>/tomcat/shared/classes/alfresco/alfresco-global.properties.
authentication.chain=alfrescoNtlm1:alfrescoNtlm,external1:external
external.authentication.proxyUserName=
If you do not have this file then it is likely that Alfresco has not been fully installed. See the steps outlined in Install Tomcat 6 for full instructions.
Copy share.war from your Alfresco Tomcat instance into Liferay's deploy folder.
Locate the file <LIFERAY_HOME>/tomcat-6.0.18/conf/catalina.properties and open it in an editor. Locate the shared.loader property and set it to the following value
shared.loader=${catalina.home}/shared/classes,${catalina.home}/shared/lib/*.jar
Create the directory <LIFERAY_HOME>/tomcat-6.0.18/shared/classes/alfresco/web-extension/ and add the following configuration to a new file share-config-custom.xml
Note: If your Alfresco Tomcat instance is running on another host or a non-standard port, you must modify the endpoint-url parameters to point to the correct location of your repository.
<alfresco-config>
<config evaluator='string-compare' condition='Remote'>
<remote>
<endpoint>
<id>alfresco-noauth</id>
<name>Alfresco - unauthenticated access</name>
<description>Access to Alfresco Repository WebScripts that do not require authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
<identity>none</identity>
</endpoint>
<endpoint>
<id>alfresco-feed</id>
<name>Alfresco Feed</name>
<description>Alfresco Feed - supports basic HTTP authentication</description>
<connector-id>http</connector-id>
<endpoint-url>http://localhost:8080/alfresco/s</endpoint-url>
<basic-auth>true</basic-auth>
<identity>user</identity>
</endpoint>
<connector>
<id>alfrescoCookie</id>
<name>Alfresco Connector</name>
<description>Connects to an Alfresco instance using cookie-based authentication</description>
<class>org.springframework.extensions.webscripts.connector.AlfrescoConnector</class>
</connector>
<endpoint>
<id>alfresco</id>
<name>Alfresco - user access</name>
<description>Access to Alfresco Repository WebScripts that require user authentication</description>
<connector-id>alfrescoCookie</connector-id>
<endpoint-url>http://localhost:8080/alfresco/wcs</endpoint-url>
<identity>user</identity>
<external-auth>true</external-auth>
</endpoint>
</remote>
</config>
</alfresco-config>
Start up first Alfresco and then Liferay. Check that no errors are recorded in the application logs.
Log in to Liferay as an admin user and create a new user account for each of the Alfresco users who you want to have access to the portal. The users must already have been set up with the correct permissions in Alfresco, and the 'Screen Name' of the user in Liferay must match their Alfresco username.
Important! Each of the three Alfresco Share portlets must be deployed to its own Liferay page. There is no support for deploying two or more portlets to the same page.
Community Edition
3.4
Doclib Portlet
Liferay
This section describes how to install and configure the Alfresco DocLib Portlets within GateIn.
Download GateIn Tomcat bundle and follow the step for Liferay installation from 2.1 (Prerequisites) to 2.6 (Create Liferay users) except for 2.2 (Configure Liferay).
Share and GateIn portal must use the same session cookie for ajax requests to be successfully authenticated. Using Liferay this happens by default because Liferay runs as ROOT webapp, with GateIn running on Tomcat 6 the most effective way to achieve the same result is setting emptySessionPath='true' in the HTTP Connector.
If you are running GateIn and Alfresco on the same machine, you will need to change the port numbers used by the GateIn Tomcat server to prevent conflicts. Locate the following lines in the file <GATEIN_HOME>/conf/server.xml and update it as below.
<Server port='8105' shutdown='SHUTDOWN'>
<Connector port='8180' protocol='HTTP/1.1'
connectionTimeout='20000'
emptySessionPath='true'
redirectPort='8443' URIEncoding='UTF-8' />
<Connector port='8109' protocol='AJP/1.3' redirectPort='8443' URIEncoding='UTF-8' />
The only requirement is that a user exists in Alfresco with the same username of the current portal user. Share Portlets will run with the permission of that user.