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 BookmarksFolderServiceUtil {
035
040 public static com.liferay.portlet.bookmarks.model.BookmarksFolder addFolder(
041 long parentFolderId, java.lang.String name,
042 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 .addFolder(parentFolderId, name, description, serviceContext);
048 }
049
050 public static void deleteFolder(long folderId)
051 throws com.liferay.portal.kernel.exception.PortalException,
052 com.liferay.portal.kernel.exception.SystemException {
053 getService().deleteFolder(folderId);
054 }
055
056 public static com.liferay.portlet.bookmarks.model.BookmarksFolder getFolder(
057 long folderId)
058 throws com.liferay.portal.kernel.exception.PortalException,
059 com.liferay.portal.kernel.exception.SystemException {
060 return getService().getFolder(folderId);
061 }
062
063 public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getFolders(
064 long groupId)
065 throws com.liferay.portal.kernel.exception.SystemException {
066 return getService().getFolders(groupId);
067 }
068
069 public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getFolders(
070 long groupId, long parentFolderId)
071 throws com.liferay.portal.kernel.exception.SystemException {
072 return getService().getFolders(groupId, parentFolderId);
073 }
074
075 public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getFolders(
076 long groupId, long parentFolderId, int start, int end)
077 throws com.liferay.portal.kernel.exception.SystemException {
078 return getService().getFolders(groupId, parentFolderId, start, end);
079 }
080
081 public static int getFoldersCount(long groupId, long parentFolderId)
082 throws com.liferay.portal.kernel.exception.SystemException {
083 return getService().getFoldersCount(groupId, parentFolderId);
084 }
085
086 public static void getSubfolderIds(
087 java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
088 throws com.liferay.portal.kernel.exception.SystemException {
089 getService().getSubfolderIds(folderIds, groupId, folderId);
090 }
091
092 public static com.liferay.portlet.bookmarks.model.BookmarksFolder updateFolder(
093 long folderId, long parentFolderId, java.lang.String name,
094 java.lang.String description, boolean mergeWithParentFolder,
095 com.liferay.portal.service.ServiceContext serviceContext)
096 throws com.liferay.portal.kernel.exception.PortalException,
097 com.liferay.portal.kernel.exception.SystemException {
098 return getService()
099 .updateFolder(folderId, parentFolderId, name, description,
100 mergeWithParentFolder, serviceContext);
101 }
102
103 public static BookmarksFolderService getService() {
104 if (_service == null) {
105 _service = (BookmarksFolderService)PortalBeanLocatorUtil.locate(BookmarksFolderService.class.getName());
106
107 ReferenceRegistry.registerReference(BookmarksFolderServiceUtil.class,
108 "_service");
109 MethodCache.remove(BookmarksFolderService.class);
110 }
111
112 return _service;
113 }
114
115 public void setService(BookmarksFolderService service) {
116 MethodCache.remove(BookmarksFolderService.class);
117
118 _service = service;
119
120 ReferenceRegistry.registerReference(BookmarksFolderServiceUtil.class,
121 "_service");
122 MethodCache.remove(BookmarksFolderService.class);
123 }
124
125 private static BookmarksFolderService _service;
126 }