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.
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.
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 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.
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.
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.
Document Library is one of Liferay's Out of The Box Portlets