1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.bookmarks.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  
19  /**
20   * <a href="BookmarksFolderLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * <p>
23   * ServiceBuilder generated this class. Modifications in this class will be
24   * overwritten the next time is generated.
25   * </p>
26   *
27   * <p>
28   * This class provides static methods for the
29   * {@link BookmarksFolderLocalService} bean. The static methods of
30   * this class calls the same methods of the bean instance. It's convenient to be
31   * able to just write one line to call a method on a bean instead of writing a
32   * lookup call and a method call.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       BookmarksFolderLocalService
37   * @generated
38   */
39  public class BookmarksFolderLocalServiceUtil {
40      public static com.liferay.portlet.bookmarks.model.BookmarksFolder addBookmarksFolder(
41          com.liferay.portlet.bookmarks.model.BookmarksFolder bookmarksFolder)
42          throws com.liferay.portal.kernel.exception.SystemException {
43          return getService().addBookmarksFolder(bookmarksFolder);
44      }
45  
46      public static com.liferay.portlet.bookmarks.model.BookmarksFolder createBookmarksFolder(
47          long folderId) {
48          return getService().createBookmarksFolder(folderId);
49      }
50  
51      public static void deleteBookmarksFolder(long folderId)
52          throws com.liferay.portal.kernel.exception.PortalException,
53              com.liferay.portal.kernel.exception.SystemException {
54          getService().deleteBookmarksFolder(folderId);
55      }
56  
57      public static void deleteBookmarksFolder(
58          com.liferay.portlet.bookmarks.model.BookmarksFolder bookmarksFolder)
59          throws com.liferay.portal.kernel.exception.SystemException {
60          getService().deleteBookmarksFolder(bookmarksFolder);
61      }
62  
63      public static java.util.List<Object> dynamicQuery(
64          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
65          throws com.liferay.portal.kernel.exception.SystemException {
66          return getService().dynamicQuery(dynamicQuery);
67      }
68  
69      public static java.util.List<Object> dynamicQuery(
70          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
71          int end) throws com.liferay.portal.kernel.exception.SystemException {
72          return getService().dynamicQuery(dynamicQuery, start, end);
73      }
74  
75      public static java.util.List<Object> dynamicQuery(
76          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
77          int end,
78          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
79          throws com.liferay.portal.kernel.exception.SystemException {
80          return getService()
81                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
82      }
83  
84      public static int dynamicQueryCount(
85          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
86          throws com.liferay.portal.kernel.exception.SystemException {
87          return getService().dynamicQueryCount(dynamicQuery);
88      }
89  
90      public static com.liferay.portlet.bookmarks.model.BookmarksFolder getBookmarksFolder(
91          long folderId)
92          throws com.liferay.portal.kernel.exception.PortalException,
93              com.liferay.portal.kernel.exception.SystemException {
94          return getService().getBookmarksFolder(folderId);
95      }
96  
97      public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getBookmarksFolders(
98          int start, int end)
99          throws com.liferay.portal.kernel.exception.SystemException {
100         return getService().getBookmarksFolders(start, end);
101     }
102 
103     public static int getBookmarksFoldersCount()
104         throws com.liferay.portal.kernel.exception.SystemException {
105         return getService().getBookmarksFoldersCount();
106     }
107 
108     public static com.liferay.portlet.bookmarks.model.BookmarksFolder updateBookmarksFolder(
109         com.liferay.portlet.bookmarks.model.BookmarksFolder bookmarksFolder)
110         throws com.liferay.portal.kernel.exception.SystemException {
111         return getService().updateBookmarksFolder(bookmarksFolder);
112     }
113 
114     public static com.liferay.portlet.bookmarks.model.BookmarksFolder updateBookmarksFolder(
115         com.liferay.portlet.bookmarks.model.BookmarksFolder bookmarksFolder,
116         boolean merge)
117         throws com.liferay.portal.kernel.exception.SystemException {
118         return getService().updateBookmarksFolder(bookmarksFolder, merge);
119     }
120 
121     public static com.liferay.portlet.bookmarks.model.BookmarksFolder addFolder(
122         java.lang.String uuid, long userId, long parentFolderId,
123         java.lang.String name, java.lang.String description,
124         com.liferay.portal.service.ServiceContext serviceContext)
125         throws com.liferay.portal.kernel.exception.PortalException,
126             com.liferay.portal.kernel.exception.SystemException {
127         return getService()
128                    .addFolder(uuid, userId, parentFolderId, name, description,
129             serviceContext);
130     }
131 
132     public static void addFolderResources(
133         com.liferay.portlet.bookmarks.model.BookmarksFolder folder,
134         boolean addCommunityPermissions, boolean addGuestPermissions)
135         throws com.liferay.portal.kernel.exception.PortalException,
136             com.liferay.portal.kernel.exception.SystemException {
137         getService()
138             .addFolderResources(folder, addCommunityPermissions,
139             addGuestPermissions);
140     }
141 
142     public static void addFolderResources(
143         com.liferay.portlet.bookmarks.model.BookmarksFolder folder,
144         java.lang.String[] communityPermissions,
145         java.lang.String[] guestPermissions)
146         throws com.liferay.portal.kernel.exception.PortalException,
147             com.liferay.portal.kernel.exception.SystemException {
148         getService()
149             .addFolderResources(folder, communityPermissions, guestPermissions);
150     }
151 
152     public static void addFolderResources(long folderId,
153         boolean addCommunityPermissions, boolean addGuestPermissions)
154         throws com.liferay.portal.kernel.exception.PortalException,
155             com.liferay.portal.kernel.exception.SystemException {
156         getService()
157             .addFolderResources(folderId, addCommunityPermissions,
158             addGuestPermissions);
159     }
160 
161     public static void addFolderResources(long folderId,
162         java.lang.String[] communityPermissions,
163         java.lang.String[] guestPermissions)
164         throws com.liferay.portal.kernel.exception.PortalException,
165             com.liferay.portal.kernel.exception.SystemException {
166         getService()
167             .addFolderResources(folderId, communityPermissions, guestPermissions);
168     }
169 
170     public static void deleteFolder(
171         com.liferay.portlet.bookmarks.model.BookmarksFolder folder)
172         throws com.liferay.portal.kernel.exception.PortalException,
173             com.liferay.portal.kernel.exception.SystemException {
174         getService().deleteFolder(folder);
175     }
176 
177     public static void deleteFolder(long folderId)
178         throws com.liferay.portal.kernel.exception.PortalException,
179             com.liferay.portal.kernel.exception.SystemException {
180         getService().deleteFolder(folderId);
181     }
182 
183     public static void deleteFolders(long groupId)
184         throws com.liferay.portal.kernel.exception.PortalException,
185             com.liferay.portal.kernel.exception.SystemException {
186         getService().deleteFolders(groupId);
187     }
188 
189     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getCompanyFolders(
190         long companyId, int start, int end)
191         throws com.liferay.portal.kernel.exception.SystemException {
192         return getService().getCompanyFolders(companyId, start, end);
193     }
194 
195     public static int getCompanyFoldersCount(long companyId)
196         throws com.liferay.portal.kernel.exception.SystemException {
197         return getService().getCompanyFoldersCount(companyId);
198     }
199 
200     public static com.liferay.portlet.bookmarks.model.BookmarksFolder getFolder(
201         long folderId)
202         throws com.liferay.portal.kernel.exception.PortalException,
203             com.liferay.portal.kernel.exception.SystemException {
204         return getService().getFolder(folderId);
205     }
206 
207     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getFolders(
208         long groupId)
209         throws com.liferay.portal.kernel.exception.SystemException {
210         return getService().getFolders(groupId);
211     }
212 
213     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getFolders(
214         long groupId, long parentFolderId)
215         throws com.liferay.portal.kernel.exception.SystemException {
216         return getService().getFolders(groupId, parentFolderId);
217     }
218 
219     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getFolders(
220         long groupId, long parentFolderId, int start, int end)
221         throws com.liferay.portal.kernel.exception.SystemException {
222         return getService().getFolders(groupId, parentFolderId, start, end);
223     }
224 
225     public static int getFoldersCount(long groupId, long parentFolderId)
226         throws com.liferay.portal.kernel.exception.SystemException {
227         return getService().getFoldersCount(groupId, parentFolderId);
228     }
229 
230     public static void getSubfolderIds(java.util.List<Long> folderIds,
231         long groupId, long folderId)
232         throws com.liferay.portal.kernel.exception.SystemException {
233         getService().getSubfolderIds(folderIds, groupId, folderId);
234     }
235 
236     public static com.liferay.portlet.bookmarks.model.BookmarksFolder updateFolder(
237         long folderId, long parentFolderId, java.lang.String name,
238         java.lang.String description, boolean mergeWithParentFolder,
239         com.liferay.portal.service.ServiceContext serviceContext)
240         throws com.liferay.portal.kernel.exception.PortalException,
241             com.liferay.portal.kernel.exception.SystemException {
242         return getService()
243                    .updateFolder(folderId, parentFolderId, name, description,
244             mergeWithParentFolder, serviceContext);
245     }
246 
247     public static BookmarksFolderLocalService getService() {
248         if (_service == null) {
249             _service = (BookmarksFolderLocalService)PortalBeanLocatorUtil.locate(BookmarksFolderLocalService.class.getName());
250         }
251 
252         return _service;
253     }
254 
255     public void setService(BookmarksFolderLocalService service) {
256         _service = service;
257     }
258 
259     private static BookmarksFolderLocalService _service;
260 }