留言板

Generate services for existing portal source

thumbnail
Namrata Hangal,修改在11 年前。

Generate services for existing portal source

Regular Member 帖子: 161 加入日期: 10-7-27 最近的帖子
Hi,

Is it possible to generate services for existing classes in portal source code?
For example, I need to use the exportLayoutAsFile method in LayoutExporter. I don't see any class like LayoutExporterLocalServiceUtil that I can use to access that method.

What should be the procedure I need to follow to be able to access this method without a Permissions error?
Michał Kolenda,修改在11 年前。

RE: Generate services for existing portal source

New Member 帖子: 2 加入日期: 12-9-17 最近的帖子
Hi,

Try to use LayoutLocalServiceUtil's exportLayoutsAsFile method. It creates a new LayoutExporter object and calls its exportLayoutsAsFile method.
thumbnail
Namrata Hangal,修改在11 年前。

RE: Generate services for existing portal source

Regular Member 帖子: 161 加入日期: 10-7-27 最近的帖子
Hi Michal,

I did, in fact, use the LayoutLocalServiceUtil but at the end of execution, I get a .zip file instead of a .lar file.
So I thought maybe it's because I need to call a service on LayoutExporter itself?

Here's the link to my other thread (from where it started emoticon) http://www.liferay.com/community/forums/-/message_boards/message/15973608
Michał Kolenda,修改在11 年前。

RE: Generate services for existing portal source

New Member 帖子: 2 加入日期: 12-9-17 最近的帖子
As far as I know, LAR files are actually ZIPs with .lar extensions.
thumbnail
Namrata Hangal,修改在11 年前。

RE: Generate services for existing portal source

Regular Member 帖子: 161 加入日期: 10-7-27 最近的帖子
Hmm.. maybe I can first export using my method and try importing it.
If Liferay rejects it, then it means that .lar is needed or there's something else missing emoticon