Liferay is a Gartner Magic Quadrant Leader for the Sixth Year! Find out why
« Back to Portlets

Document Library Portlet

Alternative Languages: 日本語

Liferay CMS provides one central place to aggregate and manage all your content. Each community within Liferay Portal gets its own separate Document Library, which is equipped with customizable folders and act as a web-based shared drive for all your team members, no matter where they are. Because content is accessible only by those authorized by the administrator, each individual file is as open or as secure as you need it to be.

Features #

Document library portlet provides document management that can be backed by different persistence systems (see below). It includes check in / check out, meta data, and versioning features. Document file formats may be converted at the time of upload, if necessary.

You can add as many subfolders as you want under any folder that you have permission for. You can setup the permissions for each folder and file individually as needed. Each folder and file have individual WebDAV URL, which you can use to access the file. If that file is protected with permissions, then user is asked for credentials with prompt.

Users can rate and comment documents in document library. Each file can also contain several versions and version history is available as a list.

Using Different Persistence Systems #

Out of the box, Liferay provides hooks into various persistence systems which can be configured in the portal.properties file:

    #
    # Set the name of a class that implements
    # com.liferay.documentlibrary.util.Hook. The
    # document library server will use this persist documents.
    #
    #dl.hook.impl=com.liferay.documentlibrary.util.AdvancedFileSystemHook
    #dl.hook.impl=com.liferay.documentlibrary.util.CMISHook
    dl.hook.impl=com.liferay.documentlibrary.util.FileSystemHook
    #dl.hook.impl=com.liferay.documentlibrary.util.JCRHook
    #dl.hook.impl=com.liferay.documentlibrary.util.S3Hook

In the latest release of Liferay, the FileSystemHook is used as default. It is by far the quickest mechanism since it saves directly to the server's file system and does not use any DB or translation layer. If you expect to have a significant number of files (and, therefore, fear hitting the file system limit for number of files in a given folder), you should use the AdvancedFileSystemHook. This hook divides up the data into smaller groups. Along with a hook into Amazon S3, Liferay also provides hooks to a JCR (JSR-170) using Jackrabbit or CMIS.

Configuration #

The configuration of the document library portlet consists of five different parts: setup, permission, export / import, sharing and scope. Some of them are exactly the same as for other portlets, so they will not be covered in this article. However, setup and scope contain the settings that are document library portlet specific.

Setup #

Setup contains three categories: Folders Listing, Documents Listing and Ratings. Folders Listing has setting for the Root Folder, which will be used as a starting point for the document library. You can create a new root folder, if you do not have any yet. Then you can select whether or not to show breadcrumbs, search and subfolders. “Folders for Page” determines the number of folders to show on one page. You can also select which columns are shown.

Document Listing has configuration for documents contained in folders. You can choose whether or not to show the search bar and how many documents to list on a one page. It is also possible to setup which columns to show for documents. Current list contains the columns that are currently shown and available list contains the columns that are still available.

In Ratings configuration you can turn on and off comment ratings.

Scope #

You can choose the scope of the document library. It can be current community or current page. If you choose current community, then the document library is community wide, but if you choose current page, then that document library is related to that current page only.

File #

Each file have their original name, but it is possible to change it in Liferay. You can also update the file and get version history for it. Each file can have both title and description, and also additional tags.

Users can rate and comment on files. You can see both your own personal rate and average rate for the file. Each file can have WebDAV URL and HTTP URL in the same way as folders.

Screenshots #

References #

Document Library is one of Liferay's Out of The Box Portlets

6 Attachments
111129 Views
Average (3 Votes)
The average rating is 1.6666666666666667 stars out of 5.
Comments
Threaded Replies Author Date
Does this one describe version 5.1.2? Julien Aubert February 18, 2009 5:42 AM
Hi, i am newbe,just started working on liferay.... kusha choudhary March 11, 2010 1:57 AM
I am using 5.2.3, and I want to know if in the... li guicheng May 7, 2010 1:02 AM
Hi i am using Liferay-6.0.6 and added Document... Amirtha Mira September 27, 2011 3:33 AM
I'm getting broken image links. nicholas dipiazza October 5, 2012 7:43 AM

Does this one describe version 5.1.2?
Posted on 2/18/09 5:42 AM.
Hi, i am newbe,just started working on liferay. I wanted to show meta-data in the document library, I am not able to figure out how to do that, it would be a great help if anyone could tell me how to go about it.
Posted on 3/11/10 1:57 AM.
I am using 5.2.3, and I want to know if in the "Update File Entry" and I select the new file(with the same name but changed in content), and liferay will replace the old one, set a new version but do not changed the file URL?
Posted on 5/7/10 1:02 AM.
Hi i am using Liferay-6.0.6 and added Document Library in Community. I have 2 role called user and admin..I want user only add the files and admin should have full rights to the files.. But my problem is when the user add the file they have al rights by default.. Plz.. help me.........
Posted on 9/27/11 3:33 AM.
I'm getting broken image links.
Posted on 10/5/12 7:43 AM.