Thursday, 10 April 2014

Understanding and using the Liferay Document Library - Part 1

In this two part blog post I will try to explain how to use the Liferay Document Library to store and manage your documents.

I will be using Liferay version 6.2 CE to illustrate this. Also I won't go into the meta-data details for the documents, for that you can refer to the user guide.

In the first part I will discuss some concepts related to the Document Library. Like the tables being used etc.

In the second part I will show you how to use the API from a Portlet. If you want to directly see that then here is the link.

Liferay is flexible as far as using the repository is concerned. You can connect to any repository of your choice. Like Sharepoint or Documentum. If you are interested in doing that you can refer to this link.

Let's get started by using the repository Liferay provides. First let's add a new folder and upload a document. Navigate to your Portal's Control Panel and click on "Documents and Media".

Next lets create a folder. I created a test folder.

If you have access to the database then you can query the DLFolder. This now has an entry for  the folder we added. Liferay keeps the folder entries in this table.

Now lets add a file to this folder. Let me add an image to this folder called "ControlPanel".

Once published, you can now query the DLFileEntry table in which Liferay keeps all the details for the uploaded documents.

Something interesting happened. Go to your ${liferay.home} -> data folder -> document_library. Now if you see the previous screenshot you will see the treePath  as /15635/. This can be different for you. But this is the sub folder where an entry is created by Liferay for the document we uploaded. Refer to the screenshot below.

This default location for storing files can be changed. If you want to do that please refer to the following link.

Now let's try to use the Liferay API's to work with document library functionality. We will create a Portlet and upload and store a document to Liferay's  document library. You can continue reading this Post here.

No comments:

Post a Comment