Liferay Portal 6 EnterpriseIntranets
Build and maintain impressive corporate intranetswith Liferay
Jonas X. Yuan
rPAfKTl °Pen source*I I # IV* IV I I community experience distilled
PUBLISHING
BIRMINGHAM - MUMBAI
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 Itfecycle 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
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
Table ofContents
Chapter 3: Bringing in Users 91
Enterprise, departments, and locations 92
Role-based access control 93Role 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 101Using 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 105Assigning users to a location 106Using locations in an effective way 106
Organization settings 107Organization types 107
Organization forms 108
Overriding assignment and membership 109
Hierarchy, tree, and Shared Global 109Organization hierarchy 110
Organization tree 110Shared Global 110
User groups 111
Adding a user group 111
Managing user groups 112Viewing user groups 112
Searching user groups 113Editing a user group 113Deleting user groups 113Assigning users to a user group 113
Users 114
Adding users 114What's happening? 116
Adding more users 116
Table ofContents
Adding users in bulk 117
Creating an account on the fly 117
What to do when a user forgets the password? 118
Managing users 118
Viewing users 119
Searching for users 119
Editing a user profile 120
Deactivating a user 122
Activating a user 123
Deleting a user 123
Impersonating a user 124
Using the Actions tab 124
User settings 124
User forms 125
Overriding user-related properties 125
Authentications 126
General configuration 126What's happening? 127
Basic authentication 128
Auto login 128
LDAP authentication 129
What's happening? 130
Using LDAP effectively 131
LDAP authentication chain 132
CAPTCHA 132
SSO authentication 133
What's happening? 134
OpenID authentication 136
NTLM authentication 136
Open SSO authentication 137
SiteMinder authentication 138
Authentication token 139
Roles 140
Adding a role 140What's happening? 141
Managing roles 141
Viewing roles 141
Searching roles 142
Editing a role 142
Deleting roles 142
Assigning members 142
Using roles in an effective way 143
What's happening? 144
Authorization 145
Permission 145
Permissions in scope 147
Assigning portal-level permissions 148
Table of Contents
Assigning individual portlet permissions 150
Using permissions in an effective way 150
Permission algorithms 151
What's happening? 152
Data migration 153
Summary 154
Chapter 4: Forums, Categorization, and Asset Publishing 155
Message Boards 156
Managing categories 156
Adding categories 156
Editing categories 158
Deleting categories 159
Managing threads 159Add threads 160
Edit threads 161
Delete threads 162
Managing posts 162
Adding posts 163
Editing posts 163
Banning users 164
Deleting posts 164
Viewing posts 165
Searching posts 165
Viewing My Posts 165
Viewing Recent Posts 165
Viewing Statistics 166
Viewing Banned Users 166
Subscribing categories and threads 166
Unsubscribing from categories and threads 167
What's happening? 168
Customizing Message Boards 168
Setup 168
What's happening? 171
Ban and unban users 172
Thread views 172
Using Message Boards as a mailing list 173
Message Boards in scope 173
Friendly URL 175
Archive, Export, and Import 175
Portlet configuration 177
Assigning permissions 178The permissions on Message Boards portlet 178
Permissions on Message Boards content 180
Permissions on category 181Permissions on message 183
Using Message Boards effectively 184
Category hierarchy 185
Table of Contents
Semantics and Ontology 185
Categorization 185
Tagging assets 186
Folksonomies 186
Taxonomies 187
Tags administration 188
Tagsportlet 188
Categories portlet 190
Tags configuration 192
Tags publishing 193
Assigning permissions 194Permissions on portlet 194
Permissions on tags 195
Permissions on tag, vocabulary, and category 195
Tags in scope 196
Using tags effectively 197
Folksonomies 197
Taxonomies 197
What makes tags interesting? 198
Category Tree 199
Why it doesn't merge both kinds of tags using ontology 199
Asset Publisher 200
Main features 200
Configuration 201
Selecting assets manually 202
Selecting assets dynamically 204
Flexible operators support 206
Customization 207
What's happening? 207
Enhancement 208
Configurable look and feel 208
Share assets across groups 208
Summary 209
Chapter 5: Wikis, Web Forms, and Polls 211Wikis 212
Managing nodes 212
Adding nodes 212
Editing a node 214
Deleting a node 214
Viewing RSS feeds 214
Importing pages 215
Managing pages 216
Adding pages 216
Viewing pages 219
Searching pages 220
Adding comments 222
Table ofContents
Adding ratings 223
Subscribing nodes and Wiki pages 224What's happening? 224
Assigning permissions 224Permissions on the Wiki portlet 225
Permissions on Wiki 226
Permissions on Wiki nodes 227
Permissions on Wiki pages 228
Using the Wiki portlet effectively 228
Characteristics 228
Pros and cons 229
What can Wikis be used for? 229
Using Liferay wikis 230Classic mode 231
Creole mode 232
HTML mode 232
Plain text mode 232
Configuration 233What's happening? 233
Wiki in scope 235
Wikis in communication 236
Enhancement 236
Publishing wiki pages 236
Why the Wiki Display portlet? 238
Assigning permissions 238
What's happening? 240
Converting documents with OpenOffice 241How to integrate OpenOffice 241
Configuration 241What's happening? 242
Convert documents 242
Web forms 244
The Web Form portlet 244How does it work? 244
View mode 244
Edit mode 245What's happening? 246
Assign permissions 247Enhancement 248
Alloy Ul Forms 248Orbeon Forms 250How does it work? 251Create forms 251
Polls 252The Polls portlet 252
Editing a Question 254
Table of Contents
Deleting a Question 254
Viewing Votes 255
What's happening? 255
Features 255
The Polls Display portlet 256
How to achieve it? 256
What's happening? 257
Features 258
Assigning permissions 258
The Permissions on Polls portlet 258
Permissions on the Polls Display portlet 259
Permissions on Polls 260Permissions on Polls Questions 260
Using polls effectively 262Polls versus surveys 263
Polls in scope 263
Use Polls through JSON services 264
Enhancement 265
Summary 265
Chapter 6: Blogs, WYSIWYG Editors, and RSS 267
Blogs 268
Adding entries 268
Managing entries 270Editing entries 270
Deleting entries 270
Searching entries 271
Giving your rating 272
Employing RSS feeds 272
Flagging inappropriate content 273Social bookmarks 273
Adding comments 274
What's happening? 276
Assigning permissions 277
Permissions on portlet 277
Permissions on Blogs entries 278
Permissions on Blogs entry 279
Using blogs effectively 281
Blogs types 281
The Blogs portlet 282
Setup 283
What's happening? 284
Asset render framework, search, indexing, and social activity 284
Tags and categories 285
Blogs in scope 286
Friendly URL 287
Blogs in communication 287
Enhancement 287
Table of Contents
Publishing blogs 288
The Recent Bloggers portlet 288
What's happening? 289
Enhancement 290
The Blogs Aggregator portlet 290
What's happening? 291
Enhancement 292
WYSIWYG editors 292
Upgrading FCKeditor 293
End user features 294
Inserting images 296
What's happening? 298
Inserting links 299
Link to documents 300
Link to pages 301
Link to images 302
What's happening? 302
Insert flashes, tables, smileys, and special characters 303
What's happening? 305
Editing source 306
Customization 307
What's happening? 307
Adding more plugins in FCKEditor 308
Using different WYSIWYG editors 310
The WYSIWYG editor in portlets 311
The WYSIWYG portlet 311
Enhancement 312
RSS 312
The RSS portlet 313
What's happening? 314
The Weather portlet 315What's happening? 316
Announcements and Alerts 317
Managing entries 318
Why Announcements portlet? 320
What's happening? 321
Assigning permissions 322
What's different between two portlets? 323
Enhancement 323
Using RSS effectively 324
RSS specification 325
How does it work? 326
Summary 326
Table ofContents
Chapter 7: Roll Out to Other Teams 329
What's a community? 330
Adding a community 331
Managing communities 333
Viewing communities 333
Searching communities 334
Editing a community 334
Deleting a community 336
Managing pages 336Viewing pages 336
Importing and exporting pages 337
Updating look and feel of pages 339
Uploading a logo 340
Merging pages 342
Monitoring pages 342
Sitemap344
Bringing users into the communities 345
Assigning users 346
Assigning User Roles 347
Join 348
Leave 348
Requesting membership 349
Assigning permissions 351Permissions on the portlet Enterprise Admin Communities 351
Permissions on communities 352
What's the difference between community and organization? 354
What's happening? 356
Settings 356
Configuration 357
Enhancement 357
Site templates and page templates 358
Page templates 358Managing page templates 358
Assigning permissions 360
Applying page templates 362
What's happening? 363
Site templates 364
Managing site templates 364
Building site templates 365
Permissions on site templates 366
Applying site templates 368
What's happening? 369
Virtual hosting 370
Setting up virtual hosting 371
Using virtual hosting effectively 372
What's happening? 373
Table ofContents
Setup 373
Staging, workflow, and publishing 374
Staging 374
Activating staging 375
What's happening? 376
Publishing locally 376Publishing pages 376
What's happening? 378
Workflow 378Activating workflow 379
Creating task proposals 380Assigning permissions 381
Enhancement 381
Scheduling and remote publishing 382How to publish 382Options 384Scheduler 384
What's happening? 385Setup 386
Employing community tools 386
My Communities portlet 387
Bookmarks portlet 388Configuration 389
Assigning permissions 389What's happening? 391
Directory portlet 392Setup 392
Invitation portlet 393Setup 393What's happening? 393
Summary 394
Chapter 8: CMS and WCM 395The Image Gallery portlet 396
Managing folders 396Adding sub-folders 397Updating folders 398
Managing images 399Viewing images as a slideshow 400Searching images 401Editing images 401
Deleting images 402
Exporting and Importing 402
Assigning permissions 403Permissions on portlet 403Permissions on Image Gallery 404
Table of Contents
Permissions on folders 404
Permissions on images 405
What's happening? 406
Setup 406
Images in scope 407
Customization 408
Persist for images 409
Setting up the image size in database 409
Customizing default images 410
Enhancement 411
Why WebDAV? 411Setup 412
What's happening? 413
hie Document Library portlet 413
Managing folders 414
Adding sub-folders 415
Updating folders 416
Managing documents 417
Adding documents in bulk 417
Adding shortcuts 418
Viewing documents 419
Searching documents and shortcuts 420
Editing documents and shortcuts 420
Deleting documents and shortcuts 421
Viewing version history 421
Giving your rating 421
Adding comments 422
Exporting and Importing 422
Assigning permissions 422
Permissions on the portlet 422
Permissions on Document Library 423
Permissions on folders 424
Permissions on documents 424
Permissions on shortcuts 426
Publishing documents 426
Document Library Display 426
Recent Documents 427
What's happening? 427
Setup 427
Configuration 428
Document presentation 429
Check-in and check-out lockable documents 430
Documents in scope 431
Document persistence 432
Setup 432
When do we use Advanced File System Hook? 433
Why JCR Jackrabbit? 434
Enhancement 435
Table of Contents
Web Content Management portlet 436
Managing structures 436Viewing structures 438
Editing structures 439
Deleting structures 440
What's happening? 440
Managing templates 443
Viewing templates 444
Editing templates 445
Deleting templates 446
What's happening? 446
Managing Web Content 448Viewing articles 450
Editing articles 451
Deleting articles 452
Managing feeds 452
Setup 453
Assigning permissions 453
Permissions on portlet 454
Permissions on Web Content Management 455
Permissions on Web Content 456Permissions on structures, templates, and feeds 457Enhancement 457
What's happening? 458Building structures 459
Creating templates 459
Constructing articles 460
Setup 461
Configuration 462
Customization 464
Default tokens 464
Custom tokens 465
Default templates 466
Publishing Web Content 466
The Web Content Display portlet 466
The Web Content List portlet 468Other WCM tools 470Nested Portlets 470The XSL Content portlet 471
Summary 472
Chapter 9: Social Office, Hooks, and Custom Fields 473The Chat portlet 474
Sample of a Chat portlet 474
Checking for online friends 474
Beginning with chatting 475
Folder structure 476
Table ofContents
Employing AJAX 476
Setting up a Chat portlet 477
Access on the portlet 478
Configuration of a Chat portlet 478
Service model 479
Enhancement 479
The Mail portlet 480
Working of a Mail portlet 480
Managing e-mails 480
Configuring e-mail accounts 481
Checking e-mail 482
Sending e-mail 482
Assigning permissions 483
Setup 483
Mail Engine settings 484
The mail repository 485
Configuration 485
Access on the portlet 486
Enhancement 486
Using the Mail portlet effectively 487
SMS Text Messenger 487
SMS Text Messenger portlet 488
What's happening? 489
Accessing on the portlet 489
Mail Engine 490
Enhancement 490
How to fully install Social Office 490
The SO theme 491Structure 491
Configuration 492
How does it work? 493
Setup 495
The SO portlet 496
Structure 498
Setup 501How does it work? 502
What's happening? 503
Enhancement 505
The Extending Calendar portlet 505
Task Management System 505
Today's Event 507
The Contacts portlet 508
Setup 508
Configuration 510
How does it work? 511
What's happening? 511
Service model 512
[xv]
Table ofContents
Enhancement 512
Hooks 512
Setup 513What's happening? 515
Portal Properties Hooks 515
Language Properties Hooks 515Custom JSP Hooks 516Portal Service Hooks 517Enhancement 517
Custom Fields 518
Managing custom fields 518Adding custom fields 518Viewing custom fields 520Adding/updating values for custom fields 521
Applying custom fields on any resources 522
Assigning permissions 522Permissions on portlet 523Permissions on Expando columns 523Enhancement 524
What's happening? 524Configuration 524Customization 525Custom attribute display 526Enhancement 527
Summary 527
Chapter 10: Search, WAP, CRM, Widgets, Reporting and Auditing 529Federated search 530The Search portlet 530What's happening? 531
Configuration 533Customization 533
OpenSearch in plugins 534How does it work? 534Web services 535RESTful services
535CMIS
536CSZ Search 537How does it work? 537What's happening? 538
Maps search 538How does it work? 539
What's happening? 539
What's OpenSearch? 540Design principles 540OpenSearch specification 540
Web Content Search 542
Table of Contents
Setup 542
What's happening? 543
Configuration 543
Lucene search engine 544
Searching Engine Optimization 545
Sitemap 545Customizing sitemaps for pages 546
What's happening? 547XML sitemap format 547
Pluggable Enterprise Search 548
Caching settings 549
Configure Hibernate caching 550
Setting up EHCache caching 551Customization 551
Indexing settings 553
Lucene search 553
Index storage 554
Indexer framework 555
Solr search 556
Install Solr instance 556
Configuring the Solr plugin 557
What's happening? 558
Plugins management 559
Plugins installation 559The Plugin Installer portlet 559
Plugins administration 560Auto Deploy 560
What's happening? 561
Plugins configuration 562
What's happening? 563
WAP 563
Jedi Mobile theme 564
Structure 564
How does it work? 564
What's happening? 564
iPhone theme 565
How does it work? 565
What's happening? 565
iPhone Redirect theme 566How does it work? 566
What's happening? 566
Reporting 567
JasperReports Engine 567
The Reports portlets 567
Setup 569
Structure 570
[ xvii ]
Table ofContents
Assign permissions 571
What's happening? 573
Audit service 574
Audit hook 574
How does it work? 574
What's happening? 575
The Audit portlet 576How does it work? 576
The Service model 576
What's happening? 577
Document Library Record 577How does it work? 578
The Service model portlet 578
What's happening? 578
CRM 579
CRM—Salesforce.com 580How does it work? 580
Widgets and gadgets 580
Widgets—Netvibes 581How does it work? 581
Setup 581
What's happening? 582
Mash-ups 583
The Widget Consumer portlet 584How does it work? 584
Summary 585
Chapter 11: Ongoing Admin Tasks 587
Systems administration 588
Server management 588
Resources 588Shutdown 589
Log levels 589
Properties 590
File upload 590
Mail 591What's happening? 591
Instances management 592Updating portal instances 592
Adding portal instances 593
What's happening? 594
Monitoring portal and portlets operations 595Setup 595
Database read-writer 596
Setup 596
What's happening? 597
Table ofContents
Database sharding 597
Setup 598
What's happening? 599
Portal administration 600
Password policies 601
Assigning permissions 602
What's happening? 603
Portal settings 604
General information 605
Users 606
Email notifications 606
Display settings 607
How does it work? 607
What's happening? 608
Monitoring live users' activities 612
How does it work? 613
What's happening? 613
Clustering - high availability 613
HTTP services 615
Configuring modjk 615
Configuring Tomcat 617
Configuring JBoss 617
Configuring portal 618
Database replication and clustering 618
Repository clustering 619
UrIRewrite filter 621
Configuration 621
Cloud Computing 622
Data backup and migration 623
Data backup 624
Data migration 624
Database migration 625
Repository migration 625
What's happening? 626
Performance tuning 626
Integrating with Alfresco, SSO CAS,and LDAP 629
Alfresco, LDAP and SSO CAS 630How does it work? 633
Alfresco web client as a set of portlets 633How does it work? 634
Full Integration—Liferay, Alfresco, LDAP,and SSO CAS 635How does it work? 636
What's happening? 637
Top Related