Liferay Beginner''''s Guide pot - Pdf 11

class="bi x0 y0 w0 h1"
Liferay
Beginner's Guide
Quick and easy techniques to build, deploy, and maintain
your own Liferay Portal
Robert Chen
Gaurav Barot
Samir Bha
Sandeep Nair
Mahipalsinh Rana

BIRMINGHAM - MUMBAI
Downloa d f r o m W o w ! e B o o k < w w w.woweb o o k . c o m >
Liferay
Beginner's Guide
Copyright © 2011 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system,
or transmied in any form or by any means, without the prior wrien permission of the
publisher, except in the case of brief quotaons embedded in crical arcles or reviews.
Every eort has been made in the preparaon of this book to ensure the accuracy of the
informaon presented. However, the informaon contained in this book is sold without
warranty, either express or implied. Neither the authors, 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 informaon about all of the
companies and products menoned in this book by the appropriate use of capitals. However,
Packt Publishing cannot guarantee the accuracy of this informaon.
First published: December 2011
Producon Reference: 1241111
Published by Packt Publishing Ltd.
Livery Place

Aaron Nash
Indexer
Monica Ajmera Mehta
Graphics
Valenna D'silva
Conidon Miranda
Producon Coordinator
Shantanu Zagade
Cover Work
Shantanu Zagade
About the Authors
Robert Chen is an Architect for Liferay Portal projects. He was a computer game developer
and a soware tesng engineer. He holds an MS degree in Computer Science from California
State University, San Bernardino. His focus was on online banking applicaons. He also has
a bachelor's degree from Wuhan University, China. Mr. Chen was a QA engineer at VMware,
Inc. He later led a team in developing four educaonal computer games for a Florida school
district. He worked on Geographical Informaon Systems (GIS). Mr. Chen has rich experience
in J2EE technologies. He has extensive experience in Content Management Systems (CMS)
including Alfreso. He is an expert in web portal technologies. Mr. Chen has hands-on
experience in 10 Liferay Portal projects.
I would sincerely thank Sarah Cullington (Acquision Editor), Zainab
Bagasrawala (Project Coordinator), Shreerang Deshpande (Development
Editor) at Packt Publishing. Thank you for reviewing my chapters. I
appreciate your invaluable advice – it has helped me improve the quality of
my wring. Thanks also go to Eleanor Duy, Lata Basantani, and the team
at Packt Publishing. It has been a happy experience working together
with you!

I would also thank Dr. Munwar Shari and Dr. Jonas X. Yuan for their
support and encouragement along the way.

encouraging me to write this book.

I appreciate the whole Packt Publishing team for providing connuous
support throughout this project.

Lastly, I want to thank my parents for their encouragement. I specially
thank my wife Hetal and my lile daughter Shreeya for their support
and love.
Sandeep Nair has been working on Liferay for more than two years and has overall
more than ve years of experience in Java and Java EE technologies. He has executed
projects using Liferay in various domains such as Construcon, Financial, and Medical elds
providing soluons such as Collaboraon, Enterprise Content Management, Web Content
Management systems. He has created a free and open source Google Chartlet plugin
for Liferay which has been downloaded and used by people across 90 countries as per
Sourceforge stascs. Besides development, consulng, and implemenng soluons, he has
also been involved in giving trainings in Liferay in other countries. Before he jumped into
Liferay, he has had experience in Java and Java EE plaorms and had worked in EJB, Spring,
Struts, Hibernate, Servicemix. He also has experience in using JierBit, which is an ETL tool.
When he is not coding, he loves to read books and write blogs.
I would like to thank Munwar Shari and Manish Sheladia who trusted in
me and thought me worthy enough to write this book. I would like to thank
Robert Chen for being so supporve from the beginning of the book and
leading the team that too very eciently. I would also like to thank rest
of the co-authors Samir Bha, Mahipalsinh Rana, and Gaurav Barot, who
were there to review and discuss each other's work and make sure we give
quality book to the readers. I am also very grateful to Zainab Bagasrawala,
who took the pains to co-ordinate the chapters and making sure we
deliver the chapter in me, Sarah Cullington and Shreerang Deshpande
for reviewing my work and giving right advice as to what should or should
not be there in the book. Last but not the least, I would like to thank my

enterprise soware soluons. Albert has studied Informaon Technology Engineering and
has a Master in Economic and Financial Management of companies.
Albert is currently working as a freelance soware developer, trainer, and consultant for
internaonal customers. Albert is an open source soware contributor and has released
dierent applicaons for Liferay and Android.
Albert lives in Girona(Spain) and maintains a blog at
.
Aritz Galdos Otermin studied Computer Engineering at UPV / EHU (Euskal Herriko
Unibertsitatea) and Coventry University. Aritz has been working as programmer and soware
architect since 2005 and has specialized in portal development and deployment.
He is especially interested in open source and enjoys developing portlets and integraon
tools for Liferay with other open source projects, such as video conferencing tools and
Android mobile plaorms. He releases his developments in his personal projects page
.
I want to thank every single person that has ever contributed to open
source in any way.
Jordi Carbonell i Soler aer more than eight years working with JEE technologies is
currently a JEE Architect specialized in portal environments. His relaon with Liferay started
in 2007. Since then, he's been working on many Liferay-based portals along all of those
projects' stages: from presales and conceptualizaon to development and installaon;
usually, integrang them with a wide range of third-party tools, such as Alfresco ECM,
Atlassian products, or BPM Engines. Currently, he's working at IN2, one of the rst Spanish IT
companies who bet on Liferay and Alfresco as trending technologies.
www.PacktPub.com
Support les, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support les and downloads related to your book.
Did you know that Packt oers eBook versions of every book published, with PDF and ePub les available?
You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are
entled to a discount on the eBook copy. Get in touch with us at for more
details.

Horizontal vs. vercal portals 10
Time for acon – comparing Yahoo! and YouTube 10
Open source vs. commercial portals 12
Time for acon – nding the source code of Liferay Portal 12
Liferay Portal architecture 14
Web service provider 14
Liferay is exible 15
Liferay is standard compliant 15
Main Liferay Portal features 16
Theme and layout 16
Communies and organizaons 16
Content Management System and Web Content Management 16
Time for acon – watching Liferay Portal portlets in acon 17
Preparaon for Liferay Portal installaon 18
Hardware requirements 18
Time for acon – nding RAM informaon 19
Soware requirements 19
Operang systems 20
Java Development Kit 20
Time for acon – installing JDK 20
Applicaon servers and servlet containers 22
Database servers 23
Time for acon – installing MySQL database server 24
Web browser 26
Table of Contents
[ ii ]
Installing OpenOce 27
Time for acon – installing OpenOce 27
Time for acon – starng OpenOce service 29
Time for acon – checking the OpenOce service 29

Geng an overview of Liferay Portal Architecture 79
Understanding the Liferay building blocks 79
User 81
User group 82
Role 82
Community 83
Organizaon 84
Table of Contents
[ iii ]
Teams 85
Basics of the Control Panel 87
Vising the Control Panel 87
Time for acon – creang a new user 91
Changing Portal's look and feel with themes 93
Time for acon – installing a new theme and applying it to the portal 94
Summary 96
Chapter 4: Tips and Tricks-Advanced Conguraon 97
Renaming our portal 98
Time for acon – changing our portal name 98
SSO with OpenID 99
Time for acon – using OpenID for authencaon 100
Ask users to accept terms before accessing Liferay 102
Time for acon – enabling Terms of Use 103
Time for acon – changing Terms of Use 104
E-mail nocaons 107
Time for acon – enable nocaon for account creaon 107
Adding custom aributes for User 109
Time for acon – giving the opon to add a user's favorite sport 109
OpenOce integraon 112
Time for acon – enabling OpenOce integraon 112

Time for acon – understanding the acons associated with the group 144
User group and page templates 145
Time for acon – creang a page template for the Bowlers user group 145
Summary 149
Chapter 6: Managing Pages, Users, and Permissions 151
Checklist 152
Creang pages for the Neighborhood site 152
Creang pages for Neighborhood communies 153
Time for acon – creang pages for Neighborhood communies 153
Seng page-level aributes to dene page characteriscs 158
Time for acon – providing a HTML tle and friendly URL for a page 159
Exploring the User secon 162
Conguraon for user pages' default porltets 162
Creang an administrator user to manage the Neighborhood site 163
Time for acon – creang a user and assigning an administrator role 163
Eding the user prole 168
Time for acon – modifying user details 168
Assigning users to Neighborhood communies and organizaons 171
Time for acon – assigning a user to communies and organizaons 171
Disabling the opon to register for the site for guest users 174
Time for acon – disabling the Register opon for a guest user 175
Exploring role/permission management in Liferay 176
Creang a role to manage pages of the Neighborhood site 177
Time for acon – creang a role to manage pages 178
Portal scoped roles 181
Community/Organizaon roles 182
Assigning users to community/organizaon administrator role 183
Time for acon – assigning community/organizaon 183
Administrator role 183
More on permissions 187

Time for acon – uploading a video le 214
Time for acon – uploading a PDF le 215
Showing a PDF le link in web content 217
Time for acon – embedding a link for a PDF le 217
Enabling comments for web content 219
Time for acon – enabling comments for content 219
Disclosing decrypted Congress documents 221
Time for acon – displaying documents 221
Managing content 222
Reviewing web content 222
Time for acon – using the web content list portlet 223
Monitoring other content 224
Table of Contents
[ vi ]
Time for acon – adding the asset publisher portlet 225
Converng web content to formaed les 226
Time for acon – adding a le conversion feature 226
Summary 228
Chapter 8: Exploring Communies 229
Prerequisite 230
Seng up an online game using Flash Portlet 230
Time for acon – seng up an online game using Flash Portlet 230
Adding Web Content Display to announce a cricket match 233
Time for acon – announcing a cricket match 234
Using Video Portlet to share Neighborhood videos 236
Time for acon – sharing Neighborhood videos 236
Sharing Neighborhood photos using Image Gallery 239
Time for acon – sharing Neighborhood photos 239
Exploring chat funconality to enable chat between Neighborhood members 243
Time for acon – exploring chat funconality 243

What about payment with credit cards? 276
Shipping cost conguraon 276
Time for acon – conguring the shipping cost 277
Percentage formula for shipping cost calculaon 278
Insurance cost conguraon 278
Time for acon – conguring the insurance cost 278
E-mail conguraon 279
Time for acon – conguring the e-mail templates 280
Shopping items 283
Item categories 283
Time for acon – item category creaon 283
Changing the Parent Category 285
Shopping items 286
Time for acon – item creaon 286
Basic aributes 290
Fields secon aributes 290
Prices secon aributes 291
Images secon aributes 292
Shopping cart 295
Let's do shopping 295
Time for acon – adding items to the shopping cart 295
Item lisng view (category lisng view) 297
Item details view 298
Checkout process 302
Time for acon – making a payment 302
Address details 306
Order conrmaon 306
Order management 308
Time for acon – processing the order 308
Order lisng 309

Implemenng the staging environment 340
Time for acon – conguring staging environments 340
Staging conguraon 344
Publish to Live Now 346
Scheduled publicaon 346
Time for acon – scheduling publicaon of portal changes 347
Summary 350
Appendix A: PayPal Test Account Conguraon 351
Appendix B: Pop Quiz Answers 355
Index 361
Preface
Liferay Portal is a leading horizontal portal product, wrien in Java. It has the power to
provide the Intranets and Extranets of large corporaons. Liferay will allow you to build
your company's portal quickly, eciently, and in a custom way to suit the needs of
your corporaon.
Liferay Beginner's Guide will show you how to set up your own site from scratch. Most
books assume that you have knowledge of portals before working with Liferay and so include
more theory than pracce. However, only enthusiasm is required for reading this book as
the step-by-step instrucons, which follow the creaon of a sample community site, will
make it easy to install and congure Liferay, set up a Liferay Portal instance, and use the
out-of-the-box portlets of Liferay.
By following the logical ow of the chapters and the creaon of the sample site, you will
set up your Liferay site in several quick and easy stages. You will start by installing Liferay in
your applicaon server or servlet container of choice. You will learn how to customize the
look-and-feel of the portal, change the URL of the site, and create your own communies
and organizaons within the portal, then add users to them. By the end of the book, you will
have a fully operaonal Liferay Portal and the condence to maintain and customize it to
meet your needs.
What this book covers
Chapter 1, Planning Your Portal, gives an overview of Liferay Portal– the most popular open

Bookmark, Chat, OpensSocial, Language, Polls, Search. It also covers some of the custom
portlets such as YouTube, SlideShow.
Chapter 9, Seng up an Online Shop, talks about how to set up online shop using the
shopping portlet. It instructs reader on how to congure payment terms, shopping items,
stock, and so on. It also instructs reader on how to manage orders and discounts. It also talks
about end-to-end shopping workow.
Chapter 10, Liferay Server Administraon, instructs reader on how to user liferay's server
administraon features to maintain Liferay Portal server. It talks about server resource
management, logging conguraon, virtual host conguraon, and so on. It also talks
about how to congure staging environment.
Appendix A, PayPal Test Account Conguraon, provides step-by-step guide to set up test
accounts on PayPal’s sandbox environment.


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status