001
014
015 package com.liferay.portal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class PortletPreferencesServiceUtil {
035
040 public static void deleteArchivedPreferences(long portletItemId)
041 throws com.liferay.portal.kernel.exception.PortalException,
042 com.liferay.portal.kernel.exception.SystemException {
043 getService().deleteArchivedPreferences(portletItemId);
044 }
045
046 public static void restoreArchivedPreferences(long groupId,
047 com.liferay.portal.model.Layout layout, java.lang.String portletId,
048 long portletItemId, javax.portlet.PortletPreferences preferences)
049 throws com.liferay.portal.kernel.exception.PortalException,
050 com.liferay.portal.kernel.exception.SystemException {
051 getService()
052 .restoreArchivedPreferences(groupId, layout, portletId,
053 portletItemId, preferences);
054 }
055
056 public static void restoreArchivedPreferences(long groupId,
057 com.liferay.portal.model.Layout layout, java.lang.String portletId,
058 com.liferay.portal.model.PortletItem portletItem,
059 javax.portlet.PortletPreferences preferences)
060 throws com.liferay.portal.kernel.exception.PortalException,
061 com.liferay.portal.kernel.exception.SystemException {
062 getService()
063 .restoreArchivedPreferences(groupId, layout, portletId,
064 portletItem, preferences);
065 }
066
067 public static void restoreArchivedPreferences(long groupId,
068 java.lang.String name, com.liferay.portal.model.Layout layout,
069 java.lang.String portletId, javax.portlet.PortletPreferences preferences)
070 throws com.liferay.portal.kernel.exception.PortalException,
071 com.liferay.portal.kernel.exception.SystemException {
072 getService()
073 .restoreArchivedPreferences(groupId, name, layout, portletId,
074 preferences);
075 }
076
077 public static void updateArchivePreferences(long userId, long groupId,
078 java.lang.String name, java.lang.String portletId,
079 javax.portlet.PortletPreferences preferences)
080 throws com.liferay.portal.kernel.exception.PortalException,
081 com.liferay.portal.kernel.exception.SystemException {
082 getService()
083 .updateArchivePreferences(userId, groupId, name, portletId,
084 preferences);
085 }
086
087 public static PortletPreferencesService getService() {
088 if (_service == null) {
089 _service = (PortletPreferencesService)PortalBeanLocatorUtil.locate(PortletPreferencesService.class.getName());
090
091 ReferenceRegistry.registerReference(PortletPreferencesServiceUtil.class,
092 "_service");
093 MethodCache.remove(PortletPreferencesService.class);
094 }
095
096 return _service;
097 }
098
099 public void setService(PortletPreferencesService service) {
100 MethodCache.remove(PortletPreferencesService.class);
101
102 _service = service;
103
104 ReferenceRegistry.registerReference(PortletPreferencesServiceUtil.class,
105 "_service");
106 MethodCache.remove(PortletPreferencesService.class);
107 }
108
109 private static PortletPreferencesService _service;
110 }