Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Akram MONCER
*LocalServiceUtil VS *ServiceUtil
23 de Janeiro de 2013 09:53
Resposta

Akram MONCER

Ranking: Regular Member

Mensagens: 106

Data de entrada: 25 de Setembro de 2012

Mensagens recentes

hi any one know what is the difference between *LocalServiceUtil and *ServiceUtil ?

like for example UserLocalServiceUtil and UserServiceUtil

thanks
Gaurav Jain
RE: *LocalServiceUtil VS *ServiceUtil
23 de Janeiro de 2013 11:00
Resposta

Gaurav Jain

Ranking: Regular Member

Mensagens: 146

Data de entrada: 31 de Janeiro de 2011

Mensagens recentes

Check the following post:

http://www.liferay.com/web/jorge.ferrer/blog/-/blogs/liferay-s-architecture-the-service-layer
Hitoshi Ozawa
RE: *LocalServiceUtil VS *ServiceUtil
23 de Janeiro de 2013 14:34
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7949

Data de entrada: 23 de Março de 2010

Mensagens recentes

Simply put, localServiceUtil is a local service and does not require user/password authentication while ServiceUtil is a remote service and require user/password authentication.
Akram MONCER
RE: *LocalServiceUtil VS *ServiceUtil
24 de Janeiro de 2013 00:11
Resposta

Akram MONCER

Ranking: Regular Member

Mensagens: 106

Data de entrada: 25 de Setembro de 2012

Mensagens recentes

hi hitoshi thanks for replay
but when i use a ServiceUtil i works only for the admin if i try it for a simple use i get this exception :
com.liferay.portal.security.auth.PrincipalException
at com.liferay.portlet.shopping.service.permission.ShoppingPermission.check(ShoppingPermission.java:31)

how can change it whitout using the LocalServiceUtil
Hitoshi Ozawa
RE: *LocalServiceUtil VS *ServiceUtil
25 de Janeiro de 2013 04:42
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7949

Data de entrada: 23 de Março de 2010

Mensagens recentes

Give the user which you have logged in a permission. I'm not exactly sure what's you're trying to do. What's the exact method you're trying to use?
Akram MONCER
RE: *LocalServiceUtil VS *ServiceUtil
25 de Janeiro de 2013 06:05
Resposta

Akram MONCER

Ranking: Regular Member

Mensagens: 106

Data de entrada: 25 de Setembro de 2012

Mensagens recentes

hi thanks hitoshi for your response
i try to use something like this ShoppingCouponServiceUtil.addCoupon(code, autoCode, name, description, startDateMonth, startDateDay, startDateYear, startDateHour, startDateMinute, endDateMonth, endDateDay, endDateYear, endDateHour, endDateMinute, neverExpire, active, limitCategories, limitSkus, minOrder, discount, discountType, serviceContext)
but only the admin can excute it how can i give the right to a normal user to execute it.