Chapter 1. Liferay Enterprise Portal
As the world's leading open source portal platform, Liferay is the market's leading provider of open source portal, web publishing, content, social and collaboration enterprise solutions, providing a unified web interface to data and tools scattered across many sources. Within Liferay, a portal is composed of a number of portlets, which are self-contained interactive elements that are written to a particular standard. Dynamic, content-rich, social systems could be built quickly and easily on top of Liferay Portal.
Liferay was created in 2000 to provide an enterprise portal solution for non-profit organizations. In 2004, the company was incorporated under the name Liferay. In 2011/2012, Liferay was going to bring several enhancements and new features such as an improved document library (renamed as document and media library), Dynamic Data Lists (DDL), Dynamic Data Mapping (DDM), setup wizard, mobile device enhancements, multiple repository mounting and apps store (called marketplace).
This book will show you how to develop and/or customize portal systems with Liferay Portal. In this chapter, we will look at:
The features that Liferay Portal has
Why Liferay Portal is an excellent choice for building custom systems
The Liferay Portal framework and architecture for customization
What portal development strategies are and how they work
Finding more technical information about what Liferay is and how it works
So let's begin by looking at exactly what Liferay Portal is and how to customize it.
Liferay functionalities
Liferay currently has the following four main functionalities:
Liferay Portal— JSR-168/JSR-286 enterprise portal platform
Liferay CMS and WCM— JSR-170 content management system and web content management
Liferay social collaboration— Collaboration software such as blogs, calendar, web mail, message boards, polls, RSS feeds, Wiki, presence (AJAX chat client, dynamic friend list, activity wall, and activity tracker), alert and announcement, asset links, asset tagging and classification, social equity, social activities, OpenSocial, and more
Liferay social office— A social collaboration on top of the portal; a dynamic team workspace solution all you have to do is log in and work the way you want to, at your convenience
Generally speaking, a website built by Liferay might consist of a portal, CMS and WCM, collaboration, and/or social office.
Document and media library—CMS
Document and Media Library is a useful tool to manage any media such as basic documents, images, records, videos, and audios with built-in features, for example, dynamic data list, dynamic data mapping, dynamic document type and metadata runtime creation, authoring, versioning, imaging, check-in / check-out, archiving, access control, and indexing. In particular, multiple repositories are supported as well as CMIS. For example, in the document and media library, you can add document types and metadata sets as well as folders and subfolders to manage and publish documents. The document and media library make up the Content Management Systems (CMS) available to power both intranets and extranets. The CMS is equipped with customizable document types and folders, and acts as a web-based shared drive for all your team members, no matter where they are. As content is accessible only to those authorized by administrators, each individual file is as open or as secure as you need it to be.
Web content management—WCM
Your company may have a lot of HTML text, audio, videos, images, records, and documents using different structures and templates, and you may need to manage all of these as well. Therefore, you require the ability to manage a lot of web content, and then publish that web content to intranets or Internets.
We will see how to manage and publish web content within Liferay. Liferay Journal (renamed as Web Content) not only provides the ability to publish, manage, and maintain web content and documents, but it also separates content from layout. WCM allows us to create, edit, and publish web content (formerly called Journal articles) as well as article templates for one-click changes in layout. It has built-in workflow, article versioning, search and metadata.
The portal also provides dynamic data lists (DDL) and dynamic data mapping (DDM). Through DDL and DDM, we can define web forms, document types, metadata sets, and columns of various input styles, such as free form, drop-down lists, combo boxes, date, number, text, and pre-defined list values such as lists of users, order types, inventory types, and more.
Personalization and internalization
All users get a personal space that can be either made public (published as a website with a unique, friendly URL) or kept private. In fact, users can have both private and public pages at the same time. You can also customize how the space looks, what tools and applications are included, what goes into the document and media library, and who can view and access any of this content.
In addition, you can use your own language. Multilingual organizations get out-of-the-box support for up to 42 languages (such as Hindi, Hebrew, Ukrainian, and Romanian), and new languages can be added easily within the portal framework. Users can toggle between different language settings with just one click and produce/publish multilingual documents and web content. You can also easily add other languages in your public pages, private pages, or other organizations.
Workflow, staging, scheduling, and publishing
You can use workflows to manage definitions, instances, and tasks. There are many workflow engines such as jBPM workflow, Kaleo workflow, Activiti BPM, and Intalio | BPMS, and all of these can be integrated easily with Liferay. And then, with a workflow engine as the backend, a portal user can add workflow functionality to any activity such as CMS content approval and the like. In addition, Liferay Portal allows you to define publishing workflows that track changes to web content as well as the pages of the site in which they live.
Staging is a major feature of Liferay Portal. The staging environment allows us to make changes to the site in a specialized staging area, and then publish the whole site to Live when you are done, either locally or remotely. Scheduling is another major feature of Liferay Portal, using a built-in Quartz job scheduling engine. Before going live, you are able to schedule events to publish selected pages with all included content.
The Site snapshot feature means that branching and versioning of staged layouts are supported as well. Thus at the end of a workflow, you would be able to keep the current version of the layout as history; this is done in case the users want to use an old version of the layout at a later time.
Social network and social office
Liferay Portal supports social network— you can easily connect your accounts in Liferay with Facebook, MySpace, Google+, Twitter, and more. Of course, you can also manage your instant messenger accounts in Liferay Portal, such as AIM, ICQ, Jabber, MSN, Skype, and YM. In addition, you are able to track social activities and social equity as well.
Social office gives us social collaboration on top of the portal a full virtual workspace that streamlines communication and builds up group cohesion. All components in social office are tied together seamlessly, getting everyone on the same page by sharing the same look-and-feel. More importantly, the dynamic activity tracking gives us a bird's-eye view of who has been doing what and when within each individual site.
Monitoring, auditing, and reporting
The portal provides abilities to monitor portlets and portal transactions. This includes— but is not limited to— average transaction time per portlet for each phase of the portlet life cycle, minimum and maximum transaction time for each portlet transaction, average time for portal requests (inclusive of all portlets), and minimum and maximum time for each portal request. By the way, statistics are exposed using JMX MBeans.
An audit trail of user actions is required by many organizations. Fortunately, the portal provides audit service, which is a method for storing the audit trail from the portal and plugins. Then the information processed by the audit service plugin can be stored in a log file or database. Note that audit services employ Liferay Lightweight Message Bus and Plugin architecture. The audit service itself is a plugin, handling the processing and logging of the audit messages sent through the Message Bus. Therefore, any plugin can produce audit messages to the audit Message Bus destination.
The Liferay JasperReports Report Engine provides an implementation of Liferay BI using Jasper. JasperReports is an open source Java reporting tool that can write to screen, a printer, or to PDF, HTML, Microsoft Excel, RTF, ODT, CSV (Comma Separated Value) formats, and XML files. The portal provides full integration of JasperReports with its reporting framework. The portal provides the ability to schedule reports and deliver them using document and media library and e-mail. In addition, the portal supports Jasper XLS data sources in its reporting framework.
Tagging
The portal tagging system allows us to tag web content, documents, message board threads, and more, as well as to dynamically publish assets by tags. Tags provide a way of organizing and aggregating content. Folksonomies are a user-driven approach to organizing content through tags, cooperative classification, and communication through shared metadata. The portal implements folksonomies through tags. Taxonomies are a hierarchical structure used in scientific classification schemes. The portal implements taxonomies as vocabularies and categories, which includes category hierarchy, in order to tag contents and classify them.
Integration
In particular, the portal provides a framework so that you can integrate external applications easily. For example, you could integrate external applications such as Alfresco, Documentum, SharePoint, OpenX, LDAP, SSO CAS, Facebook, NTLM, OpenSSO, SiteMinder, SAML 2.0, Orbeon Forms, KonaKart, PayPal, Solr, Coveo, Salesforce.com, SugarCRM, JasperForge, Drools, jBPM, and more. With the portal, integrating standalone Java web applications into the portal is not an easy task. However, Liferay makes it possible to achieve near-native integration with minimal effort using the WAI (Web Application Integrator) portlet or the IFrame portlet.
In addition, the portal uses the OSGi framework, that is, the portal supports a module system and service platform for the Java programming language that implements a complete and dynamic component model. Please refer to http://www.osgi.org for more information.
In a word, the portal offers compelling benefits to today's enterprises— reduced operational costs, improved customer satisfaction, and streamlined business processes.