001
014
015 package com.liferay.portlet.bookmarks.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 BookmarksEntryServiceUtil {
035
040 public static com.liferay.portlet.bookmarks.model.BookmarksEntry addEntry(
041 long groupId, long folderId, java.lang.String name,
042 java.lang.String url, java.lang.String description,
043 com.liferay.portal.service.ServiceContext serviceContext)
044 throws com.liferay.portal.kernel.exception.PortalException,
045 com.liferay.portal.kernel.exception.SystemException {
046 return getService()
047 .addEntry(groupId, folderId, name, url, description,
048 serviceContext);
049 }
050
051 public static void deleteEntry(long entryId)
052 throws com.liferay.portal.kernel.exception.PortalException,
053 com.liferay.portal.kernel.exception.SystemException {
054 getService().deleteEntry(entryId);
055 }
056
057 public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getEntries(
058 long groupId, long folderId, int start, int end)
059 throws com.liferay.portal.kernel.exception.SystemException {
060 return getService().getEntries(groupId, folderId, start, end);
061 }
062
063 public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getEntries(
064 long groupId, long folderId, int start, int end,
065 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
066 throws com.liferay.portal.kernel.exception.SystemException {
067 return getService()
068 .getEntries(groupId, folderId, start, end, orderByComparator);
069 }
070
071 public static int getEntriesCount(long groupId, long folderId)
072 throws com.liferay.portal.kernel.exception.SystemException {
073 return getService().getEntriesCount(groupId, folderId);
074 }
075
076 public static com.liferay.portlet.bookmarks.model.BookmarksEntry getEntry(
077 long entryId)
078 throws com.liferay.portal.kernel.exception.PortalException,
079 com.liferay.portal.kernel.exception.SystemException {
080 return getService().getEntry(entryId);
081 }
082
083 public static int getFoldersEntriesCount(long groupId,
084 java.util.List<java.lang.Long> folderIds)
085 throws com.liferay.portal.kernel.exception.SystemException {
086 return getService().getFoldersEntriesCount(groupId, folderIds);
087 }
088
089 public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getGroupEntries(
090 long groupId, int start, int end)
091 throws com.liferay.portal.kernel.exception.SystemException {
092 return getService().getGroupEntries(groupId, start, end);
093 }
094
095 public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getGroupEntries(
096 long groupId, long userId, int start, int end)
097 throws com.liferay.portal.kernel.exception.SystemException {
098 return getService().getGroupEntries(groupId, userId, start, end);
099 }
100
101 public static int getGroupEntriesCount(long groupId)
102 throws com.liferay.portal.kernel.exception.SystemException {
103 return getService().getGroupEntriesCount(groupId);
104 }
105
106 public static int getGroupEntriesCount(long groupId, long userId)
107 throws com.liferay.portal.kernel.exception.SystemException {
108 return getService().getGroupEntriesCount(groupId, userId);
109 }
110
111 public static com.liferay.portlet.bookmarks.model.BookmarksEntry openEntry(
112 long entryId)
113 throws com.liferay.portal.kernel.exception.PortalException,
114 com.liferay.portal.kernel.exception.SystemException {
115 return getService().openEntry(entryId);
116 }
117
118 public static com.liferay.portlet.bookmarks.model.BookmarksEntry updateEntry(
119 long entryId, long groupId, long folderId, java.lang.String name,
120 java.lang.String url, java.lang.String description,
121 com.liferay.portal.service.ServiceContext serviceContext)
122 throws com.liferay.portal.kernel.exception.PortalException,
123 com.liferay.portal.kernel.exception.SystemException {
124 return getService()
125 .updateEntry(entryId, groupId, folderId, name, url,
126 description, serviceContext);
127 }
128
129 public static BookmarksEntryService getService() {
130 if (_service == null) {
131 _service = (BookmarksEntryService)PortalBeanLocatorUtil.locate(BookmarksEntryService.class.getName());
132
133 ReferenceRegistry.registerReference(BookmarksEntryServiceUtil.class,
134 "_service");
135 MethodCache.remove(BookmarksEntryService.class);
136 }
137
138 return _service;
139 }
140
141 public void setService(BookmarksEntryService service) {
142 MethodCache.remove(BookmarksEntryService.class);
143
144 _service = service;
145
146 ReferenceRegistry.registerReference(BookmarksEntryServiceUtil.class,
147 "_service");
148 MethodCache.remove(BookmarksEntryService.class);
149 }
150
151 private static BookmarksEntryService _service;
152 }