Our documentation has been relocated here, the Liferay Developer Network. Please update your bookmarks!

Liferay Portal’s Documents and Media lets you store files in a number of different ways and lets you access external repositories in addition to the built in document repository. Your administrator can learn how to set options for storing the Documents and Media Library’s files here. To connect the Documents and Media library to external repositories, read on.

Documents and Media allows users to connect to multiple third-party repositories. Some of the features supported with third-party repositories include:

  • Reading/writing documents and folders
  • Document check-in, check-out, and undo check-out
  • Downloading documents
  • Moving folders and documents within the repository
  • Getting revision history
  • Reverting to a revision

Liferay Portal’s Documents and Media can inter-operate with repositories that support the Content Management Interoperability Services (CMIS) standard. CMIS defines a model for interacting with repository files. Liferay Portal supports interoperability through CMIS version 1.1 (the current CMIS version) and earlier. Liferay Portal can access CMIS repositories using AtomPub and Web Services protocols.

dm-repo-types-actions.png

Figure 1: In Documents and Media, external repositories look similar to folders. You can perform supported operations on their files. This figure shows an Alfresco CMIS repository named My Alfresco.

Here are the CMIS repository integration steps:

  1. Adjust portal properties
  2. Synchronize user accounts between Liferay Portal and the repository
  3. Add the repository to Documents and Media

Let’s start with setting portal properties.

Step 1: Adjust Portal Properties

In order to authenticate with the third-party repository, you need to store passwords for the user sessions. You must configure an authentication type that supports storing passwords to the user sessions.

Important: Since authentication with single sign-on (SSO) does not store encrypted passwords in the user sessions, SSO can’t be used with the external repository types.

Let’s configure Liferay Portal for what’s required in authentication. In a portal-ext.properties file in your Liferay Home, set a session.store.password portal property to true:

session.store.password=true

Next, make sure to authenticate the same way on both Liferay Portal and the repository. You can do so by authenticating based on screen name. Set the following company.security.auth.type portal property:

company.security.auth.type=screenName

Alternatively, you can configure both of these properties in the Control Panel under Instance Settings → Authentication.

Step 2: Synchronize the User Accounts

External repository integration requires Liferay Portal users use the same screen name and password as their external repository user. For details on adding and managing users, refer to User Mangement. Make sure to sign in to Liferay Portal as such a user whenever you’re accessing the repository from it.

Adding a Repository mapped to the external repository is the final step.

Step 3: Add the Repository to Documents and Media

The last step is adding a to Documents and Media a Repository to inter-operate with the external repository. Documents and Media can connect with a CMIS repository using the Atom Publishing (AtomPub) protocol or Web Services protocol. Let’s explore accessing a CMIS Repository using AtomPub.

Adding a CMIS Repository that Uses AtomPub

AtomPub is the easiest protocol to specify for communicating with a CMIS repository.

Follow these steps to access a repository with CMIS AtomPub:

  1. Sign in to Liferay Portal as a user that also exists in the external repository and can access files you want to use in that repository.

  2. In Documents and Media Home, click the Add icon (icon-add.png) and select Repository. The New Repository screen appears.

    dm-repo-types-new-repo-config.png

    Figure 2: Here’s the form for accessing a CMIS repository using AtomPub.

  3. Enter an arbitrary Name for the repository and optionally enter a Description.

  4. Click on the Repository Configuration section to access its form. Specify values for the following fields:

    • Repository Type: CMIS Repository (AtomPub)
    • Repository ID: Leave this blank, as Liferay Portal generates the ID automatically
    • AtomPub URL: Enter the AtomPub URL for CMIS per the repository’s documentation. Example URLs are listed below. If you copy them, make sure to replace the [host] and [port] values with your own.
      • Alfresco 5.1 CMIS 1.0: http://[host]:[port]/alfresco/cmisatom
      • Alfresco 5.1 CMIS 1.1: http://[host]:[port]/alfresco/api/-default-/public/cmis/versions/1.1/atom
      • Nuxeo 7.10: http://[host]:[port]/nuxeo/atom/cmis
  5. Click Save

The external repository appears in Documents and Media. You can navigate the repository and manage files.

dm-repo-types-alfresco-site-doclib-file.png

Figure 3: Documents and Media lets you perform CMIS supported actions on external repository files.

Next, let’s access a CMIS repository with Web Services.

Adding a CMIS Repository that Uses Web Services

After adjusting your portal properties and adding any user accounts required by the repository, you can add a Documents and Media Repository that inter-operates with an external repository that supports CMIS with Web Services.

Follow these steps to add such a repository:

  1. In Documents and Media Home, click the Add button and select Repository. The New Repository screen appears.

  2. Enter an arbitrary Name for the repository and optionally enter a Description.

  3. Click on the Repository Configuration section to access its form

  4. For Repository Type:, select CMIS Repository (Web Services).

  5. Enter the web service URLs (WSDL URLs) per your CMIS repository’s documentation. Example URLs are listed after these steps. Make sure to enter URLs for the following services:

    • Web Services ACL Service
    • Web Services Discovery Service
    • Web Services Multi-Filing Service
    • Web Services Navigation Service
    • Web Services Object Service
    • Web Services Policy Service
    • Web Services Relationship Service
    • Web Services Repository Service
    • Web Services Versioning Service

    dm-repo-types-alfresco-ws.png

    Figure 4: Here’s an example of the web service URLs for an Alfresco repository.

  1. Leave Repository ID blank, as Liferay Portal generates the ID automatically.

  2. Click Save

Your repository appears in Documents and Media. You can navigate into the repository and work with files as you do other files in Documents and Media.

Liferay Portal’s CMIS repository integration gives you flexibility to access external repository files in addition to your existing Documents and Media files.

0 (0 Votes)
Liferay Store Types Previous