フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Akram MONCER
*LocalServiceUtil VS *ServiceUtil
2013/01/23 9:53
答え

Akram MONCER

ランク: Regular Member

投稿: 106

参加年月日: 2012/09/25

最近の投稿

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
2013/01/23 11:00
答え

Gaurav Jain

ランク: Regular Member

投稿: 146

参加年月日: 2011/01/31

最近の投稿

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
2013/01/23 14:34
答え

Hitoshi Ozawa

ランク: Liferay Legend

投稿: 7949

参加年月日: 2010/03/23

最近の投稿

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
2013/01/24 0:11
答え

Akram MONCER

ランク: Regular Member

投稿: 106

参加年月日: 2012/09/25

最近の投稿

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
2013/01/25 4:42
答え

Hitoshi Ozawa

ランク: Liferay Legend

投稿: 7949

参加年月日: 2010/03/23

最近の投稿

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
2013/01/25 6:05
答え

Akram MONCER

ランク: Regular Member

投稿: 106

参加年月日: 2012/09/25

最近の投稿

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.