« Back to Hook DTD

Hook DTD - 5.2

Get the original DTD at http://www.liferay.com/dtd/liferay-hook_5_2_0.dtd

<!DOCTYPE hook PUBLIC
	"-//Liferay//DTD Hook 5.2.0//EN"
	"http://www.liferay.com/dtd/liferay-hook_5_2_0.dtd">
<!ELEMENT hook (portal-properties?, language-properties*, custom-jsp-dir?)>

<!ELEMENT portal-properties (#PCDATA)>
<!ELEMENT language-properties (#PCDATA)>
<!ELEMENT custom-jsp-dir (#PCDATA)>

Not all portal properties can be overridden via a hook. The supported properties are:

  • auth.forward.by.last.path
  • application.startup.events
  • auth.failure
  • auth.max.failures
  • auth.pipeline.post
  • auth.pipeline.pre
  • auto.login.hooks
  • captcha.check.portal.create_account
  • default.landing.page.path
  • field.enable.com.liferay.portal.model.Contact.birthday
  • field.enable.com.liferay.portal.model.Contact.male
  • field.enable.com.liferay.portal.model.Organization.status
  • javascript.fast.load
  • layout.static.portlets.all
  • layout.template.cache.enabled
  • layout.user.private.layouts.auto.create
  • layout.user.private.layouts.enabled
  • layout.user.private.layouts.modifiable
  • layout.user.public.layouts.auto.create
  • layout.user.public.layouts.enabled
  • layout.user.public.layouts.modifiable
  • ldap.attrs.transformer.impl
  • login.create.account.allow.custom.password
  • login.events.post
  • login.events.pre
  • logout.events.post
  • logout.events.pre
  • my.places.show.community.private.sites.with.no.layouts
  • my.places.show.community.public.sites.with.no.layouts
  • my.places.show.organization.private.sites.with.no.layouts
  • my.places.show.organization.public.sites.with.no.layouts
  • my.places.show.user.private.sites.with.no.layouts
  • my.places.show.user.public.sites.with.no.layouts
  • passwords.passwordpolicytoolkit.generator
  • passwords.passwordpolicytoolkit.static
  • servlet.service.events.post
  • servlet.service.events.pre
  • session.phishing.protected.attributes
  • terms.of.use.required
  • theme.css.fast.load
  • theme.images.fast.load

You can also add your own com.liferay.portal.model.ModelListener for each Service Builder generated model class. Some examples:

  • value.object.listener.com.liferay.portal.model.User
  • value.object.listener.com.liferay.portlet.journal.model.JournalArticle
  • value.object.listener...

Note that:

  • Simple values are overwritten
  • List values are appended

Also note that while in ext environment you add multiple listener classes in comma delimited list, in hook you can not do that due to the implementation of HookHotDeployListener. You can register add only one listener per model object.

0 Attachments
16212 Views
Average (1 Vote)
The average rating is 3.0 stars out of 5.
Comments
Threaded Replies Author Date
Can you add your on properties to... Smilelws2010 lwz February 10, 2011 11:46 AM
Any change to liferay-hook_6_0_0.dtd? Mike Oliver July 12, 2011 5:41 PM
i am a fresher for this liferay so i want to... Sivachandran Nagendran April 4, 2012 12:27 AM

Can you add your on properties to portal.properties

Ann
Posted on 2/10/11 11:46 AM.
Any change to liferay-hook_6_0_0.dtd?
Posted on 7/12/11 5:41 PM.
i am a fresher for this liferay so i want to know about hook what is meant by hook?
Posted on 4/4/12 12:27 AM.