Book Image

Liferay Portal Systems Development

Book Image

Liferay Portal Systems Development

Overview of this book

Liferay portal is one of the most mature portal frameworks in the market, offering many key business benefits that involve personalization, customization, content management systems, web content management, collaboration, social networking and workflow. If you are a Java developer who wants to build custom web sites and WAP sites using Liferay portal, this book is all you need. Liferay Portal Systems Development shows Java developers how to use Liferay kernel 6.1 and above as a framework to develop custom web and WAP systems which will help you to maximize your productivity gains. Get ready for a rich, friendly, intuitive, and collaborative end-user experience! The clear, practical examples in the sample application that runs throughout this book will enable professional Java developers to build custom web sites, portals, and mobile applications using Liferay portal as a framework. You will learn how to make all of your organization's data and web content easily accessible by customizing Liferay into a single point of access. The book will also show you how to improve your inter-company communication by enhancing your web and WAP sites to easily share content with colleagues.
Table of Contents (17 chapters)
Liferay Portal Systems Development
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface

Preface

Liferay portal is one of the most mature portal frameworks in the market, offering many key business benefits that involve personalization, customization, content management systems, web content management, collaboration, social networking, and workflow. Liferay delivers enterprise solutions for portals, publishing content, social and collaboration. Dynamic, content-rich, and social systems are built fast and easily on top of Liferay portal.

Liferay Portal Systems Development is a development cookbook explaining how to use Liferay kernel as a framework to develop custom web and WAP systems, which will help you to maximize your productivity gains. Get ready for a rich, friendly, intuitive, social and collaborative end-user experience! Its explicit instructions are accompanied by plenty of source code. If you are a Java developer who wants to build custom websites and WAP sites using Liferay portal, this book is all you need.

The book shows you exactly how to build dynamic, content-rich, and social systems in Liferay:

  • Use Liferay tools (CMS, WCM, collaborative API, and social API) to create your own websites and WAP sites with hands-on examples

  • Customize Liferay portal using the JSR-286 portlets, hooks, ext plugins, themes, layout templates, web plugins, and diverse portlet bridges

  • Build your own websites with kernel features, such as indexing, workflow, staging, scheduling, publishing, messaging, polling, tracking, auditing, reporting, and more

The clear, practical examples in the sample application that runs throughout this book will enable professional Java developers to build custom websites, portals, intranet, and mobile applications using Liferay portal as a framework. You will learn how to make all of your organization's data and web content easily accessible by customizing Liferay into a single point of access. The book will also show you how to improve your inter-company communication by enhancing your websites and WAP sites, so that you can share content with colleagues.

By the end of this book, you will clearly understand shared documents, discussions, collaborative wikis, social activities, and more in a single, searchable portal. The portal is a great choice for intranets and Internets, easy-to-use, open source, extensible, integrated with other tools and standards. Service builder and Plugins SDK provide portal systems development and customization environments with plugins like ext, themes, layout templates, webs, portlets and hooks.

What this book covers

Chapter 1, Liferay Enterprise Portal, addresses what Liferay can offer your intranets and Internets. Liferay delivers enterprise solutions for portals, publishing content, social and collaboration. Dynamic, content-rich, and social systems will be built fast and easily on top of Liferay portal.

Chapter 2, Service-Builder and Development Environment, discusses how to set up, build, and deploy portal core and plugins in the Eclipse IDE. Then it discusses how to use service builder to generate services and models, and how to add new features on service builder. It also addresses how to populate default data, how to use default project creation and templates, and how to set up fast development of plugins with Tomcat.

Chapter 3, Generic MVC Portlets, first introduces how to develop a portlet project with default templates. Then it addresses how to construct basic MVC portlets by viewing the title and adding an action, and how to build advanced MVC portlets. Finally, it discusses how to build and re-build services, how to bring portlets into Control Panel, how to set security and permissions, dynamic query, and custom SQL.

