Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Nicolas Tamayo
Service Interface Instantiation
March 30, 2013 1:03 PM
Answer

Nicolas Tamayo

Rank: Junior Member

Posts: 29

Join Date: October 3, 2012

Recent Posts

Hi Everybody.

I developed a set of service in a portlet plugin, after, i want make use of this services in other portlet plugin, this works properly, but when i want make a instantiation of a model interface, this instantiation is not possible because the EntityImpl is present in the src folder of the first portlet plugin.

I wish make the instantiation of this Interface in the second portlet plugin, but i don't know how.

I hope you can help me!!!

Thanks in advance
Gouse Basha
RE: Service Interface Instantiation
April 1, 2013 11:59 PM
Answer

Gouse Basha

Rank: New Member

Posts: 10

Join Date: November 30, 2012

Recent Posts

Hi Nicolas,

Your portlet war is single war or separete war file.
Nicolas Tamayo
RE: Service Interface Instantiation
April 20, 2013 10:22 AM
Answer

Nicolas Tamayo

Rank: Junior Member

Posts: 29

Join Date: October 3, 2012

Recent Posts

Hi Gouse Basha.

is the second option, are separate war files

thanks for your reply
David H Nebinger
RE: Service Interface Instantiation
April 20, 2013 12:42 PM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 6470

Join Date: September 1, 2006

Recent Posts

Nicolas Tamayo:
I wish make the instantiation of this Interface in the second portlet plugin, but i don't know how.



Use the EntityLocalServiceUtil.createEntity(pk) method.
Remis Baima
RE: Service Interface Instantiation
April 20, 2013 12:50 PM
Answer

Remis Baima

Rank: New Member

Posts: 8

Join Date: November 5, 2010

Recent Posts

Just to exemplify/complement the answer of David: UserLocalServiceUtil.createUser(CounterLocalServiceUtil.increment());