论坛

主页 » Liferay Portal » English » 3. Development

组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
karthik N
Hooks and Ext Plugins Liferay 6.1
2011年12月15日 上午2:17
答复

karthik N

等级: Regular Member

帖子: 106

加入日期: 2011年6月30日

最近的帖子

Hi Guys,
I want to customize the liferay portal..I need to know when we use Hooks ?and when we use Ext plugins? in order to customize the functionality of the liferay portal.
How do we identify to customize the particular class weather we have to use hook or Ext.


Can some one explain this?



Thanks & Regards,
Karthik
Ravi Kumar Gupta
RE: Hooks and Ext Plugins Liferay 6.1
2011年12月15日 上午2:25
答复

Ravi Kumar Gupta

等级: Liferay Legend

帖子: 1041

加入日期: 2009年6月23日

最近的帖子

From LR Dev Guide : Hooks can fill a wide variety of the common needs for overriding Liferay core functionality. Whenever possible, hooks should be used in place of Ext plugins, as they are hot-deployable and more forward compatible. Some common scenarios which require the use of a hook are the need to perform custom actions on portal startup or user login, overwrite or extend portal JSPs, modify portal properties, or replace a portal service with your own implementation.

See this for more http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/hooks
Kaleem Mohammed
RE: Hooks and Ext Plugins Liferay 6.1
2012年9月26日 上午1:09
答复

Kaleem Mohammed

等级: New Member

帖子: 7

加入日期: 2012年4月4日

最近的帖子

Ravi Kumar Gupta:
From LR Dev Guide : Hooks can fill a wide variety of the common needs for overriding Liferay core functionality. Whenever possible, hooks should be used in place of Ext plugins, as they are hot-deployable and more forward compatible. Some common scenarios which require the use of a hook are the need to perform custom actions on portal startup or user login, overwrite or extend portal JSPs, modify portal properties, or replace a portal service with your own implementation.

See this for more http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/hooks


Hi Ravi,

I am looking to import/map Phone and Address from LDAP to Liferay (existing phone and address fields ).

For your information, I am using Liferay 6.1 CE edition.

I am successful in mapping some basic fields such as firstName, lastName, email screenName, jobTitle etc.,

But I am facing issue in import/mapping Phone and Address fields from LDAP.

Can I develop a hook to acheive this (override LDAPImport and LDAPExport ) ? or I need to go with EXT

Any help is highly appreciated...


Regards
Kaleem
Mauro Mariuzzo
RE: Hooks and Ext Plugins Liferay 6.1
2012年9月26日 上午3:20
答复

Mauro Mariuzzo

等级: Regular Member

帖子: 139

加入日期: 2007年7月23日

最近的帖子

I've have resolved a similar requirement (only Phone) for a customer using Ext.

I've explored hook possibilities but, mainly for performance reason, I've found the ext way more powerfull.

In the file attached you'll find the relevant part of my implementation:
  • field mapping is managed by properties (se portal-ext.properties)
  • PortalLDAPUtilExt extend PortalLDAPUtil and is used to merge new mappings with the standard ones
  • CustomPortalLDAPImporterImpl extend PortalLDAPImporterImpl (via spring) and is used to update Liferay from LDAP
  • service override is made by spring (se META-INF/ext-spring.xml)


I know, Ext need more attention than hook. But in some situation it lets you to write a more manageable code.
附件: ext.tar.gz (4.2k)