Foren
Generate services for existing portal source
Namrata Hangal, geändert vor 11 Jahren.
Generate services for existing portal source
Regular Member Beiträge: 161 Beitrittsdatum: 27.07.10 Neueste Beiträge
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?
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, geändert vor 11 Jahren.
RE: Generate services for existing portal source
New Member Beiträge: 2 Beitrittsdatum: 17.09.12 Neueste Beiträge
Hi,
Try to use LayoutLocalServiceUtil's exportLayoutsAsFile method. It creates a new LayoutExporter object and calls its exportLayoutsAsFile method.
Try to use LayoutLocalServiceUtil's exportLayoutsAsFile method. It creates a new LayoutExporter object and calls its exportLayoutsAsFile method.
Namrata Hangal, geändert vor 11 Jahren.
RE: Generate services for existing portal source
Regular Member Beiträge: 161 Beitrittsdatum: 27.07.10 Neueste Beiträge
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 ) http://www.liferay.com/community/forums/-/message_boards/message/15973608
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 ) http://www.liferay.com/community/forums/-/message_boards/message/15973608
Michał Kolenda, geändert vor 11 Jahren.
RE: Generate services for existing portal source
New Member Beiträge: 2 Beitrittsdatum: 17.09.12 Neueste Beiträge
As far as I know, LAR files are actually ZIPs with .lar extensions.
Namrata Hangal, geändert vor 11 Jahren.
RE: Generate services for existing portal source
Regular Member Beiträge: 161 Beitrittsdatum: 27.07.10 Neueste Beiträge
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
If Liferay rejects it, then it means that .lar is needed or there's something else missing