Liferay Portal 6 Enterprise Intranets
Total Page:16
File Type:pdf, Size:1020Kb
Liferay Portal 6 Enterprise Intranets Build and maintain impressive corporate intranets with Liferay Jonas X. Yuan BIRMINGHAM - MUMBAI Liferay Portal 6 Enterprise Intranets Copyright © 2010 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 published: April 2010 Production Reference: 1230410 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-849510-38-7 www.packtpub.com Cover Image by Karl Swedberg ([email protected]) Credits Author Editorial Team Leader Jonas X. Yuan Aanchal Kumar Reviewer Project Team Leader Amine Bousta Lata Basantani Acquisition Editor Project Coordinator Dilip Venkatesh Shubhanjan Chatterjee Development Editor Proofreaders Mehul Shetty Aaron Nash Lesley Harrison Technical Editors Aditya Belpathak Graphics Alfred John Geetanjali Sawant Charumathi Sankaran Nilesh Mohite Copy Editors Production Coordinators Leonard D'Silva Avinish Kumar Sanchari Mukherjee Aparna Bhagat Nilesh Mohite Indexers Hemangini Bari Cover Work Rekha Nair Aparna Bhagat About the Author Dr. Jonas X. Yuan is a Senior Technical Analyst at CIGNEX. He holds a Ph. D. in Computer Science from the University of Zurich, specializing in 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. Jonas is experienced in Systems Development Life Cycle (SDLC). Previously, he worked as a Project Manager and a Technical Architect in Web GIS (Geographic Information System). He has hands-on skills in J2EE technologies. Most importantly, he has developed a BPEL (Business Process Execution Language) Engine called BPELPower from scratch in the NASA data center. He has a lot of experience with content management and publishing such as Media/Games/Publishing. He is also an expert on Liferay Portal, Content Management Systems (CMS) Alfresco, Ad Server OpenX, BPM Intalio, Business Intelligence Pentaho, LDAP, and SSO. Acknowledgement I would like to thank all my team members at Liferay, specially Raymond Auge, Brian Chan, Bryan Cheung, Jorge Ferrer, Michael Young, 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 of Liferay for providing all the support and valuable information. A special thanks to all my team members at CIGNEX for making this book a reality. I would like to thank Paul Anthony, Munwar Shariff, and Rajesh Devidasani for their encouragement and great support; our sales and presales team, Amit Babaria, Harish Ramachandran, helped me understand what customers are looking at. Our consulting team Robert Chen, Mike Walker, Venkata Challagulla, Michael Venford and Frank Yu presented me the various flavors of Liferay implementations with real- life examples. I am thankful to them. I sincerely thank and appreciate Dilip Venkatesh and Mehul Shetty, Senior Acquisition Editor and Development Editor respectively at Packt Publishing for criticizing and fixing my writing style. Thanks to Aditya Belpathak, Alfred John, Charumathi Sankaran, Shubhanjan Chatterjee and 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 Joshua. About the Reviewer Amine Bousta is a French Senior Technical Analyst in Groupe Open. He holds a French diploma of Computer Engineering (equivalent to master's degree) and a Technology Research Diploma in Artificial Intelligence (neural networks applied to e-commerce). Specialized in JEE, he monitors and studies most of the related technologies and open source products in order to apply them as solutions for various companies' needs. From 2007, his technology watch on open source Java Portal Engines led to Liferay Portal as the most flexible and complete free portlets engine. The Liferay Community Site gave him the opportunity to meet Dr Jonas X. Yuan and read his previous publications, then become the technical reviewer of this book. I would like to warmly thank my family, my dear co-workers, and my friends for not spamming me with their usual pointless technical questions while I was reviewing this book! So... my special thanks to the following List of Nominees in Java Harassment Category: Julien Nicolet, Laurent Witt, Jacques Scius, Nicolas Burg, Olivier Spieser, Angelo Zerr, Olivier Dub, Diana Garzon, Hadrien Beaufils, Mohamadou Kane, and Mohamed Cherroud. And in the Microsoft-Software-Time-Wasting-Questions Category: my beloved mom and sister. ;-) Table of Contents Preface 1 Chapter 1: Introducing Liferay for your Intranet 9 What are we going to build? 9 Hosted discussions 9 Collaborative documents using wikis 10 Team and individual blogs 10 Shared calendars 11 Document stores—CMS 11 Web Content Management—WCM 11 Personalization and internalization 12 Workflow, staging, scheduling, and publishing 12 Social network and Social Office 13 And more... 13 Everything in one place 13 Introducing Palm Tree Publications 14 Liferay portal framework 16 Service Oriented Architecture 16 Enterprise Service Bus 17 Why use Liferay to build an intranet? 18 It has got the features we need 18 It's easy to set up and use 18 It's free and open source 18 It will grow with you 19 It works with other tools 19 It is based on "standards" 20 What else can Liferay do? 21 Corporate extranets 21 Collaborative websites 21 Table of Contents Content management and web publishing 21 Infrastructure portals 22 Finding more information 22 Summary 23 Chapter 2: Setting Up a Home Page and Navigation Structure for the Intranet 25 Experiencing the portal 26 Getting portal pages 26 What's happening? 28 Experiencing portlets 28 Using the portlet container 29 How does the portal work? 29 Working of portlets 30 Portlet lifecycle 31 Terminologies, scope, and hierarchy 32 Setting up the portal 33 Using the Liferay portal bundled with JBoss 5.x in Windows 34 Using Liferay portal bundled with Tomcat 6.x in Linux 35 Clean and restart 36 Setting up production servers 36 Setting up domains 37 Shortening the URL 37 More options for portal installation 38 Flexible deployment matrix 38 Building pages 39 Adding pages 40 Removing pages 41 Adding portlets 42 Removing portlets 42 Changing layout templates 43 Setting up portal pages 44 Managing pages 44 Adding a child page 45 Changing the display order 46 Editing a page 46 Multiple languages 46 Friendly URL 47 Page icon 47 Copying pages 47 Deleting a page 48 Changing the look and feel: themes 48 Customizing portlets 49 Portlet Look and Feel 50 [ ii ] Table of Contents Setting up portlet configuration 51 Navigating the structure of an intranet site 52 Configuring portal 53 Configuring portal paths 54 Customizing portal configuration 55 Adding extended properties files 55 Portal structure 56 Portal context 57 Terms of Use 58 Reminder queries 59 Session settings 60 Layout types 62 Default user public layouts and private layouts 63 Default admin 65 Guest layouts 65 Friendly URL 66 Look and Feel 66 Dock bar menu 68 What's happening? 68 Dock bar menu in themes 70 My Places 70 Database connections 71 JNDI name 72 Properties 72 Populating with default data 73 Transaction isolation 74 Custom SQL 74 Mail configuration 75 Mail session 75 Java-mail 77 Mail hook 78 Bring pages together in action 79 Page Comments 79 Page Ratings 80 Page Templates 81 Page Flags 82 How do you share portlets within a portal page? 83 Configuring Control Panel 84 Administration 85 My Account 85 My Pages 86 Configuration and settings 87 Adding custom portlets 88 What's happening? 89 Summary 89 [ iii ] Table of Contents Chapter 3: Bringing in Users 91 Enterprise, departments, and locations 92 Role-based access control 93 Role and permission 94 User 94 Organization and Location 94 UserGroup and Community 95 Organizations 95 Adding a top-level Organization 95 Managing organizations 97 Adding child organizations 97 Viewing organizations 98 Searching organizations 98 Editing an organization 99 Deleting an organization 100 Assigning users to an organization 101 Using organizations in an effective way 102 Locations 102 Adding a location for the enterprise 102 Adding locations for main organizations 103 Viewing locations 104 Searching locations 104 Editing a location 105 Deleting a location 105 Assigning users to a location 106 Using locations in an effective