1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.bookmarks.service;
24  
25  
26  /**
27   * <a href="BookmarksEntryLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * <code>com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService</code>
37   * bean. The static methods of this class calls the same methods of the bean
38   * instance. It's convenient to be able to just write one line to call a method
39   * on a bean instead of writing a lookup call and a method call.
40   * </p>
41   *
42   * <p>
43   * <code>com.liferay.portlet.bookmarks.service.BookmarksEntryLocalServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService
50   * @see com.liferay.portlet.bookmarks.service.BookmarksEntryLocalServiceFactory
51   *
52   */
53  public class BookmarksEntryLocalServiceUtil {
54      public static com.liferay.portlet.bookmarks.model.BookmarksEntry addBookmarksEntry(
55          com.liferay.portlet.bookmarks.model.BookmarksEntry model)
56          throws com.liferay.portal.SystemException {
57          BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
58  
59          return bookmarksEntryLocalService.addBookmarksEntry(model);
60      }
61  
62      public static java.util.List dynamicQuery(
63          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
64          throws com.liferay.portal.SystemException {
65          BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
66  
67          return bookmarksEntryLocalService.dynamicQuery(queryInitializer);
68      }
69  
70      public static java.util.List dynamicQuery(
71          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
72          int begin, int end) throws com.liferay.portal.SystemException {
73          BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
74  
75          return bookmarksEntryLocalService.dynamicQuery(queryInitializer, begin,
76              end);
77      }
78  
79      public static com.liferay.portlet.bookmarks.model.BookmarksEntry updateBookmarksEntry(
80          com.liferay.portlet.bookmarks.model.BookmarksEntry model)
81          throws com.liferay.portal.SystemException {
82          BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
83  
84          return bookmarksEntryLocalService.updateBookmarksEntry(model);
85      }
86  
87      public static com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryPersistence getBookmarksEntryPersistence() {
88          BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
89  
90          return bookmarksEntryLocalService.getBookmarksEntryPersistence();
91      }
92  
93      public static void setBookmarksEntryPersistence(
94          com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryPersistence bookmarksEntryPersistence) {
95          BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
96  
97          bookmarksEntryLocalService.setBookmarksEntryPersistence(bookmarksEntryPersistence);
98      }
99  
100     public static com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryFinder getBookmarksEntryFinder() {
101         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
102 
103         return bookmarksEntryLocalService.getBookmarksEntryFinder();
104     }
105 
106     public static void setBookmarksEntryFinder(
107         com.liferay.portlet.bookmarks.service.persistence.BookmarksEntryFinder bookmarksEntryFinder) {
108         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
109 
110         bookmarksEntryLocalService.setBookmarksEntryFinder(bookmarksEntryFinder);
111     }
112 
113     public static com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderPersistence getBookmarksFolderPersistence() {
114         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
115 
116         return bookmarksEntryLocalService.getBookmarksFolderPersistence();
117     }
118 
119     public static void setBookmarksFolderPersistence(
120         com.liferay.portlet.bookmarks.service.persistence.BookmarksFolderPersistence bookmarksFolderPersistence) {
121         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
122 
123         bookmarksEntryLocalService.setBookmarksFolderPersistence(bookmarksFolderPersistence);
124     }
125 
126     public static com.liferay.portal.service.persistence.ResourcePersistence getResourcePersistence() {
127         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
128 
129         return bookmarksEntryLocalService.getResourcePersistence();
130     }
131 
132     public static void setResourcePersistence(
133         com.liferay.portal.service.persistence.ResourcePersistence resourcePersistence) {
134         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
135 
136         bookmarksEntryLocalService.setResourcePersistence(resourcePersistence);
137     }
138 
139     public static com.liferay.portal.service.persistence.ResourceFinder getResourceFinder() {
140         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
141 
142         return bookmarksEntryLocalService.getResourceFinder();
143     }
144 
145     public static void setResourceFinder(
146         com.liferay.portal.service.persistence.ResourceFinder resourceFinder) {
147         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
148 
149         bookmarksEntryLocalService.setResourceFinder(resourceFinder);
150     }
151 
152     public static com.liferay.portal.service.persistence.UserPersistence getUserPersistence() {
153         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
154 
155         return bookmarksEntryLocalService.getUserPersistence();
156     }
157 
158     public static void setUserPersistence(
159         com.liferay.portal.service.persistence.UserPersistence userPersistence) {
160         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
161 
162         bookmarksEntryLocalService.setUserPersistence(userPersistence);
163     }
164 
165     public static com.liferay.portal.service.persistence.UserFinder getUserFinder() {
166         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
167 
168         return bookmarksEntryLocalService.getUserFinder();
169     }
170 
171     public static void setUserFinder(
172         com.liferay.portal.service.persistence.UserFinder userFinder) {
173         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
174 
175         bookmarksEntryLocalService.setUserFinder(userFinder);
176     }
177 
178     public static com.liferay.portlet.tags.service.persistence.TagsAssetPersistence getTagsAssetPersistence() {
179         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
180 
181         return bookmarksEntryLocalService.getTagsAssetPersistence();
182     }
183 
184     public static void setTagsAssetPersistence(
185         com.liferay.portlet.tags.service.persistence.TagsAssetPersistence tagsAssetPersistence) {
186         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
187 
188         bookmarksEntryLocalService.setTagsAssetPersistence(tagsAssetPersistence);
189     }
190 
191     public static com.liferay.portlet.tags.service.persistence.TagsAssetFinder getTagsAssetFinder() {
192         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
193 
194         return bookmarksEntryLocalService.getTagsAssetFinder();
195     }
196 
197     public static void setTagsAssetFinder(
198         com.liferay.portlet.tags.service.persistence.TagsAssetFinder tagsAssetFinder) {
199         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
200 
201         bookmarksEntryLocalService.setTagsAssetFinder(tagsAssetFinder);
202     }
203 
204     public static void afterPropertiesSet() {
205         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
206 
207         bookmarksEntryLocalService.afterPropertiesSet();
208     }
209 
210     public static com.liferay.portlet.bookmarks.model.BookmarksEntry addEntry(
211         long userId, long folderId, java.lang.String name,
212         java.lang.String url, java.lang.String comments,
213         java.lang.String[] tagsEntries, boolean addCommunityPermissions,
214         boolean addGuestPermissions)
215         throws com.liferay.portal.PortalException, 
216             com.liferay.portal.SystemException {
217         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
218 
219         return bookmarksEntryLocalService.addEntry(userId, folderId, name, url,
220             comments, tagsEntries, addCommunityPermissions, addGuestPermissions);
221     }
222 
223     public static com.liferay.portlet.bookmarks.model.BookmarksEntry addEntry(
224         java.lang.String uuid, long userId, long folderId,
225         java.lang.String name, java.lang.String url, java.lang.String comments,
226         java.lang.String[] tagsEntries, boolean addCommunityPermissions,
227         boolean addGuestPermissions)
228         throws com.liferay.portal.PortalException, 
229             com.liferay.portal.SystemException {
230         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
231 
232         return bookmarksEntryLocalService.addEntry(uuid, userId, folderId,
233             name, url, comments, tagsEntries, addCommunityPermissions,
234             addGuestPermissions);
235     }
236 
237     public static com.liferay.portlet.bookmarks.model.BookmarksEntry addEntry(
238         long userId, long folderId, java.lang.String name,
239         java.lang.String url, java.lang.String comments,
240         java.lang.String[] tagsEntries,
241         java.lang.String[] communityPermissions,
242         java.lang.String[] guestPermissions)
243         throws com.liferay.portal.PortalException, 
244             com.liferay.portal.SystemException {
245         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
246 
247         return bookmarksEntryLocalService.addEntry(userId, folderId, name, url,
248             comments, tagsEntries, communityPermissions, guestPermissions);
249     }
250 
251     public static com.liferay.portlet.bookmarks.model.BookmarksEntry addEntry(
252         java.lang.String uuid, long userId, long folderId,
253         java.lang.String name, java.lang.String url, java.lang.String comments,
254         java.lang.String[] tagsEntries,
255         java.lang.Boolean addCommunityPermissions,
256         java.lang.Boolean addGuestPermissions,
257         java.lang.String[] communityPermissions,
258         java.lang.String[] guestPermissions)
259         throws com.liferay.portal.PortalException, 
260             com.liferay.portal.SystemException {
261         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
262 
263         return bookmarksEntryLocalService.addEntry(uuid, userId, folderId,
264             name, url, comments, tagsEntries, addCommunityPermissions,
265             addGuestPermissions, communityPermissions, guestPermissions);
266     }
267 
268     public static void addEntryResources(long folderId, long entryId,
269         boolean addCommunityPermissions, boolean addGuestPermissions)
270         throws com.liferay.portal.PortalException, 
271             com.liferay.portal.SystemException {
272         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
273 
274         bookmarksEntryLocalService.addEntryResources(folderId, entryId,
275             addCommunityPermissions, addGuestPermissions);
276     }
277 
278     public static void addEntryResources(
279         com.liferay.portlet.bookmarks.model.BookmarksFolder folder,
280         com.liferay.portlet.bookmarks.model.BookmarksEntry entry,
281         boolean addCommunityPermissions, boolean addGuestPermissions)
282         throws com.liferay.portal.PortalException, 
283             com.liferay.portal.SystemException {
284         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
285 
286         bookmarksEntryLocalService.addEntryResources(folder, entry,
287             addCommunityPermissions, addGuestPermissions);
288     }
289 
290     public static void addEntryResources(long folderId, long entryId,
291         java.lang.String[] communityPermissions,
292         java.lang.String[] guestPermissions)
293         throws com.liferay.portal.PortalException, 
294             com.liferay.portal.SystemException {
295         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
296 
297         bookmarksEntryLocalService.addEntryResources(folderId, entryId,
298             communityPermissions, guestPermissions);
299     }
300 
301     public static void addEntryResources(
302         com.liferay.portlet.bookmarks.model.BookmarksFolder folder,
303         com.liferay.portlet.bookmarks.model.BookmarksEntry entry,
304         java.lang.String[] communityPermissions,
305         java.lang.String[] guestPermissions)
306         throws com.liferay.portal.PortalException, 
307             com.liferay.portal.SystemException {
308         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
309 
310         bookmarksEntryLocalService.addEntryResources(folder, entry,
311             communityPermissions, guestPermissions);
312     }
313 
314     public static void deleteEntries(long folderId)
315         throws com.liferay.portal.PortalException, 
316             com.liferay.portal.SystemException {
317         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
318 
319         bookmarksEntryLocalService.deleteEntries(folderId);
320     }
321 
322     public static void deleteEntry(long entryId)
323         throws com.liferay.portal.PortalException, 
324             com.liferay.portal.SystemException {
325         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
326 
327         bookmarksEntryLocalService.deleteEntry(entryId);
328     }
329 
330     public static void deleteEntry(
331         com.liferay.portlet.bookmarks.model.BookmarksEntry entry)
332         throws com.liferay.portal.PortalException, 
333             com.liferay.portal.SystemException {
334         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
335 
336         bookmarksEntryLocalService.deleteEntry(entry);
337     }
338 
339     public static java.util.List getEntries(long folderId, int begin, int end)
340         throws com.liferay.portal.SystemException {
341         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
342 
343         return bookmarksEntryLocalService.getEntries(folderId, begin, end);
344     }
345 
346     public static java.util.List getEntries(long folderId, int begin, int end,
347         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
348         throws com.liferay.portal.SystemException {
349         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
350 
351         return bookmarksEntryLocalService.getEntries(folderId, begin, end,
352             orderByComparator);
353     }
354 
355     public static int getEntriesCount(long folderId)
356         throws com.liferay.portal.SystemException {
357         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
358 
359         return bookmarksEntryLocalService.getEntriesCount(folderId);
360     }
361 
362     public static com.liferay.portlet.bookmarks.model.BookmarksEntry getEntry(
363         long entryId)
364         throws com.liferay.portal.PortalException, 
365             com.liferay.portal.SystemException {
366         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
367 
368         return bookmarksEntryLocalService.getEntry(entryId);
369     }
370 
371     public static int getFoldersEntriesCount(java.util.List folderIds)
372         throws com.liferay.portal.SystemException {
373         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
374 
375         return bookmarksEntryLocalService.getFoldersEntriesCount(folderIds);
376     }
377 
378     public static java.util.List getGroupEntries(long groupId, int begin,
379         int end) throws com.liferay.portal.SystemException {
380         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
381 
382         return bookmarksEntryLocalService.getGroupEntries(groupId, begin, end);
383     }
384 
385     public static java.util.List getGroupEntries(long groupId, long userId,
386         int begin, int end) throws com.liferay.portal.SystemException {
387         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
388 
389         return bookmarksEntryLocalService.getGroupEntries(groupId, userId,
390             begin, end);
391     }
392 
393     public static int getGroupEntriesCount(long groupId)
394         throws com.liferay.portal.SystemException {
395         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
396 
397         return bookmarksEntryLocalService.getGroupEntriesCount(groupId);
398     }
399 
400     public static int getGroupEntriesCount(long groupId, long userId)
401         throws com.liferay.portal.SystemException {
402         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
403 
404         return bookmarksEntryLocalService.getGroupEntriesCount(groupId, userId);
405     }
406 
407     public static java.util.List getNoAssetEntries()
408         throws com.liferay.portal.SystemException {
409         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
410 
411         return bookmarksEntryLocalService.getNoAssetEntries();
412     }
413 
414     public static com.liferay.portlet.bookmarks.model.BookmarksEntry openEntry(
415         long entryId)
416         throws com.liferay.portal.PortalException, 
417             com.liferay.portal.SystemException {
418         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
419 
420         return bookmarksEntryLocalService.openEntry(entryId);
421     }
422 
423     public static com.liferay.portlet.bookmarks.model.BookmarksEntry updateEntry(
424         long userId, long entryId, long folderId, java.lang.String name,
425         java.lang.String url, java.lang.String comments,
426         java.lang.String[] tagsEntries)
427         throws com.liferay.portal.PortalException, 
428             com.liferay.portal.SystemException {
429         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
430 
431         return bookmarksEntryLocalService.updateEntry(userId, entryId,
432             folderId, name, url, comments, tagsEntries);
433     }
434 
435     public static void updateTagsAsset(long userId,
436         com.liferay.portlet.bookmarks.model.BookmarksEntry entry,
437         java.lang.String[] tagsEntries)
438         throws com.liferay.portal.PortalException, 
439             com.liferay.portal.SystemException {
440         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
441 
442         bookmarksEntryLocalService.updateTagsAsset(userId, entry, tagsEntries);
443     }
444 }