掲示板

service builder in ext

thumbnail
11年前 に dave ch によって更新されました。

service builder in ext

Regular Member 投稿: 161 参加年月日: 12/02/07 最新の投稿
Hi all,

I am using LR 6.1. I am using service builder in my ext-plugin. When i am writing my service.xml and building service all the impl, persistence, etc classes are being generated but the corresponding table in my postgres DB is not being generated, neither the table.sql is being genetared in my plugin, Any reason for this issue?
Even I want to know is it possible to build service in ext in LR 6.1.?

Thanks in advance
thumbnail
11年前 に Prakash Khanchandani によって更新されました。

RE: service builder in ext

Expert 投稿: 329 参加年月日: 11/02/10 最新の投稿
Starting from Liferay 6.0 service builder is deprecated in the EXT plugin and I guess in Liferay 6.1 it is completely removed.

So in short you can't use service builder in EXT plugin, you can ofcourse create a separate plugin portlet and build your service in that and add the generated *services.jar to the global lib path (in tomcat it would be [tomcat_home]/lib/ext)

Hope this helps.
thumbnail
11年前 に dave ch によって更新されました。

RE: service builder in ext

Regular Member 投稿: 161 参加年月日: 12/02/07 最新の投稿
Hi Prakash,

Thanks for your quick response.

Actually i want to add 2 more fields in my existing portlet which is a out of box portlet. Going for expando is not possible since the portlet is not available in control plane.
If service builder in ext is not possible then what should i do to solve this issue. Any suggestions.

Thanks in advance

dave
thumbnail
11年前 に Vishal Panchal によって更新されました。

RE: service builder in ext

Expert 投稿: 289 参加年月日: 12/05/20 最新の投稿
Hi,

ServiceBuilder in EXT plugins will be deprecated. So according to my understanding you can achieve this using Hook.
Hope it will be useful to you.


Thanks & Regards,
Vishal R. Panchal
thumbnail
11年前 に Hitoshi Ozawa によって更新されました。

RE: service builder in ext

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
Can't use hook to overwrite impl methods which means you have to directly change liferay's source code.
thumbnail
11年前 に dave ch によって更新されました。

RE: service builder in ext

Regular Member 投稿: 161 参加年月日: 12/02/07 最新の投稿
Hi all,

Thanks for your valuable suggestions.

Can i use portlet preferences, so that i have my extra field values in my postgres DB inside my portlet preferences table, and I can retrieve them as well and using some logic around them.
Is it a right thing to proceed with? Can this solve my issue?

Need some suggestions.

Dave
thumbnail
11年前 に Hitoshi Ozawa によって更新されました。

RE: service builder in ext

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
Can i use portlet preferences, so that i have my extra field values in my postgres DB inside my portlet preferences table, and I can retrieve them as well and using some logic around them.


Instead of doing that, why don't you just create a new wrapper entity in service.xml with the extra fields.
thumbnail
11年前 に Stephen Kostas によって更新されました。

RE: service builder in ext

New Member 投稿: 20 参加年月日: 09/11/02 最新の投稿
Hitoshi Ozawa:
Can't use hook to overwrite impl methods which means you have to directly change liferay's source code.


You can override impl methods in Ext Plugins, which is the best practice. There are very few reasons to modify Liferay source directly. emoticon
thumbnail
11年前 に Hitoshi Ozawa によって更新されました。

RE: service builder in ext

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
You can override impl methods in Ext Plugins, which is the best practice. There are very few reasons to modify Liferay source directly.


Please read earlier posts in the thread before posting so we won't have to repeat messages. Your post is not contributing anything to finding the solution to the question in this thread. Tell us what to do and just not want not to do.

That said, we'll welcome any viable solution to the question of this thread.
thumbnail
11年前 に Prakash Khanchandani によって更新されました。

RE: service builder in ext

Expert 投稿: 329 参加年月日: 11/02/10 最新の投稿
Hitoshi Ozawa:
Instead of doing that, why don't you just create a new wrapper entity in service.xml with the extra fields.

wrapper entity in service.xml? this is new for me. Do you mean Wrapper services through a hook? Please explain. Thank you.

dave ch:
Actually i want to add 2 more fields in my existing portlet which is a out of box portlet.


you are saying my existing portlet and then saying out-of-box portlet. By this do you mean:
1) you already have a plugin portlet created and need to modify that.
or
2) you already have a portlet customized or created in EXT and want to modify that.
or
3) do you mean to add custom fields to a liferay out-of-box portlet, like blogs, wiki, calendar, user-admin, announcements etc.

Please clarify.

dave ch:
Going for expando is not possible since the portlet is not available in control plane.


Having an Expando column for an entity does not depend on the portlet being in control panel, you can create expando for any of the entities in liferay. If not through control panel, you can do it programmatically.

Hope this helps
thumbnail
11年前 に dave ch によって更新されました。

RE: service builder in ext

Regular Member 投稿: 161 参加年月日: 12/02/07 最新の投稿

you are saying my existing portlet and then saying out-of-box portlet. By this do you mean:
1) you already have a plugin portlet created and need to modify that.
or
2) you already have a portlet customized or created in EXT and want to modify that.
or
3) do you mean to add custom fields to a liferay out-of-box portlet, like blogs, wiki, calendar, user-admin, announcements etc.

Please clarify.


Actually i want to add 2 more fields in my ddl portlet i.e display date and expiration date.
dave ch]Going for expando is not possible since the portlet is not available in control plane.

Having an Expando column for an entity does not depend on the portlet being in control panel, you can create expando for any of the entities in liferay. If not through control panel, you can do it programmatically.



If this is the case then expando may solve my issue.

Thanks

Dave
thumbnail
11年前 に Hitoshi Ozawa によって更新されました。

RE: service builder in ext

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
Expando fields are be added from the Control Panel but it can be added program using Expando api's.

Even though there are some comments from liferay.com about Expando not degrading performance, it really does degrade as is written in the following page.

This homomorphic data, such as Liferay’s “Expando” tables (and SharePoint Lists) start to degrade in performance because the number of tables is fixed. Whether you have 1 virtual table or 1000, all the data is still in the same real few tables. This means you start to form contention as more and more different apps try to use the read and write from those.


http://www.oscon.com/oscon2011/public/schedule/detail/21536

That's because Expando metadata and data are all saved to a same table whether it be in database or search engine (remember, index optimization is based on table. Even when there is a search engine, actual data is fetched from the database). Because Expando tables are shared between portlets, setting permission on column/row will further decrease performance due to overhead.
However, if you don't use Expando too much and there isn't too many users using the system, performance degrading may not be too much of an issue.

Finally, the following page may also be of some assistance when using expando fields in production.

http://liferay.bdedov.eu/2012/02/exporting-user-custom-fields-in-csv.html

I haven't taken a look at 6.1.0 to see if expando field export is taking permission into consideration (Several different portlets with different roles may be extending User table. Export should only allow users to select Expando fields which a user has permission).
thumbnail
11年前 に dave ch によって更新されました。

RE: service builder in ext

Regular Member 投稿: 161 参加年月日: 12/02/07 最新の投稿
Thanks Hitoshi, for the useful information.

Regards