1
14
15 package com.liferay.portal.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class PortletServiceUtil {
42 public static com.liferay.portal.kernel.json.JSONArray getWARPortlets() {
43 return getService().getWARPortlets();
44 }
45
46 public static com.liferay.portal.model.Portlet updatePortlet(
47 long companyId, java.lang.String portletId, java.lang.String roles,
48 boolean active)
49 throws com.liferay.portal.PortalException,
50 com.liferay.portal.SystemException {
51 return getService().updatePortlet(companyId, portletId, roles, active);
52 }
53
54 public static PortletService getService() {
55 if (_service == null) {
56 _service = (PortletService)PortalBeanLocatorUtil.locate(PortletService.class.getName());
57
58 ReferenceRegistry.registerReference(PortletServiceUtil.class,
59 "_service");
60 MethodCache.remove(PortletService.class);
61 }
62
63 return _service;
64 }
65
66 public void setService(PortletService service) {
67 MethodCache.remove(PortletService.class);
68
69 _service = service;
70
71 ReferenceRegistry.registerReference(PortletServiceUtil.class, "_service");
72 MethodCache.remove(PortletService.class);
73 }
74
75 private static PortletService _service;
76 }