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 bookmarksEntry)
56          throws com.liferay.portal.SystemException {
57          BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
58  
59          return bookmarksEntryLocalService.addBookmarksEntry(bookmarksEntry);
60      }
61  
62      public static void deleteBookmarksEntry(long entryId)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException {
65          BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
66  
67          bookmarksEntryLocalService.deleteBookmarksEntry(entryId);
68      }
69  
70      public static void deleteBookmarksEntry(
71          com.liferay.portlet.bookmarks.model.BookmarksEntry bookmarksEntry)
72          throws com.liferay.portal.SystemException {
73          BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
74  
75          bookmarksEntryLocalService.deleteBookmarksEntry(bookmarksEntry);
76      }
77  
78      public static java.util.List<Object> dynamicQuery(
79          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
80          throws com.liferay.portal.SystemException {
81          BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
82  
83          return bookmarksEntryLocalService.dynamicQuery(dynamicQuery);
84      }
85  
86      public static java.util.List<Object> dynamicQuery(
87          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
88          int end) throws com.liferay.portal.SystemException {
89          BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
90  
91          return bookmarksEntryLocalService.dynamicQuery(dynamicQuery, start, end);
92      }
93  
94      public static com.liferay.portlet.bookmarks.model.BookmarksEntry getBookmarksEntry(
95          long entryId)
96          throws com.liferay.portal.PortalException,
97              com.liferay.portal.SystemException {
98          BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
99  
100         return bookmarksEntryLocalService.getBookmarksEntry(entryId);
101     }
102 
103     public static com.liferay.portlet.bookmarks.model.BookmarksEntry updateBookmarksEntry(
104         com.liferay.portlet.bookmarks.model.BookmarksEntry bookmarksEntry)
105         throws com.liferay.portal.SystemException {
106         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
107 
108         return bookmarksEntryLocalService.updateBookmarksEntry(bookmarksEntry);
109     }
110 
111     public static com.liferay.portlet.bookmarks.model.BookmarksEntry addEntry(
112         long userId, long folderId, java.lang.String name,
113         java.lang.String url, java.lang.String comments,
114         java.lang.String[] tagsEntries, boolean addCommunityPermissions,
115         boolean addGuestPermissions)
116         throws com.liferay.portal.PortalException,
117             com.liferay.portal.SystemException {
118         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
119 
120         return bookmarksEntryLocalService.addEntry(userId, folderId, name, url,
121             comments, tagsEntries, addCommunityPermissions, addGuestPermissions);
122     }
123 
124     public static com.liferay.portlet.bookmarks.model.BookmarksEntry addEntry(
125         java.lang.String uuid, long userId, long folderId,
126         java.lang.String name, java.lang.String url, java.lang.String comments,
127         java.lang.String[] tagsEntries, boolean addCommunityPermissions,
128         boolean addGuestPermissions)
129         throws com.liferay.portal.PortalException,
130             com.liferay.portal.SystemException {
131         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
132 
133         return bookmarksEntryLocalService.addEntry(uuid, userId, folderId,
134             name, url, comments, tagsEntries, addCommunityPermissions,
135             addGuestPermissions);
136     }
137 
138     public static com.liferay.portlet.bookmarks.model.BookmarksEntry addEntry(
139         long userId, long folderId, java.lang.String name,
140         java.lang.String url, java.lang.String comments,
141         java.lang.String[] tagsEntries,
142         java.lang.String[] communityPermissions,
143         java.lang.String[] guestPermissions)
144         throws com.liferay.portal.PortalException,
145             com.liferay.portal.SystemException {
146         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
147 
148         return bookmarksEntryLocalService.addEntry(userId, folderId, name, url,
149             comments, tagsEntries, communityPermissions, guestPermissions);
150     }
151 
152     public static com.liferay.portlet.bookmarks.model.BookmarksEntry addEntry(
153         java.lang.String uuid, long userId, long folderId,
154         java.lang.String name, java.lang.String url, java.lang.String comments,
155         java.lang.String[] tagsEntries,
156         java.lang.Boolean addCommunityPermissions,
157         java.lang.Boolean addGuestPermissions,
158         java.lang.String[] communityPermissions,
159         java.lang.String[] guestPermissions)
160         throws com.liferay.portal.PortalException,
161             com.liferay.portal.SystemException {
162         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
163 
164         return bookmarksEntryLocalService.addEntry(uuid, userId, folderId,
165             name, url, comments, tagsEntries, addCommunityPermissions,
166             addGuestPermissions, communityPermissions, guestPermissions);
167     }
168 
169     public static void addEntryResources(long folderId, long entryId,
170         boolean addCommunityPermissions, boolean addGuestPermissions)
171         throws com.liferay.portal.PortalException,
172             com.liferay.portal.SystemException {
173         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
174 
175         bookmarksEntryLocalService.addEntryResources(folderId, entryId,
176             addCommunityPermissions, addGuestPermissions);
177     }
178 
179     public static void addEntryResources(
180         com.liferay.portlet.bookmarks.model.BookmarksFolder folder,
181         com.liferay.portlet.bookmarks.model.BookmarksEntry entry,
182         boolean addCommunityPermissions, boolean addGuestPermissions)
183         throws com.liferay.portal.PortalException,
184             com.liferay.portal.SystemException {
185         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
186 
187         bookmarksEntryLocalService.addEntryResources(folder, entry,
188             addCommunityPermissions, addGuestPermissions);
189     }
190 
191     public static void addEntryResources(long folderId, long entryId,
192         java.lang.String[] communityPermissions,
193         java.lang.String[] guestPermissions)
194         throws com.liferay.portal.PortalException,
195             com.liferay.portal.SystemException {
196         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
197 
198         bookmarksEntryLocalService.addEntryResources(folderId, entryId,
199             communityPermissions, guestPermissions);
200     }
201 
202     public static void addEntryResources(
203         com.liferay.portlet.bookmarks.model.BookmarksFolder folder,
204         com.liferay.portlet.bookmarks.model.BookmarksEntry entry,
205         java.lang.String[] communityPermissions,
206         java.lang.String[] guestPermissions)
207         throws com.liferay.portal.PortalException,
208             com.liferay.portal.SystemException {
209         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
210 
211         bookmarksEntryLocalService.addEntryResources(folder, entry,
212             communityPermissions, guestPermissions);
213     }
214 
215     public static void deleteEntries(long folderId)
216         throws com.liferay.portal.PortalException,
217             com.liferay.portal.SystemException {
218         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
219 
220         bookmarksEntryLocalService.deleteEntries(folderId);
221     }
222 
223     public static void deleteEntry(long entryId)
224         throws com.liferay.portal.PortalException,
225             com.liferay.portal.SystemException {
226         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
227 
228         bookmarksEntryLocalService.deleteEntry(entryId);
229     }
230 
231     public static void deleteEntry(
232         com.liferay.portlet.bookmarks.model.BookmarksEntry entry)
233         throws com.liferay.portal.PortalException,
234             com.liferay.portal.SystemException {
235         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
236 
237         bookmarksEntryLocalService.deleteEntry(entry);
238     }
239 
240     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getEntries(
241         long folderId, int start, int end)
242         throws com.liferay.portal.SystemException {
243         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
244 
245         return bookmarksEntryLocalService.getEntries(folderId, start, end);
246     }
247 
248     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getEntries(
249         long folderId, int start, int end,
250         com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
251         throws com.liferay.portal.SystemException {
252         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
253 
254         return bookmarksEntryLocalService.getEntries(folderId, start, end,
255             orderByComparator);
256     }
257 
258     public static int getEntriesCount(long folderId)
259         throws com.liferay.portal.SystemException {
260         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
261 
262         return bookmarksEntryLocalService.getEntriesCount(folderId);
263     }
264 
265     public static com.liferay.portlet.bookmarks.model.BookmarksEntry getEntry(
266         long entryId)
267         throws com.liferay.portal.PortalException,
268             com.liferay.portal.SystemException {
269         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
270 
271         return bookmarksEntryLocalService.getEntry(entryId);
272     }
273 
274     public static int getFoldersEntriesCount(java.util.List<Long> folderIds)
275         throws com.liferay.portal.SystemException {
276         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
277 
278         return bookmarksEntryLocalService.getFoldersEntriesCount(folderIds);
279     }
280 
281     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getGroupEntries(
282         long groupId, int start, int end)
283         throws com.liferay.portal.SystemException {
284         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
285 
286         return bookmarksEntryLocalService.getGroupEntries(groupId, start, end);
287     }
288 
289     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getGroupEntries(
290         long groupId, long userId, int start, int end)
291         throws com.liferay.portal.SystemException {
292         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
293 
294         return bookmarksEntryLocalService.getGroupEntries(groupId, userId,
295             start, end);
296     }
297 
298     public static int getGroupEntriesCount(long groupId)
299         throws com.liferay.portal.SystemException {
300         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
301 
302         return bookmarksEntryLocalService.getGroupEntriesCount(groupId);
303     }
304 
305     public static int getGroupEntriesCount(long groupId, long userId)
306         throws com.liferay.portal.SystemException {
307         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
308 
309         return bookmarksEntryLocalService.getGroupEntriesCount(groupId, userId);
310     }
311 
312     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksEntry> getNoAssetEntries()
313         throws com.liferay.portal.SystemException {
314         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
315 
316         return bookmarksEntryLocalService.getNoAssetEntries();
317     }
318 
319     public static com.liferay.portlet.bookmarks.model.BookmarksEntry openEntry(
320         long entryId)
321         throws com.liferay.portal.PortalException,
322             com.liferay.portal.SystemException {
323         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
324 
325         return bookmarksEntryLocalService.openEntry(entryId);
326     }
327 
328     public static com.liferay.portlet.bookmarks.model.BookmarksEntry updateEntry(
329         long userId, long entryId, long folderId, java.lang.String name,
330         java.lang.String url, java.lang.String comments,
331         java.lang.String[] tagsEntries)
332         throws com.liferay.portal.PortalException,
333             com.liferay.portal.SystemException {
334         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
335 
336         return bookmarksEntryLocalService.updateEntry(userId, entryId,
337             folderId, name, url, comments, tagsEntries);
338     }
339 
340     public static void updateTagsAsset(long userId,
341         com.liferay.portlet.bookmarks.model.BookmarksEntry entry,
342         java.lang.String[] tagsEntries)
343         throws com.liferay.portal.PortalException,
344             com.liferay.portal.SystemException {
345         BookmarksEntryLocalService bookmarksEntryLocalService = BookmarksEntryLocalServiceFactory.getService();
346 
347         bookmarksEntryLocalService.updateTagsAsset(userId, entry, tagsEntries);
348     }
349 }