cancel
Showing results for 
Search instead for 
Did you mean: 
resplin
Elite Collaborator
Elite Collaborator

{{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.


Portlet Capabilities


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:


  • The View in Alfresco Explorer action is not available for folders.
  • When viewing the details page for a folder or content item, the Share section does not display.
  • User names do not link to the related Profile page.

As the Share header does not display in the DocLib Portlet, the following framework functionality is not available:


  • Share toolbar: My Dashboard, My Profile, Sites menu, People Finder, Search, Help, Logout
  • Other page components: Wiki, Blog, Calendar, Links, Discussions, Data Lists
  • Site dashboard: Invite, Customize Dashboard, Edit Site Details, Customize Site, Leave Site

Refer to the Document Library page component section of the Share User Help for full details of the functionality available.


Installing and Configuring in Liferay


This section describes how to install and configure the Alfresco DocLib Portlets within Liferay.


Prerequisites


Before proceeding with the installation and configuration, ensure the following:


  • Alfresco is installed and working. Supported versions are Enterprise Edition 3.3 SP1 or later and Alfresco Community 3.4.a or later.
  • Alfresco has been installed using the official installers or is running in a Tomcat 6 container as per the installation instructions.
  • Liferay Portal 5.2.3 is installed and working. The instructions have been written with the Tomcat 6 version in mind. Liferay Portal 6 is not currently supported.
  • Both Alfresco and Liferay have been shut down before performing the configuration steps below.

Configure Liferay


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' />

Configure Alfresco


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.


Deploy the Share Web Application to Liferay


Copy share.war from your Alfresco Tomcat instance into Liferay's deploy folder.


Configure Liferay Share application


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 Alfresco and Liferay


Start up first Alfresco and then Liferay. Check that no errors are recorded in the application logs.


Create Liferay users


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.


Add the Portlets to Liferay


  1. Log in to Liferay as one of the users you have created.
  2. Create a new page and set the layout to one full-sized portlet.
  3. In the Add Application menu, expand Alfresco and select Share: My Document Libraries. Liferay creates the My Document Libraries portlet.
  4. Create another page with the same layout and add the Share: Repository Browser portlet.
  5. Finally, create another full-sized page and add the Share: Site Document Library portlet. You will see a message that this portlet need to be configured before use. Select the portlet Preferences option and then select the Site to which the portlet will be bound.

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




Installing and Configuring in GateIn Portal (Tomcat bundle)


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).


Configure GateIn


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' />

Add Portlets to GateIn


  1. Log in to GateIn as root.
  2. Open the Application Registry (Group -> Administration -> Application Registry)
  3. Click Import Applications. Share Portlets are added under 'Share' category.
  4. Create a new page and drop in one of the portlets (see Liferay instructions for portlets configuration)

View Share portlets


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.


Successfully tested with


  • Alfresco Enterprise 4.0.2.9
  • GateIn 3.4.0 Tomcat 6 bundle