Appendix E. Liferay 6.1 Documents API
You may have noticed a glaring omission from the body of this book. Liferay has an API that its Document Library uses to manage, store, and retrieve files to and from the file system; yet there was no mention of it anywhere. Why is this?
It’s for a good reason. This API changed significantly between Liferay 6.0 and Liferay 6.1; and because I wanted the book to apply to both versions, I thought it best to relegate covering this API to an appendix, where we can look at the commonalities and the differences in both versions of Liferay. This way, you can be empowered to use the API regardless of which version you’re on. You won’t encounter code in the body of the book that doesn’t apply to your copy of Liferay, and you still get to find out about the API and how to use it. Hey, I’m looking out for you.
Let’s look at Liferay’s Documents API to see where it’s been, where it’s going, and what it can do for you.
When Liferay first started working with documents, it was out of a necessity to have a way to store files in a file system type of structure on the Web. These files would be displayed in a Document Library portlet that gave users the ability to upload and share documents. Early versions of Liferay had only the Liferay repository as a design goal, so the initial API reflects this design.