Customizing Liferay with Hooks and other Plugins - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Customizing Liferay with Hooks and other Plugins

Description:

Changes are made available as soon as they are deployed ... Simple values are overwritten. List values are appended. Events, model listeners. Events ... – PowerPoint PPT presentation

Number of Views:881
Avg rating:3.0/5.0
Slides: 13
Provided by: life72
Category:

less

Transcript and Presenter's Notes

Title: Customizing Liferay with Hooks and other Plugins


1
Customizing Liferay with Hooks and other Plugins
2
EXT vs. Plugins
  • EXT
  • Large size
  • Monolithic
  • Portal class loader
  • Customize anything
  • Upgrades are difficult
  • Plugins
  • Small size
  • Different types
  • Plugin class loader
  • Customize predefined
  • Upgrades are easy

3
Plugins
  • Plugins
  • Portlets
  • Themes
  • Layout templates
  • Hooks
  • Webs

4
Hooks
  • Hot deployable
  • Changes are made available as soon as they are
    deployed
  • Changes are removed as soon as they are
    undeployed
  • Useful as a light weight customization archive
  • Seven Cogs
  • Social Office

5
Hooks
  • Create /WEB-INF/liferay-hook.xml as defined in
    liferay-hook-.dtd
  • Four elements
  • portal-properties
  • language-properties
  • custom-jsp-dir
  • service

6
Hooks
  • portal-properties
  • Limited set defined in DTD that are most popular
    and applicable
  • Simple values are overwritten
  • List values are appended
  • Events, model listeners
  • Events
  • Startup, service, login, logout, etc
  • Model listeners

7
Hooks
  • language-properties
  • DTD allows for multiple entries so that you can
    modify language bundles per country and per key
  • Specify a bundle with a language code
  • Overlays existing language bundles

8
Hooks
  • custom-jsp-dir
  • Override JSPs in the portal
  • Changes are reversed when undeployed
  • Copies existing xxx.jsp to xxx.portal.jsp
  • Use liferay-utilbuffer to minimize upgrade
    headaches when customizing a JSP
  • Certain portlets have -ext.jsp patterns already

9
Hooks
  • service
  • Override services
  • Override entity models
  • Accessible from Web Content

10
Hooks
  • Limits
  • Order is not guaranteed
  • Use multiple hooks with caution
  • Road map
  • More portal.properties keys
  • Struts actions

11
Class Loading
  • EXT allows native access to portal class loader
  • Plugins can also access the portal class loader
    via PortalClassInvoker
  • Plugins can access other plugins via
    PortletClassInvoker
  • ServiceBuilder simplifies class loading issues
  • MessageBus bypasses class loading issues

12
QA
  • Brian Chan
  • Chief Software Architect
  • Liferay, Inc.
  • Enterprise. Open Source. For Life.
  • bchan_at_liferay.com
Write a Comment
User Comments (0)
About PowerShow.com