1   /**
2    * Copyright (c) 2000-2009 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="BookmarksFolderLocalServiceUtil.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.BookmarksFolderLocalService</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   * @author Brian Wing Shun Chan
43   *
44   * @see com.liferay.portlet.bookmarks.service.BookmarksFolderLocalService
45   *
46   */
47  public class BookmarksFolderLocalServiceUtil {
48      public static com.liferay.portlet.bookmarks.model.BookmarksFolder addBookmarksFolder(
49          com.liferay.portlet.bookmarks.model.BookmarksFolder bookmarksFolder)
50          throws com.liferay.portal.SystemException {
51          return getService().addBookmarksFolder(bookmarksFolder);
52      }
53  
54      public static com.liferay.portlet.bookmarks.model.BookmarksFolder createBookmarksFolder(
55          long folderId) {
56          return getService().createBookmarksFolder(folderId);
57      }
58  
59      public static void deleteBookmarksFolder(long folderId)
60          throws com.liferay.portal.PortalException,
61              com.liferay.portal.SystemException {
62          getService().deleteBookmarksFolder(folderId);
63      }
64  
65      public static void deleteBookmarksFolder(
66          com.liferay.portlet.bookmarks.model.BookmarksFolder bookmarksFolder)
67          throws com.liferay.portal.SystemException {
68          getService().deleteBookmarksFolder(bookmarksFolder);
69      }
70  
71      public static java.util.List<Object> dynamicQuery(
72          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
73          throws com.liferay.portal.SystemException {
74          return getService().dynamicQuery(dynamicQuery);
75      }
76  
77      public static java.util.List<Object> dynamicQuery(
78          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
79          int end) throws com.liferay.portal.SystemException {
80          return getService().dynamicQuery(dynamicQuery, start, end);
81      }
82  
83      public static com.liferay.portlet.bookmarks.model.BookmarksFolder getBookmarksFolder(
84          long folderId)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException {
87          return getService().getBookmarksFolder(folderId);
88      }
89  
90      public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getBookmarksFolders(
91          int start, int end) throws com.liferay.portal.SystemException {
92          return getService().getBookmarksFolders(start, end);
93      }
94  
95      public static int getBookmarksFoldersCount()
96          throws com.liferay.portal.SystemException {
97          return getService().getBookmarksFoldersCount();
98      }
99  
100     public static com.liferay.portlet.bookmarks.model.BookmarksFolder updateBookmarksFolder(
101         com.liferay.portlet.bookmarks.model.BookmarksFolder bookmarksFolder)
102         throws com.liferay.portal.SystemException {
103         return getService().updateBookmarksFolder(bookmarksFolder);
104     }
105 
106     public static com.liferay.portlet.bookmarks.model.BookmarksFolder addFolder(
107         long userId, long parentFolderId, java.lang.String name,
108         java.lang.String description,
109         com.liferay.portal.service.ServiceContext serviceContext)
110         throws com.liferay.portal.PortalException,
111             com.liferay.portal.SystemException {
112         return getService()
113                    .addFolder(userId, parentFolderId, name, description,
114             serviceContext);
115     }
116 
117     public static com.liferay.portlet.bookmarks.model.BookmarksFolder addFolder(
118         java.lang.String uuid, long userId, long parentFolderId,
119         java.lang.String name, java.lang.String description,
120         com.liferay.portal.service.ServiceContext serviceContext)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException {
123         return getService()
124                    .addFolder(uuid, userId, parentFolderId, name, description,
125             serviceContext);
126     }
127 
128     public static void addFolderResources(long folderId,
129         boolean addCommunityPermissions, boolean addGuestPermissions)
130         throws com.liferay.portal.PortalException,
131             com.liferay.portal.SystemException {
132         getService()
133             .addFolderResources(folderId, addCommunityPermissions,
134             addGuestPermissions);
135     }
136 
137     public static void addFolderResources(
138         com.liferay.portlet.bookmarks.model.BookmarksFolder folder,
139         boolean addCommunityPermissions, boolean addGuestPermissions)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException {
142         getService()
143             .addFolderResources(folder, addCommunityPermissions,
144             addGuestPermissions);
145     }
146 
147     public static void addFolderResources(long folderId,
148         java.lang.String[] communityPermissions,
149         java.lang.String[] guestPermissions)
150         throws com.liferay.portal.PortalException,
151             com.liferay.portal.SystemException {
152         getService()
153             .addFolderResources(folderId, communityPermissions, guestPermissions);
154     }
155 
156     public static void addFolderResources(
157         com.liferay.portlet.bookmarks.model.BookmarksFolder folder,
158         java.lang.String[] communityPermissions,
159         java.lang.String[] guestPermissions)
160         throws com.liferay.portal.PortalException,
161             com.liferay.portal.SystemException {
162         getService()
163             .addFolderResources(folder, communityPermissions, guestPermissions);
164     }
165 
166     public static void deleteFolder(long folderId)
167         throws com.liferay.portal.PortalException,
168             com.liferay.portal.SystemException {
169         getService().deleteFolder(folderId);
170     }
171 
172     public static void deleteFolder(
173         com.liferay.portlet.bookmarks.model.BookmarksFolder folder)
174         throws com.liferay.portal.PortalException,
175             com.liferay.portal.SystemException {
176         getService().deleteFolder(folder);
177     }
178 
179     public static void deleteFolders(long groupId)
180         throws com.liferay.portal.PortalException,
181             com.liferay.portal.SystemException {
182         getService().deleteFolders(groupId);
183     }
184 
185     public static com.liferay.portlet.bookmarks.model.BookmarksFolder getFolder(
186         long folderId)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException {
189         return getService().getFolder(folderId);
190     }
191 
192     public static java.util.List<com.liferay.portlet.bookmarks.model.BookmarksFolder> getFolders(
193         long groupId, long parentFolderId, int start, int end)
194         throws com.liferay.portal.SystemException {
195         return getService().getFolders(groupId, parentFolderId, start, end);
196     }
197 
198     public static int getFoldersCount(long groupId, long parentFolderId)
199         throws com.liferay.portal.SystemException {
200         return getService().getFoldersCount(groupId, parentFolderId);
201     }
202 
203     public static void getSubfolderIds(java.util.List<Long> folderIds,
204         long groupId, long folderId) throws com.liferay.portal.SystemException {
205         getService().getSubfolderIds(folderIds, groupId, folderId);
206     }
207 
208     public static void reIndex(java.lang.String[] ids)
209         throws com.liferay.portal.SystemException {
210         getService().reIndex(ids);
211     }
212 
213     public static com.liferay.portal.kernel.search.Hits search(long companyId,
214         long groupId, long userId, long[] folderIds, java.lang.String keywords,
215         int start, int end) throws com.liferay.portal.SystemException {
216         return getService()
217                    .search(companyId, groupId, userId, folderIds, keywords,
218             start, end);
219     }
220 
221     public static com.liferay.portlet.bookmarks.model.BookmarksFolder updateFolder(
222         long folderId, long parentFolderId, java.lang.String name,
223         java.lang.String description, boolean mergeWithParentFolder)
224         throws com.liferay.portal.PortalException,
225             com.liferay.portal.SystemException {
226         return getService()
227                    .updateFolder(folderId, parentFolderId, name, description,
228             mergeWithParentFolder);
229     }
230 
231     public static BookmarksFolderLocalService getService() {
232         if (_service == null) {
233             throw new RuntimeException("BookmarksFolderLocalService is not set");
234         }
235 
236         return _service;
237     }
238 
239     public void setService(BookmarksFolderLocalService service) {
240         _service = service;
241     }
242 
243     private static BookmarksFolderLocalService _service;
244 }