Creato da pastuweb.com
Share My Page
My Social Accounts
Account FaceBook Account LinkedIn Account Twitter Account Google Plus Account Git Hub
Documents and Media Library is one of the most important functionality of Liferay Portal. It allows users to manage documents, images, videos, and other types of documents. This functionality is designed in such a way that metadata is stored in the database, while actual files are stored on pluggable repository stores (File System or AFS or SAN or DB or JCR or others).
 
 
Both File System store and Advance File System store are similar.
Advanced File System stores additionally distributes files in a multiple folder structure to eliminate limitations of the filesystem. The File System store is the default repository store used by Liferay Portal.
Liferay doesn't handle file locking when we use any of these two stores. Hence on production environments, they must be used with Storage Area Network (SAN) with file locking capabilities. Most of the SAN providers support file locking.

 

To get best performance results, it is recommended to use an Advanced File System store with SAN.

 

Liferay can be configured to use the Advanced File System store by using the following properties in portal-ext.properties:
dl.store.impl = com.liferay.portlet.documentlibrary.store.AdvancedFileSystemStore
dl.store.file.system.root = < Location of the SAN directory >
 
Database store
This repository store simply stores files in the Liferay database. Concurrent access to files is automatically managed as files are stored in the database. From the performance point of view, this store will give bad results when compared to File System and Advanced File System stores.
It is not recommended to use this store unless the use of the Media Library is limited. Liferay Portal can be configured to use the Database store by adding the following property in portal-ext.properties:
dl.store.impl = com.liferay.portlet.documentlibrary.store.DBStore
 
JCR store
Java Content Repository (JCR) is the result of the standardization of content repositories used across content management systems. Liferay Portal also provides the JCR store.

 

The JCR store internally uses Apache Jackrabbit.
Apache Jackrabbit also, by default, stores files in a filesystem. It can be also configured to use the database for storing medial library files. For the production environment if we plan to use JCR, it must be configured to store files in the database.
 
The JCR store is a good option for the production environment when it is not possible to use the Advanced File System store with SAN. To configure Liferay to use the JCR store, we need to add the following properties to portal-ext.properties:
dl.store.impl = com.liferay.portlet.documentlibrary.store.JCRStore
 
CMIS store
Content Management Interoperability Services (CMIS) is an open standard that defines services for controlling document management repositories.
It is the latest standard used by most of the content management systems to make content management systems interoperable. It uses web services and RESTful services that any application can access. Liferay provides the CMIS store which can connect to any CMIS-compatible content repositories. The metadata of the Media Library content will be stored in Liferay, and the actual files will be stored in the external CMIS-compatible repository. For example, Alfresco
 
If we have a requirement to integrate the Alfresco content repository with Liferay, we can use the CMIS store which will internally connect with Alfresco using CMIS services. To configure Liferay with the CMIS repository, we need to add the following properties to portal-ext.properties:
dl.store.impl = com.liferay.portlet.documentlibrary.store.CMISStore
dl.store.cmis.credentials.username = < User Name to be used for CMIS authentication >
dl.store.cmis.credentials.password = < Password to be used for CMIS authentication >
dl.store.cmis.repository.url =< URL of CMIS Repository >
dl.store.cmis.system.root.dir = Liferay Home
 
S3 store
Nowadays, companies are moving their infrastructures to the cloud.
Amazon Simple Storage Service (Amazon S3). The Liferay Media Library can be configured to store Media Library files on Amazon S3. This is a good option when the production environment is deployed on the Amazon Cloud infrastructure.
 
To configure Liferay to use Amazon S3 for the Media Library store, we need to add the following properties to portal-ext.properties:
dl.store.impl = com.liferay.portlet.documentlibrary.store.S3Store
dl.store.s3. access.key = < amazon s3 access key id >
dl.store.s3. secret.key = < amazon s3 encrypted secret access key >
dl.store.s3. bucket.name = < amazon s3' s root folder name >