留言板
Hook requires a portlet? Why?
I was looking at this blog post: http://www.liferay.com/web/jonas.yuan/blog/-/blogs/4639517
And it says "A hook plugin is always combined with a portlet plugin"
But why? I want to write a hook to replace the ldap authentication implementation to use TLS (since that doesn't seem to be supported by the existing code), but I want it to apply to the whole portal. Is that statement just an error, or am I going to run into some fundamental problem trying to effect the entire portal with my hook?
And it says "A hook plugin is always combined with a portlet plugin"
But why? I want to write a hook to replace the ldap authentication implementation to use TLS (since that doesn't seem to be supported by the existing code), but I want it to apply to the whole portal. Is that statement just an error, or am I going to run into some fundamental problem trying to effect the entire portal with my hook?
David H Nebinger,修改在12 年前。
RE: Hook requires a portlet? Why?
Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
It's just wrong. A hook does not always require a portlet, nor does a portlet require a hook...
Certain portlets that integrate and/or extend Liferay functions, such as the so-portlet he mentions, require a hook to make the functionality available not just to the portlet but to other portlets to leverage the functionality in the so-portlet.
But no, you can do hooks just as themselves. I have a number of hooks, mostly jsp overrides, for overriding portal/portlet JSPs, but they are not combined with a portlet.
Your hook should be fine on it's own...
Certain portlets that integrate and/or extend Liferay functions, such as the so-portlet he mentions, require a hook to make the functionality available not just to the portlet but to other portlets to leverage the functionality in the so-portlet.
But no, you can do hooks just as themselves. I have a number of hooks, mostly jsp overrides, for overriding portal/portlet JSPs, but they are not combined with a portlet.
Your hook should be fine on it's own...
Hitoshi Ozawa,修改在12 年前。
RE: Hook requires a portlet? Why?
Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子A hook plugin is always combined with a portlet plugin. For instance, the portlet so-portlet is a portlet plugin for Social Office with hooks. In general, hooks would be very helpful tools to customize the portal without touching the code part of the portal. In addition, you would use hooks to provide patches for the portal systems or social office products.
I think what Yuan is saying is that a hook is used to overwrite parts of portlet plugin (or in other words, codes in a hook is "combined" with codes in a portlet plugin).
I think he's trying to say that you can't overwrite Liferay's core functionalities with a hook.
The most possible reason Yuan said that should be at the time of the blog been written, hooks was just coming out and had fewer functions than now.
Mika Koivisto,修改在12 年前。
RE: Hook requires a portlet? Why?
Liferay Legend 帖子: 1519 加入日期: 06-8-7 最近的帖子
Hook plugins have never required a portlet plugin so the statement is wrong.
Hitoshi Ozawa,修改在12 年前。
RE: Hook requires a portlet? Why?
Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
Following definitions are confusing too, but I like to give Yuan a benefit of a doubt.
•Hooks: allow hooking into the portal core functionality;
•Webs: regular Java EE web modules designed to work with the portal, like ESB (Enterprise Service Bus), SSO (Single Sign-On), etc.
•Ext: ext environment as a plugin.
•Hooks: allow hooking into the portal core functionality;
•Webs: regular Java EE web modules designed to work with the portal, like ESB (Enterprise Service Bus), SSO (Single Sign-On), etc.
•Ext: ext environment as a plugin.