Forums

Home » Alloy UI » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
En Rico
save an image resource as an entity in service builder
June 22, 2012 12:53 AM
Answer

En Rico

Rank: Junior Member

Posts: 39

Join Date: December 6, 2011

Recent Posts

Hello,

i have a question.
Let's say i make a new entity called image in liferay service builder.
Can anyone tell me, how to save an image or a resource with liferay service builder??
can anyone give me a tip or a good link ?
David H Nebinger
RE: save an image resource as an entity in service builder
June 22, 2012 5:37 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 8583

Join Date: September 1, 2006

Recent Posts

First it should be defined as a blob object.

Second, the entity pojo will have a blob as a member. Set the member with the binary contents of the image prior to save.

Third, pay attention to the forum you're posting to. As a service builder question, this does not belong in the alloy forum.
Hitoshi Ozawa
RE: save an image resource as an entity in service builder
June 24, 2012 12:35 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7952

Join Date: March 23, 2010

Recent Posts

Take a look at the service.xml and source code on ImageLocalServiceImpl.update method. It may give you some ideas.
http://docs.liferay.com/portal/6.1/javadocs-all/com/liferay/portal/service/impl/ImageLocalServiceImpl.html