Liferay Portlet Display
Total Page:16
File Type:pdf, Size:1020Kb
Liferay Portal Systems Development Build dynamic, content-rich, and social systems on top of Liferay Jonas X. Yuan BIRMINGHAM - MUMBAI Liferay Portal Systems Development Copyright © 2012 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First Edition: May 2009 Second Edition: January 2012 Production Reference: 1190112 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-84951-598-6 www.packtpub.com Cover Image by Rakesh Shejwal ([email protected]) Credits Author Project Coordinator Jonas X. Yuan Joel Goveya Reviewers Proofreaders Piotr Filipowicz Lesley Harrison Christianto Sahat Kurniawan Stephen Silk Szymon V. Gołębiewski Indexer Acquisition Editor Tejal Daruwale Sarah Cullington Graphics Lead Technical Editor Manu Joseph Hyacintha D'Souza Production Coordinator Technical Editors Aparna Bhagat Ankita Shashi Manasi Poonthottam Cover Work Aparna Bhagat Sakina Kaydawala Azharuddin Sheikh Copy Editors Leonard D'Silva Brandt D'Mello About the Author Dr. Jonas X. Yuan is an expert on Liferay Portal and Content Management Systems (CMS). As an open source community contributor, he published four Liferay books from 2008 to 2010. He is also an expert on Liferay integration with Ad Server OpenX, different search engines, enterprise contents including videos, audios, images, documents, records and web contents, social media, and other technologies, such as, BPM Intalio and Business Intelligence Pentaho, LDAP, and SSO. He holds a Ph.D. in Computer Science from the University of Zurich, where he focused on Integrity Control in Federated Database Systems. He earned his M.S. and B.S. degrees from China, where he conducted research on expert systems for predicting landslides. Previously, he worked as a Project Manager and a Technical Architect in Web GIS (Geographic Information System). He is experienced in Systems Development Lifecycle (SDLC) and has deep, hands on, skills in J2EE technologies. He developed a BPEL (Business Process Execution Language) Engine called BPELPower from scratch in the NASA data center. As the chief architect, Dr. Yuan led and successfully launched several large scale Liferay/Alfresco projects for millions of users each month. He has worked on the following books: Liferay Portal Enterprise Intranets, 2008, ISBN 13: 978-1-847192-72-1; Liferay Portal 5.2 Systems Development, 2009, ISBN 13: 978-1-847194-70-1; Liferay Portal 6 Enterprise Intranets, 2010, ISBN 13: 978-1-849510- 38-7; and Liferay Portal User Interface Development, 2010, ISBN 978-1-849512-62-6. Acknowledgement I would like to thank all team members at Liferay; especially Raymond Auge, Brian Chan, Jorge Ferrer, Michael Young, Bryan Cheung, Jerry Niu, Ed Shin, Craig Kaneko, Brian Kim, Bruno Farache, Thiago Moreira, Amos Fong, Scott Lee, David Truong, Alexander Chow, Mika Koivisto, Julio Camarero, Douglas Wong, Ryan Park, Eric Min, John Langkusch, Marco Abamonga, Ryan Park, Eric Min, John Langkusch, Marco Abamonga, Michael Han, Samuel Kong, Nate Cavanaugh, Arcko Duan, Richard Sezov, Joshua Asbury, Shuyang Zhou, Michael Saechang, Juan Fernández, James Falkner, Olaf Kock, Zsolt Berentey, Dennis Ju, Sergio Gonzalez, Zsolt Balogh, Jonathan Mak, Eduardo Lundgren, Iliyan Peychev, Bruno Basto, Jonathan Lee, Aaron Delani, and Angelo Jefferson of Liferay for providing all the support and valuable information. Much thanks to all my friends in the Liferay community. I sincerely thank and appreciate Sarah Cullington and Hyacintha D'Souza, Acquisition Editor and Lead Technical Editor respectively at Packt Publishing for criticizing and fixing my writing style. Thanks to Joel Goveya, Sakina Kaydawala, Azharuddin Sheikh, Ankita Shashi, Manasi Poonthottam, and the entire team at Packt Publishing; it is really joyful to work with them. Last but not least, I would like to thank my parents and my wife, Linda, for their love, understanding, and encouragement. My special thanks to my wonderful and understanding kid, Josua. About the Reviewers Piotr Filipowicz is a technical architect and software developer with eo Networks S.A., Poland. He is an expert in Content Management Systems (CMS). He currently holds the position of a team leader in a group tasked with developing Liferay- based software. His accomplishments in enhancing and creating various Liferay components are evident in the number of successful implementations. His experience and knowledge are supported by certifications as a Liferay Portal Administrator, Sun Certified Web Component Developer for the Java Platform, Sun Certified Programmer for the Java 2 Platform. Since 2002 he has created various kinds of IT systems, from desktop applications through CMS applications supporting large banking and financial systems. His main interest lies in web applications. He uses Java and J2EE technologies on a daily basis, but his mind is open to other technologies and solutions. He holds a Master's in Software Systems from Politechnika Białostocka, Poland. Christianto Sahat Kurniawan is a software engineer who has been using Java as his programming language since 2001, and using Liferay since 2007. After having experience implementing Liferay for a big global bank and few other companies while working in Singapore and Germany, he decided to start a company focusing on enterprise portal development and training. You can read his blog at www.javaenterpriseportal.com. I would like to thank the Liferay team, especially Jorge Ferrer, Olaf Kock, Amos Fong, and Ray Augé, who have contributed a lot in answering questions on Liferay's forum. And for the rest of Liferay team who have created a great open source software. Szymon V. Gołębiewski is the Chief of Competence Center for Portals at eo Networks S.A.—a Poland-based company noted in Deloitte Technology Fast 50. In his work, Szymon and his team focus on using Liferay as a tool for bringing best solutions for the company's clients. His team is responsible for commencing usability tests, preparing in-depth analysis of customer needs and delivering stable tools for company developers. One of his competences is managing product cycle of Liferay inside his company with all custom-made plugins and portlets. His vast knowledge of internet and usability standards gives him a useful advantage, when participating in Liferay programs like 100 PaperCuts program, Community Leadership, BugSquad. His commitment to Liferay community development has resulted in participating at the East Coast Symposium 2011 as a speaker. www.PacktPub.com Support files, eBooks, discount offers, and more You might want to visit www.PacktPub.com for support files and downloads related to your book. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub. com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. http://PacktLib.PacktPub.com Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. Why Subscribe? • Fully searchable across every book published by Packt • Copy and paste, print and bookmark content • On demand and accessible via web browser Free Access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access. This book is dedicated to: my wife Linda, my son Joshua, and my parents, Daxian and Zhengzi. This book would not have been possible without your love and understanding. Thank you from the bottom of my heart. Table of Contents Preface 1 Chapter 1: Liferay Enterprise Portal 7 Liferay functionalities 8 Document and media library—CMS 8 Web content management—WCM 8 Personalization and internalization 9 Workflow, staging, scheduling, and publishing 9 Social network and social office 10 Monitoring, auditing, and reporting 10 Tagging 11 Integration 11 Framework and architecture 12 Service Oriented Architecture 12 Enterprise Service Bus 13 Standards 14 Terminologies 15 Multi-tenancy 16 Role-based access control 17 Resource, role, and permission 18 User 19 Group 19 Systems development 20 Ext plugin 22 Hook plugin 22 Portlet, layout template, and web plugins 24 Theme plugin 24 Development strategies 25 Level I development 25 Level II development 26 Level