You are previewing Liferay Portal Systems Development.
O'Reilly logo
Liferay Portal Systems Development

Book Description

Build dynamic, content-rich, and social systems on top of Liferay with this book and ebook

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

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

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

In Detail

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

  1. Liferay Portal Systems Development
    1. Table of Contents
    2. Liferay Portal Systems Development
    3. Credits
    4. About the Author
    5. Acknowledgement
    6. About the Reviewers
    7. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    8. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    9. 1. Liferay Enterprise Portal
      1. Liferay functionalities
        1. Document and media library—CMS
        2. Web content management—WCM
        3. Personalization and internalization
        4. Workflow, staging, scheduling, and publishing
        5. Social network and social office
        6. Monitoring, auditing, and reporting
        7. Tagging
        8. Integration
      2. Framework and architecture
        1. Service Oriented Architecture
        2. Enterprise Service Bus
        3. Standards
      3. Terminologies
        1. Multi-tenancy
        2. Role-based access control
          1. Resource, role, and permission
          2. User
          3. Group
      4. Systems development
        1. Ext plugin
        2. Hook plugin
        3. Portlet, layout template, and web plugins
        4. Theme plugin
        5. Development strategies
          1. Level I development
          2. Level II development
          3. Level III development
      5. An example: Knowledge base management
      6. More useful information
      7. Summary
    10. 2. Service-Builder and Development Environment
      1. Plugins SDK development environment
        1. Required tools
          1. JDK
          2. Ant
          3. Maven
        2. Databases
          1. MySQL
        3. Application servers
          1. Tomcat
        4. IDE
          1. Eclipse IDE
          2. Workspace
          3. Subclipse
      2. Portal and plugins structure
        1. Portal source code
          1. Portal source code structure
        2. Plugins SDK source code
          1. Plugins SDK structure
        3. Portal runtime structure
          1. Ant target clean
          2. Ant target start
          3. Ant target deploy
          4. What is happening?
        4. Plugins runtime structure
          1. Ant target clean
          2. Ant target deploy
        5. Portal service and implementation
          1. Interface and implementation
          2. JAR-based fix patch
      3. Service-Builder
        1. Ant target build-service
        2. Database structure definition
          1. Author, namespace, and exceptions
        3. Entity
          1. Attribute list declarations
          2. Column
          3. Finder
          4. Reference
          5. Order and tx-required
        4. Reserved names
          1. Reserved alias names
          2. Reserved table names
          3. Reserved column names
          4. Reserved JSON types
        5. Mappings
          1. Data types
          2. Models and services
          3. SQL scripts, properties, and JSON JavaScript
          4. Spring and Hibernate
        6. Element convert-null
        7. Service-Builder improvement
        8. More services
          1. Ant target build-db
          2. Ant target build-lang
          3. Ant target build-wsdd
          4. Ant target build-client
      4. Default data population
        1. Release information
        2. Data population
          1. Database case-sensitive queries
          2. Verifying processes
      5. Default project creation and templates
        1. Plugins default project creation—Ant targets
        2. Plugins default project templates
      6. Fast development
        1. What is happening?
      7. Summary
    11. 3. Generic MVC Portlets
      1. Plugin portlet project
        1. Naming conventions and filter mappings
        2. Portlet project default template
        3. Knowledge base portlet project
      2. Basic MVC portlet
        1. Project structure
          1. Portlet definition
          2. Liferay portlet registration
          3. Liferay portlet display
          4. Liferay plugin package
          5. View specification
        2. Portlet XSD and DTD
          1. Portlet app XSD
          2. Liferay portlet app DTD
          3. Liferay display DTD
          4. The Liferay plugin package DTD
        3. What's happening?
        4. MVC portlet bridge
          1. MVC portlet extension
        5. Portlet JSP/JavaScript/CSS loading
          1. AJAX and render weight
          2. Header JavaScript/CSS and footer JavaScript/CSS
          3. Predefined objects
          4. Direct JSP servlet
        6. What's happening?
      3. Advanced MVC portlet
        1. Portlet bridge extension
        2. Bringing portlets into the Control Panel
        3. Portlet configuration and preferences
          1. Portlet configuration
          2. Portlet preferences
        4. Portlet keys, title, and description
          1. Message
        5. Redirect
          1. Render URL
          2. Action URL
        6. Interacting with the database
      4. Rebuilding services
        1. What's happening?
          1. Model hints
        2. Other databases in plugins
          1. What's happening?
      5. Dynamic query API
        1. Queries in plugins
          1. Dynamic query factory
          2. Dynamic query operations
        2. SQL joins
          1. Joining tables inside a plugin
          2. Joining tables from different plugins
          3. Joining tables from plugins and portal core
      6. Custom query
        1. What's happening?
      7. Security and permissions
        1. Adding resources
          1. What's happening?
        2. Registering permission
          1. Permission algorithm
          2. Permission actions registration
        3. Assigning permissions
        4. Checking permission
          1. What's happening?
      8. Summary
    12. 4. Ext Plugin and Hooks
      1. Ext plugin
        1. Ext plugin project default template
          1. Creating an Ext plugin project
        2. Advanced customization
          1. Advanced configuration
          2. Advanced portal core API overwriting
          3. Advanced portal web overwriting
        3. Upgrading a legacy Ext environment
          1. What's happening?
      2. Deploy processes
        1. What's happening?
          1. Deployer
        2. Sandbox deploy
          1. Sandbox deploy listener
        3. Auto deploy
          1. Auto deploy listener
          2. Auto deployer
        4. Hot deploy
          1. Hot deploy listener
      3. Class loader proxy
        1. Generating the class loader proxy
        2. Sharing plugin services
      4. Hooks
        1. Hook plugin project default template
        2. Liferay hook DTD
        3. Portal properties hooks
          1. Event handlers
          2. Model listeners
          3. What's happening?
        4. Language properties hooks
          1. Multiple languages
          2. What's happening?
        5. Custom JSP hooks
          1. Custom JSP files and path mapping
          2. What's happening?
        6. Indexer post processor hooks
          1. What's happening?
        7. Service wrappers hooks
          1. What's happening?
        8. Servlet filter and servlet filter mappings hooks
          1. What's happening?
        9. Struts actions hooks
          1. What's happening?
      5. Summary
    13. 5. Enterprise Content Management
      1. Image management
        1. Models and services
          1. Models
          2. Base model
          3. Services
          4. Usage
          5. Image processor
          6. Image sprite processor
        2. Permissions
          1. Resource action mapping
        3. Video management
          1. Adding default document types
          2. Video and audio processors
          3. Antivirus scanner
      2. Document management
        1. Models and services
          1. Models
          2. Services
          3. Attachments
        2. Document versioning
          1. Converting document
          2. Comparing versions
          3. Previewing a live document
          4. Document check-in and check-out
          5. Moving document
          6. Document indexing
        3. WebDAV
          1. WebDAV storage
          2. WebDAV models and services
        4. Multiple repositories
          1. Repository interface
          2. Document hooks
          3. Converting repositories
          4. CMIS consumer and producer
          5. SharePoint integration
          6. Documentum integration
          7. Alfresco integration
      3. Records management
        1. Records in Document Library
          1. Record model
          2. Records validation and classification
          3. Records indexing
          4. OCR engines
        2. Building relationship
          1. Model
          2. Services
          3. Portal-instance level relationship
        3. Content authoring
        4. Content archiving
      4. Summary
    14. 6. DDL and WCM
      1. Web content management
        1. Models and services
          1. Models
          2. Services
          3. Comparator services
          4. Journal content services
          5. Journal tokens
          6. Retrieving structures, templates, and articles
        2. Structure
          1. Types
          2. Value format
        3. Template
          1. Language types
          2. Variables and values
          3. Custom CSS
          4. Custom JavaScript
        4. Localization
          1. Localized column
          2. Value format
          3. Localization interface
        5. Indexer
        6. XML security
        7. Sanitizer
          1. Antisamy
        8. ClassName-classPK pattern
      2. WYSIWYG editor
        1. CKEditor integration
          1. CKEditor structure
          2. CKEditor diffs
        2. CKEditor plugins
          1. Custom plugins
      3. Expando—custom attribute
        1. Models and services
          1. Models
          2. Services
          3. Taglib
          4. Data types
        2. Indexer
        3. NoSQL adapter
      4. Dynamic data lists and dynamic data mapping
        1. Models and services
          1. Models
          2. Services
        2. Storage adapter
      5. Asset, tagging, and categorization
        1. Models and services
          1. Models
          2. Services
          3. View count
        2. Tag
          1. Services
          2. Tags cloud
        3. Category
          1. Services
          2. Categories cloud
          3. Category tree
        4. Asset query
          1. Related content
          2. Range query
        5. Asset publishing
          1. Asset renderer framework
      6. Summary
    15. 7. Collaborative and Social API
      1. Collaboration
        1. Wiki
          1. Wiki models
          2. Wiki services
          3. Wiki engines
        2. Blogs
        3. Shared calendar
        4. Announcements
        5. Message Boards
          1. Models
          2. Services
        6. Bookmarks
        7. Polls
      2. Asset management
        1. Software Catalog
          1. Private messaging
          2. Microblogs
        2. Shopping cart
          1. Advanced calendar
          2. Tasks management
        3. Online chat and mail
          1. Chat
          2. Mail
          3. Asset management system
          4. Human resource management
          5. Marketplace
      3. Assets collaboration
        1. Asset ratings
          1. UI taglib liferay-ui:ratings
        2. Asset comments
          1. Model
          2. Service
          3. UI taglib liferay-ui:discussion
        3. Asset flags
          1. UI taglib liferay-ui:flags
        4. Assets subscription
        5. E-mail notification
        6. RSS feeds
        7. Attached model
      4. Social identity repository
        1. Social networking
          1. Models
          2. Services
          3. Social coding
        2. Social office
          1. Models
          2. Services
          3. Hooks
          4. Contacts
        3. Social activity
          1. Models
          2. Services
          3. UI taglib liferay-ui:social-activities
          4. Adding social activity tracking
          5. Requests and activities
          6. Social bookmarks
        4. Social equity
          1. Models
          2. Services
          3. Adding social equity services on custom assets
          4. Social activity statistics and top users
        5. OpenSocial
          1. Gadget models
          2. Gadget services
          3. Shindig services extension
          4. Gadget portlets
      5. Summary
    16. 8. Staging, Scheduling, Publishing, and Cache Clustering
      1. The pattern: Portal-Group-Page-Content
        1. Portal
          1. Base models
          2. Model listener
          3. Portal instance
        2. Group
          1. Services
          2. System groups
          3. User
          4. Layout set
        3. Layout
          1. Layout template
          2. Portlet
      2. LAR export and import
        1. Portlet data handler
          1. Interface
          2. Portlet data context
          3. Portlet data context listener
          4. Services
          5. Portal core assets
          6. Portlet exporter and importer
        2. Setup archive
          1. Configuration action
          2. Portlet preferences and portlet item
      3. Local staging and publishing
        1. Activating staging
        2. Local staging interface
        3. Local staging services
      4. Remote staging and publishing
        1. Activating remote live
        2. Remote staging services
        3. Tunnel-web services
          1. Copying remote layouts
          2. HTTP services
          3. Securing users' information
      5. Scheduling and messaging
        1. Scheduler
          1. Interfaces
          2. Services
          3. Clustering scheduler
        2. Messaging
          1. Scheduling layouts publishing
          2. Scheduling portal core assets and custom assets
      6. Cache clustering
        1. Portal cache interfaces
        2. Ehcache
          1. Replicated cache
          2. Replicated caching with JGroups
          3. Clustered caching via Terracotta
        3. Memcached
        4. Cache clustering
          1. Clustering models and interfaces
          2. Clustering settings
      7. Summary
    17. 9. Indexing, Search, and Workflow
      1. Webs plugins
        1. Web plugin project
          1. Web deployer and listener
        2. Web applications integrator
          1. What's happening?
      2. Indexing and search
        1. Overview
        2. Indexer
          1. Interface
          2. Indexing core assets
          3. Registering custom asset indexers in plugins
          4. Lucene
          5. Solr
        3. Search engine
          1. Interfaces
          2. Search context
          3. Faceted search
          4. Query parser syntax
        4. Look-ahead typing—auto complete
          1. Models and services
          2. AutoComplete
        5. OpenSearch
          1. Interface and services
          2. Configuration
          3. What's happening?
          4. Applying OpenSearch on plugin portlets
      3. Workflow
        1. Kaleo-web models
        2. Kaleo-web services
          1. Custom SQL
          2. Hooks
          3. Web
          4. Spring beans and messaging
        3. Portal workflow services
          1. Global models
          2. Global services
          3. Workflow permissions
        4. Workflow definition
          1. Workflow definition XSD
          2. Kaleo workflow definition
          3. Sample workflow
          4. BPMN 2
        5. Workflow designers
        6. BPMN2 Visual Editor for Eclipse
          1. jBPM and Drools
          2. Activiti
        7. Applying workflow to assets
          1. Portal core assets
          2. Plugin custom assets
      4. Summary
    18. 10. Mobile Devices and Portlet Bridges
      1. Layout template plugins
        1. Layout template
        2. Layout template DTD
        3. Sample layout template
        4. Layout template services
      2. Theme plugins
        1. Theme default template
          1. Default themes
          2. Building themes
          3. look-and-feel DTD
        2. What's happening after deploying themes?
        3. Theme services
          1. Theme factories
        4. Template engines
          1. Template engine services
          2. Template services
          3. Template variables
        5. Alloy UI
          1. Structure—HTML 5
          2. Style—CSS 3
          3. Behavior—YUI 3
        6. Mobile device detectors
          1. WURFL
        7. WAP theme
          1. WAP layout template
          2. jQuery and UI
          3. jQuery mobile
          4. Building a WAP theme
          5. Sample WAP page and page transitions
      3. Portlet bridges
        1. An overview of built-in portlet bridges
          1. Alloy portlet
          2. Base BSF portlet
          3. Scripting portlet
          4. Ruby portlet
          5. Python portlet
          6. Groovy portlet
          7. JavaScript portlet
          8. PHP portlet
          9. MVC portlet
          10. WAI portlet
        2. Vaadin widgets
        3. Sample portlets
          1. OpenLaszlo
          2. JSON
          3. YUI
          4. Ext JS
          5. Dojo Toolkit
          6. DWR—Direct web remoting
          7. jWebSocket
          8. Apache Wicket
      4. Struts 2 portlet
        1. Struts 2 portlet-bridge
        2. Sample Struts 2 portlet
      5. JSF 2 portlet
        1. Portlet faces bridge
          1. JBoss portlet bridge
          2. MyFaces portlet bridge
          3. PortletFaces
        2. Sample ICEfaces 2 portlet
        3. Sample MyFaces 2 portlet
        4. Sample RichFaces 4 portlet
      6. Spring 3 MVC portlet
        1. Spring MVC portlet bridge
        2. Sample Spring 3 MVC portlet
      7. Summary
    19. Index