Hook DTD - 6.0

Alternative Languages: 日本語

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

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

<!ELEMENT portal-properties (#PCDATA)>
<!ELEMENT language-properties (#PCDATA)>
<!ELEMENT custom-jsp-dir (#PCDATA)>
<!ELEMENT service (service-type, service-impl)>
<!ELEMENT service-type (#PCDATA)>
<!ELEMENT service-impl (#PCDATA)>

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

  • admin.default.group.names
  • admin.default.role.names
  • admin.default.user.group.names
  • auth.forward.by.last.path
  • auto.deploy.listeners
  • application.startup.events
  • auth.failure
  • auth.max.failures
  • auth.pipeline.post
  • auth.pipeline.pre
  • auth.token.impl
  • auto.login.hooks
  • captcha.check.portal.create_account
  • captcha.engine.impl
  • control.panel.entry.class.default
  • convert.processes
  • default.landing.page.path
  • dl.hook.impl
  • dl.webdav.auto.unlock
  • dl.webdav.save.to.single.version
  • field.enable.com.liferay.portal.model.Contact.birthday
  • field.enable.com.liferay.portal.model.Contact.male
  • field.enable.com.liferay.portal.model.Organization.status
  • hot.deploy.listeners
  • image.hook.impl
  • javascript.fast.load
  • layout.static.portlets.all
  • layout.template.cache.enabled
  • layout.types
  • 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
  • mail.hook.impl
  • 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
  • portlet.add.default.resource.check.enabled
  • sanitizer.impl
  • servlet.session.create.events
  • servlet.session.destroy.events
  • servlet.service.events.post
  • servlet.service.events.pre
  • session.phishing.protected.attributes
  • terms.of.use.required
  • theme.css.fast.load
  • theme.images.fast.load
  • theme.loader.new.theme.id.on.import
  • theme.portlet.decorate.default
  • theme.portlet.sharing.default
  • theme.shortcut.icon
  • upgrade.processes
  • users.email.address.generator
  • users.email.address.required
  • users.full.name.generator
  • users.full.name.validator
  • users.screen.name.always.autogenerate
  • users.screen.name.generator
  • users.screen.name.validator

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
29276 Views
Average (4 Votes)
The average rating is 4.0 stars out of 5.
Comments
Threaded Replies Author Date
The one property that we need to set that isn't... Andrew Tillinghast February 4, 2011 8:44 AM

The one property that we need to set that isn't available via hook is resource.repositories.root, we set this because we are using the AdvancedFileSystemHook and we have the library on a shared resource.
Posted on 2/4/11 8:44 AM.