Chapter 4, Ext Plugin and Hooks, addresses Ext plugin and project default templates, upgrading a legacy Ext environment, deploying processes and what it does, class loader proxy and how it works, hooks and project default templates, portal properties hooks, language properties hooks and multiple languages support, custom JSP hooks, indexer post processors, service wrappers hooks, servlet filters and servlet mappings hooks, and struts actions hooks.

Chapter 5, Enterprise Content Management, introduces video, audio, and image management. It also discusses document and media library and document management, WebDAV implementation, multiple repositories integration, CMIS consumers and producers, web scanning, OCR and record management, content relationship, content authoring, and content archiving.

Chapter 6, DDL and WCM, addresses how to customize web content models and services, to build web content structure and template, to publish web content via asset publisher, to integrate CKEditor and its plugins, to use Expando custom attributes, to leverage DDL (Dynamic Data Lists) and DDM (Dynamic Data Mapping), to manage assets, asset links, tags and categories and to publish assets with asset query.

Chapter 7, Collaborative and Social API, first introduces how to use collaborative tools— wiki, blogs, calendar event, message boards, polls, bookmarks. Then it addresses how to manage more collaborative assets— both core assets and custom assets, and how to collaborate assets— both core assets and custom assets. Afterwards, it introduces how to use social networking, social coding, and social office. Finally, it addresses social activity, social equity capabilities, and OpenSocial API.

Chapter 8, Staging, Scheduling, Publishing, and Cache Clustering, introduces in depth: the Portal-Group-Page-Content (PGPC) pattern, LAR exporting and importing, local staging and publishing, remote staging and publishing, scheduling and messaging, caching and clustering.

Chapter 9, Indexing, Search, and Workflow, addresses web plugins and WAI first. Then it shows how to build web plugins using cas-web and solr-web plugins as examples, how to index and search assets— both portal core assets and plugins custom assets, how to set up solr-web plugin, and how to apply workflow on assets and employ kaleo-web plugin.

Chapter 10, Mobile Devices and Portlet Bridges, introduces layout template plugins, theme plugins, and WAP mobile themes first. The mobile devices detectors and WURFL get addressed, too. Then it addresses the portlet bridges, Struts 2 portlets, JSF 2 portlets, and Spring 3 MVC portlets.

Chapter 11, Common API, addresses user management, password policy, authentication and authorization, LDAP and SSO, tracking and auditing, rules engine and reporting engine, scripting engine, polling, web services, WSRP producers and consumers, and OSGi framework.

Chapter 11 is not present in the book. You can download it from the Packt website at https://www.packtpub.com/sites/default/files/downloads/5986_11.pdf.

What you need for this book

This book uses Liferay portal version 6.1 with the following settings:

  • MySQL database 5.1

  • Java SE 6

  • Liferay portal bundled with Tomcat 7

Although this book explores in depth the various technologies used in Liferay portal, it explains all the topics in an easy-to-understand way. This book is for any Java developers.

If you have some basic knowledge in web applications including servlets and portlets, you will understand better the discussions in this book.

Most importantly, if you like problem-solving and have an eye for perfection, this book is written for you.

We have opened our arms to welcome you to the Liferay world.

Who this book is for

This book is for Java developers who don't need any prior experience with Liferay portal. Although Liferay portal makes heavy use of open source frameworks, no prior experience of using these is assumed.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "By the way, we use $JDK_MAJOR_VERSION to represent the major version of JDK."

A block of code is set as follows:

public interface AuditedModel
{
public long getCompanyId();
// see details in AuditedModel.java
public void setUserUuid(String userUuid);
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

public interface AuditedModel
{
public long getCompanyId();
// see details in AuditedModel.java
public void setUserUuid(String userUuid);
}

Any command-line input or output is written as follows:

svn://svn.liferay.com/repos/public/portal/trunk/portal-impl/src/com/liferay/portlet/documentlibrary/service.xml

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "clicking the Next button moves you to the next screen".

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book— what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title through the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books maybe a mistake in the text or the code we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website, or added to any list of existing errata, under the Errata section of that title.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.