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.documentlibrary.service;
24  
25  
26  /**
27   * <a href="DLFolderLocalServiceUtil.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.documentlibrary.service.DLFolderLocalService</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.documentlibrary.service.DLFolderLocalService
45   *
46   */
47  public class DLFolderLocalServiceUtil {
48      public static com.liferay.portlet.documentlibrary.model.DLFolder addDLFolder(
49          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
50          throws com.liferay.portal.SystemException {
51          return getService().addDLFolder(dlFolder);
52      }
53  
54      public static com.liferay.portlet.documentlibrary.model.DLFolder createDLFolder(
55          long folderId) {
56          return getService().createDLFolder(folderId);
57      }
58  
59      public static void deleteDLFolder(long folderId)
60          throws com.liferay.portal.PortalException,
61              com.liferay.portal.SystemException {
62          getService().deleteDLFolder(folderId);
63      }
64  
65      public static void deleteDLFolder(
66          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
67          throws com.liferay.portal.SystemException {
68          getService().deleteDLFolder(dlFolder);
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.documentlibrary.model.DLFolder getDLFolder(
84          long folderId)
85          throws com.liferay.portal.PortalException,
86              com.liferay.portal.SystemException {
87          return getService().getDLFolder(folderId);
88      }
89  
90      public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getDLFolders(
91          int start, int end) throws com.liferay.portal.SystemException {
92          return getService().getDLFolders(start, end);
93      }
94  
95      public static int getDLFoldersCount()
96          throws com.liferay.portal.SystemException {
97          return getService().getDLFoldersCount();
98      }
99  
100     public static com.liferay.portlet.documentlibrary.model.DLFolder updateDLFolder(
101         com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
102         throws com.liferay.portal.SystemException {
103         return getService().updateDLFolder(dlFolder);
104     }
105 
106     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
107         long userId, long groupId, long parentFolderId, java.lang.String name,
108         java.lang.String description, boolean addCommunityPermissions,
109         boolean addGuestPermissions)
110         throws com.liferay.portal.PortalException,
111             com.liferay.portal.SystemException {
112         return getService()
113                    .addFolder(userId, groupId, parentFolderId, name,
114             description, addCommunityPermissions, addGuestPermissions);
115     }
116 
117     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
118         java.lang.String uuid, long userId, long groupId, long parentFolderId,
119         java.lang.String name, java.lang.String description,
120         boolean addCommunityPermissions, boolean addGuestPermissions)
121         throws com.liferay.portal.PortalException,
122             com.liferay.portal.SystemException {
123         return getService()
124                    .addFolder(uuid, userId, groupId, parentFolderId, name,
125             description, addCommunityPermissions, addGuestPermissions);
126     }
127 
128     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
129         long userId, long groupId, long parentFolderId, java.lang.String name,
130         java.lang.String description, java.lang.String[] communityPermissions,
131         java.lang.String[] guestPermissions)
132         throws com.liferay.portal.PortalException,
133             com.liferay.portal.SystemException {
134         return getService()
135                    .addFolder(userId, groupId, parentFolderId, name,
136             description, communityPermissions, guestPermissions);
137     }
138 
139     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
140         java.lang.String uuid, long userId, long groupId, long parentFolderId,
141         java.lang.String name, java.lang.String description,
142         java.lang.Boolean addCommunityPermissions,
143         java.lang.Boolean addGuestPermissions,
144         java.lang.String[] communityPermissions,
145         java.lang.String[] guestPermissions)
146         throws com.liferay.portal.PortalException,
147             com.liferay.portal.SystemException {
148         return getService()
149                    .addFolder(uuid, userId, groupId, parentFolderId, name,
150             description, addCommunityPermissions, addGuestPermissions,
151             communityPermissions, guestPermissions);
152     }
153 
154     public static void addFolderResources(long folderId,
155         boolean addCommunityPermissions, boolean addGuestPermissions)
156         throws com.liferay.portal.PortalException,
157             com.liferay.portal.SystemException {
158         getService()
159             .addFolderResources(folderId, addCommunityPermissions,
160             addGuestPermissions);
161     }
162 
163     public static void addFolderResources(
164         com.liferay.portlet.documentlibrary.model.DLFolder folder,
165         boolean addCommunityPermissions, boolean addGuestPermissions)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException {
168         getService()
169             .addFolderResources(folder, addCommunityPermissions,
170             addGuestPermissions);
171     }
172 
173     public static void addFolderResources(long folderId,
174         java.lang.String[] communityPermissions,
175         java.lang.String[] guestPermissions)
176         throws com.liferay.portal.PortalException,
177             com.liferay.portal.SystemException {
178         getService()
179             .addFolderResources(folderId, communityPermissions, guestPermissions);
180     }
181 
182     public static void addFolderResources(
183         com.liferay.portlet.documentlibrary.model.DLFolder folder,
184         java.lang.String[] communityPermissions,
185         java.lang.String[] guestPermissions)
186         throws com.liferay.portal.PortalException,
187             com.liferay.portal.SystemException {
188         getService()
189             .addFolderResources(folder, communityPermissions, guestPermissions);
190     }
191 
192     public static void deleteFolder(long folderId)
193         throws com.liferay.portal.PortalException,
194             com.liferay.portal.SystemException {
195         getService().deleteFolder(folderId);
196     }
197 
198     public static void deleteFolder(
199         com.liferay.portlet.documentlibrary.model.DLFolder folder)
200         throws com.liferay.portal.PortalException,
201             com.liferay.portal.SystemException {
202         getService().deleteFolder(folder);
203     }
204 
205     public static void deleteFolders(long groupId)
206         throws com.liferay.portal.PortalException,
207             com.liferay.portal.SystemException {
208         getService().deleteFolders(groupId);
209     }
210 
211     public static java.util.List<Object> getFileEntriesAndFileShortcuts(
212         long folderId, int start, int end)
213         throws com.liferay.portal.SystemException {
214         return getService().getFileEntriesAndFileShortcuts(folderId, start, end);
215     }
216 
217     public static java.util.List<Object> getFileEntriesAndFileShortcuts(
218         java.util.List<Long> folderIds, int start, int end)
219         throws com.liferay.portal.SystemException {
220         return getService().getFileEntriesAndFileShortcuts(folderIds, start, end);
221     }
222 
223     public static int getFileEntriesAndFileShortcutsCount(long folderId)
224         throws com.liferay.portal.SystemException {
225         return getService().getFileEntriesAndFileShortcutsCount(folderId);
226     }
227 
228     public static int getFileEntriesAndFileShortcutsCount(
229         java.util.List<Long> folderIds)
230         throws com.liferay.portal.SystemException {
231         return getService().getFileEntriesAndFileShortcutsCount(folderIds);
232     }
233 
234     public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
235         long folderId)
236         throws com.liferay.portal.PortalException,
237             com.liferay.portal.SystemException {
238         return getService().getFolder(folderId);
239     }
240 
241     public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
242         long groupId, long parentFolderId, java.lang.String name)
243         throws com.liferay.portal.PortalException,
244             com.liferay.portal.SystemException {
245         return getService().getFolder(groupId, parentFolderId, name);
246     }
247 
248     public static java.util.List<Object> getFoldersAndFileEntriesAndFileShortcuts(
249         long folderId, int start, int end)
250         throws com.liferay.portal.SystemException {
251         return getService()
252                    .getFoldersAndFileEntriesAndFileShortcuts(folderId, start,
253             end);
254     }
255 
256     public static java.util.List<Object> getFoldersAndFileEntriesAndFileShortcuts(
257         java.util.List<Long> folderIds, int start, int end)
258         throws com.liferay.portal.SystemException {
259         return getService()
260                    .getFoldersAndFileEntriesAndFileShortcuts(folderIds, start,
261             end);
262     }
263 
264     public static int getFoldersAndFileEntriesAndFileShortcutsCount(
265         long folderId) throws com.liferay.portal.SystemException {
266         return getService()
267                    .getFoldersAndFileEntriesAndFileShortcutsCount(folderId);
268     }
269 
270     public static int getFoldersAndFileEntriesAndFileShortcutsCount(
271         java.util.List<Long> folderIds)
272         throws com.liferay.portal.SystemException {
273         return getService()
274                    .getFoldersAndFileEntriesAndFileShortcutsCount(folderIds);
275     }
276 
277     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
278         long companyId) throws com.liferay.portal.SystemException {
279         return getService().getFolders(companyId);
280     }
281 
282     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
283         long groupId, long parentFolderId)
284         throws com.liferay.portal.SystemException {
285         return getService().getFolders(groupId, parentFolderId);
286     }
287 
288     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
289         long groupId, long parentFolderId, int start, int end)
290         throws com.liferay.portal.SystemException {
291         return getService().getFolders(groupId, parentFolderId, start, end);
292     }
293 
294     public static int getFoldersCount(long groupId, long parentFolderId)
295         throws com.liferay.portal.SystemException {
296         return getService().getFoldersCount(groupId, parentFolderId);
297     }
298 
299     public static void getSubfolderIds(java.util.List<Long> folderIds,
300         long groupId, long folderId) throws com.liferay.portal.SystemException {
301         getService().getSubfolderIds(folderIds, groupId, folderId);
302     }
303 
304     public static void reIndex(java.lang.String[] ids)
305         throws com.liferay.portal.SystemException {
306         getService().reIndex(ids);
307     }
308 
309     public static com.liferay.portal.kernel.search.Hits search(long companyId,
310         long groupId, long userId, long[] folderIds, java.lang.String keywords,
311         int start, int end) throws com.liferay.portal.SystemException {
312         return getService()
313                    .search(companyId, groupId, userId, folderIds, keywords,
314             start, end);
315     }
316 
317     public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
318         long folderId, long parentFolderId, java.lang.String name,
319         java.lang.String description)
320         throws com.liferay.portal.PortalException,
321             com.liferay.portal.SystemException {
322         return getService()
323                    .updateFolder(folderId, parentFolderId, name, description);
324     }
325 
326     public static DLFolderLocalService getService() {
327         if (_service == null) {
328             throw new RuntimeException("DLFolderLocalService is not set");
329         }
330 
331         return _service;
332     }
333 
334     public void setService(DLFolderLocalService service) {
335         _service = service;
336     }
337 
338     private static DLFolderLocalService _service;
339 }