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.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   * <p>
43   * <code>com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceFactory</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.documentlibrary.service.DLFolderLocalService
50   * @see com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceFactory
51   *
52   */
53  public class DLFolderLocalServiceUtil {
54      public static com.liferay.portlet.documentlibrary.model.DLFolder addDLFolder(
55          com.liferay.portlet.documentlibrary.model.DLFolder model)
56          throws com.liferay.portal.SystemException {
57          DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
58  
59          return dlFolderLocalService.addDLFolder(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          DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
66  
67          return dlFolderLocalService.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          DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
74  
75          return dlFolderLocalService.dynamicQuery(queryInitializer, begin, end);
76      }
77  
78      public static com.liferay.portlet.documentlibrary.model.DLFolder updateDLFolder(
79          com.liferay.portlet.documentlibrary.model.DLFolder model)
80          throws com.liferay.portal.SystemException {
81          DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
82  
83          return dlFolderLocalService.updateDLFolder(model);
84      }
85  
86      public static com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryPersistence getDLFileEntryPersistence() {
87          DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
88  
89          return dlFolderLocalService.getDLFileEntryPersistence();
90      }
91  
92      public static void setDLFileEntryPersistence(
93          com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryPersistence dlFileEntryPersistence) {
94          DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
95  
96          dlFolderLocalService.setDLFileEntryPersistence(dlFileEntryPersistence);
97      }
98  
99      public static com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryFinder getDLFileEntryFinder() {
100         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
101 
102         return dlFolderLocalService.getDLFileEntryFinder();
103     }
104 
105     public static void setDLFileEntryFinder(
106         com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryFinder dlFileEntryFinder) {
107         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
108 
109         dlFolderLocalService.setDLFileEntryFinder(dlFileEntryFinder);
110     }
111 
112     public static com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryAndShortcutFinder getDLFileEntryAndShortcutFinder() {
113         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
114 
115         return dlFolderLocalService.getDLFileEntryAndShortcutFinder();
116     }
117 
118     public static void setDLFileEntryAndShortcutFinder(
119         com.liferay.portlet.documentlibrary.service.persistence.DLFileEntryAndShortcutFinder dlFileEntryAndShortcutFinder) {
120         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
121 
122         dlFolderLocalService.setDLFileEntryAndShortcutFinder(dlFileEntryAndShortcutFinder);
123     }
124 
125     public static com.liferay.portlet.documentlibrary.service.persistence.DLFileRankPersistence getDLFileRankPersistence() {
126         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
127 
128         return dlFolderLocalService.getDLFileRankPersistence();
129     }
130 
131     public static void setDLFileRankPersistence(
132         com.liferay.portlet.documentlibrary.service.persistence.DLFileRankPersistence dlFileRankPersistence) {
133         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
134 
135         dlFolderLocalService.setDLFileRankPersistence(dlFileRankPersistence);
136     }
137 
138     public static com.liferay.portlet.documentlibrary.service.persistence.DLFileRankFinder getDLFileRankFinder() {
139         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
140 
141         return dlFolderLocalService.getDLFileRankFinder();
142     }
143 
144     public static void setDLFileRankFinder(
145         com.liferay.portlet.documentlibrary.service.persistence.DLFileRankFinder dlFileRankFinder) {
146         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
147 
148         dlFolderLocalService.setDLFileRankFinder(dlFileRankFinder);
149     }
150 
151     public static com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutPersistence getDLFileShortcutPersistence() {
152         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
153 
154         return dlFolderLocalService.getDLFileShortcutPersistence();
155     }
156 
157     public static void setDLFileShortcutPersistence(
158         com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutPersistence dlFileShortcutPersistence) {
159         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
160 
161         dlFolderLocalService.setDLFileShortcutPersistence(dlFileShortcutPersistence);
162     }
163 
164     public static com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutFinder getDLFileShortcutFinder() {
165         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
166 
167         return dlFolderLocalService.getDLFileShortcutFinder();
168     }
169 
170     public static void setDLFileShortcutFinder(
171         com.liferay.portlet.documentlibrary.service.persistence.DLFileShortcutFinder dlFileShortcutFinder) {
172         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
173 
174         dlFolderLocalService.setDLFileShortcutFinder(dlFileShortcutFinder);
175     }
176 
177     public static com.liferay.portlet.documentlibrary.service.persistence.DLFileVersionPersistence getDLFileVersionPersistence() {
178         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
179 
180         return dlFolderLocalService.getDLFileVersionPersistence();
181     }
182 
183     public static void setDLFileVersionPersistence(
184         com.liferay.portlet.documentlibrary.service.persistence.DLFileVersionPersistence dlFileVersionPersistence) {
185         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
186 
187         dlFolderLocalService.setDLFileVersionPersistence(dlFileVersionPersistence);
188     }
189 
190     public static com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistence getDLFolderPersistence() {
191         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
192 
193         return dlFolderLocalService.getDLFolderPersistence();
194     }
195 
196     public static void setDLFolderPersistence(
197         com.liferay.portlet.documentlibrary.service.persistence.DLFolderPersistence dlFolderPersistence) {
198         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
199 
200         dlFolderLocalService.setDLFolderPersistence(dlFolderPersistence);
201     }
202 
203     public static com.liferay.portal.service.persistence.LayoutPersistence getLayoutPersistence() {
204         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
205 
206         return dlFolderLocalService.getLayoutPersistence();
207     }
208 
209     public static void setLayoutPersistence(
210         com.liferay.portal.service.persistence.LayoutPersistence layoutPersistence) {
211         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
212 
213         dlFolderLocalService.setLayoutPersistence(layoutPersistence);
214     }
215 
216     public static com.liferay.portal.service.persistence.LayoutFinder getLayoutFinder() {
217         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
218 
219         return dlFolderLocalService.getLayoutFinder();
220     }
221 
222     public static void setLayoutFinder(
223         com.liferay.portal.service.persistence.LayoutFinder layoutFinder) {
224         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
225 
226         dlFolderLocalService.setLayoutFinder(layoutFinder);
227     }
228 
229     public static com.liferay.portal.service.persistence.ResourcePersistence getResourcePersistence() {
230         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
231 
232         return dlFolderLocalService.getResourcePersistence();
233     }
234 
235     public static void setResourcePersistence(
236         com.liferay.portal.service.persistence.ResourcePersistence resourcePersistence) {
237         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
238 
239         dlFolderLocalService.setResourcePersistence(resourcePersistence);
240     }
241 
242     public static com.liferay.portal.service.persistence.ResourceFinder getResourceFinder() {
243         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
244 
245         return dlFolderLocalService.getResourceFinder();
246     }
247 
248     public static void setResourceFinder(
249         com.liferay.portal.service.persistence.ResourceFinder resourceFinder) {
250         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
251 
252         dlFolderLocalService.setResourceFinder(resourceFinder);
253     }
254 
255     public static com.liferay.portal.service.persistence.UserPersistence getUserPersistence() {
256         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
257 
258         return dlFolderLocalService.getUserPersistence();
259     }
260 
261     public static void setUserPersistence(
262         com.liferay.portal.service.persistence.UserPersistence userPersistence) {
263         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
264 
265         dlFolderLocalService.setUserPersistence(userPersistence);
266     }
267 
268     public static com.liferay.portal.service.persistence.UserFinder getUserFinder() {
269         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
270 
271         return dlFolderLocalService.getUserFinder();
272     }
273 
274     public static void setUserFinder(
275         com.liferay.portal.service.persistence.UserFinder userFinder) {
276         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
277 
278         dlFolderLocalService.setUserFinder(userFinder);
279     }
280 
281     public static com.liferay.portal.service.persistence.WebDAVPropsPersistence getWebDAVPropsPersistence() {
282         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
283 
284         return dlFolderLocalService.getWebDAVPropsPersistence();
285     }
286 
287     public static void setWebDAVPropsPersistence(
288         com.liferay.portal.service.persistence.WebDAVPropsPersistence webDAVPropsPersistence) {
289         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
290 
291         dlFolderLocalService.setWebDAVPropsPersistence(webDAVPropsPersistence);
292     }
293 
294     public static void afterPropertiesSet() {
295         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
296 
297         dlFolderLocalService.afterPropertiesSet();
298     }
299 
300     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
301         long userId, long plid, long parentFolderId, java.lang.String name,
302         java.lang.String description, boolean addCommunityPermissions,
303         boolean addGuestPermissions)
304         throws com.liferay.portal.PortalException, 
305             com.liferay.portal.SystemException {
306         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
307 
308         return dlFolderLocalService.addFolder(userId, plid, parentFolderId,
309             name, description, addCommunityPermissions, addGuestPermissions);
310     }
311 
312     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
313         java.lang.String uuid, long userId, long plid, long parentFolderId,
314         java.lang.String name, java.lang.String description,
315         boolean addCommunityPermissions, boolean addGuestPermissions)
316         throws com.liferay.portal.PortalException, 
317             com.liferay.portal.SystemException {
318         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
319 
320         return dlFolderLocalService.addFolder(uuid, userId, plid,
321             parentFolderId, name, description, addCommunityPermissions,
322             addGuestPermissions);
323     }
324 
325     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
326         long userId, long plid, long parentFolderId, java.lang.String name,
327         java.lang.String description, java.lang.String[] communityPermissions,
328         java.lang.String[] guestPermissions)
329         throws com.liferay.portal.PortalException, 
330             com.liferay.portal.SystemException {
331         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
332 
333         return dlFolderLocalService.addFolder(userId, plid, parentFolderId,
334             name, description, communityPermissions, guestPermissions);
335     }
336 
337     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
338         java.lang.String uuid, long userId, long plid, long parentFolderId,
339         java.lang.String name, java.lang.String description,
340         java.lang.Boolean addCommunityPermissions,
341         java.lang.Boolean addGuestPermissions,
342         java.lang.String[] communityPermissions,
343         java.lang.String[] guestPermissions)
344         throws com.liferay.portal.PortalException, 
345             com.liferay.portal.SystemException {
346         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
347 
348         return dlFolderLocalService.addFolder(uuid, userId, plid,
349             parentFolderId, name, description, addCommunityPermissions,
350             addGuestPermissions, communityPermissions, guestPermissions);
351     }
352 
353     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolderToGroup(
354         java.lang.String uuid, long userId, long groupId, long parentFolderId,
355         java.lang.String name, java.lang.String description,
356         java.lang.Boolean addCommunityPermissions,
357         java.lang.Boolean addGuestPermissions,
358         java.lang.String[] communityPermissions,
359         java.lang.String[] guestPermissions)
360         throws com.liferay.portal.PortalException, 
361             com.liferay.portal.SystemException {
362         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
363 
364         return dlFolderLocalService.addFolderToGroup(uuid, userId, groupId,
365             parentFolderId, name, description, addCommunityPermissions,
366             addGuestPermissions, communityPermissions, guestPermissions);
367     }
368 
369     public static void addFolderResources(long folderId,
370         boolean addCommunityPermissions, boolean addGuestPermissions)
371         throws com.liferay.portal.PortalException, 
372             com.liferay.portal.SystemException {
373         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
374 
375         dlFolderLocalService.addFolderResources(folderId,
376             addCommunityPermissions, addGuestPermissions);
377     }
378 
379     public static void addFolderResources(
380         com.liferay.portlet.documentlibrary.model.DLFolder folder,
381         boolean addCommunityPermissions, boolean addGuestPermissions)
382         throws com.liferay.portal.PortalException, 
383             com.liferay.portal.SystemException {
384         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
385 
386         dlFolderLocalService.addFolderResources(folder,
387             addCommunityPermissions, addGuestPermissions);
388     }
389 
390     public static void addFolderResources(long folderId,
391         java.lang.String[] communityPermissions,
392         java.lang.String[] guestPermissions)
393         throws com.liferay.portal.PortalException, 
394             com.liferay.portal.SystemException {
395         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
396 
397         dlFolderLocalService.addFolderResources(folderId, communityPermissions,
398             guestPermissions);
399     }
400 
401     public static void addFolderResources(
402         com.liferay.portlet.documentlibrary.model.DLFolder folder,
403         java.lang.String[] communityPermissions,
404         java.lang.String[] guestPermissions)
405         throws com.liferay.portal.PortalException, 
406             com.liferay.portal.SystemException {
407         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
408 
409         dlFolderLocalService.addFolderResources(folder, communityPermissions,
410             guestPermissions);
411     }
412 
413     public static void deleteFolder(long folderId)
414         throws com.liferay.portal.PortalException, 
415             com.liferay.portal.SystemException {
416         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
417 
418         dlFolderLocalService.deleteFolder(folderId);
419     }
420 
421     public static void deleteFolder(
422         com.liferay.portlet.documentlibrary.model.DLFolder folder)
423         throws com.liferay.portal.PortalException, 
424             com.liferay.portal.SystemException {
425         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
426 
427         dlFolderLocalService.deleteFolder(folder);
428     }
429 
430     public static void deleteFolders(long groupId)
431         throws com.liferay.portal.PortalException, 
432             com.liferay.portal.SystemException {
433         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
434 
435         dlFolderLocalService.deleteFolders(groupId);
436     }
437 
438     public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
439         long folderId)
440         throws com.liferay.portal.PortalException, 
441             com.liferay.portal.SystemException {
442         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
443 
444         return dlFolderLocalService.getFolder(folderId);
445     }
446 
447     public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
448         long groupId, long parentFolderId, java.lang.String name)
449         throws com.liferay.portal.PortalException, 
450             com.liferay.portal.SystemException {
451         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
452 
453         return dlFolderLocalService.getFolder(groupId, parentFolderId, name);
454     }
455 
456     public static java.util.List getFolders(long companyId)
457         throws com.liferay.portal.SystemException {
458         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
459 
460         return dlFolderLocalService.getFolders(companyId);
461     }
462 
463     public static java.util.List getFolders(long groupId, long parentFolderId)
464         throws com.liferay.portal.SystemException {
465         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
466 
467         return dlFolderLocalService.getFolders(groupId, parentFolderId);
468     }
469 
470     public static java.util.List getFolders(long groupId, long parentFolderId,
471         int begin, int end) throws com.liferay.portal.SystemException {
472         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
473 
474         return dlFolderLocalService.getFolders(groupId, parentFolderId, begin,
475             end);
476     }
477 
478     public static int getFoldersCount(long groupId, long parentFolderId)
479         throws com.liferay.portal.SystemException {
480         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
481 
482         return dlFolderLocalService.getFoldersCount(groupId, parentFolderId);
483     }
484 
485     public static void getSubfolderIds(java.util.List folderIds, long groupId,
486         long folderId) throws com.liferay.portal.SystemException {
487         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
488 
489         dlFolderLocalService.getSubfolderIds(folderIds, groupId, folderId);
490     }
491 
492     public static void reIndex(java.lang.String[] ids)
493         throws com.liferay.portal.SystemException {
494         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
495 
496         dlFolderLocalService.reIndex(ids);
497     }
498 
499     public static com.liferay.portal.kernel.search.Hits search(long companyId,
500         long groupId, long[] folderIds, java.lang.String keywords)
501         throws com.liferay.portal.PortalException, 
502             com.liferay.portal.SystemException {
503         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
504 
505         return dlFolderLocalService.search(companyId, groupId, folderIds,
506             keywords);
507     }
508 
509     public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
510         long folderId, long parentFolderId, java.lang.String name,
511         java.lang.String description)
512         throws com.liferay.portal.PortalException, 
513             com.liferay.portal.SystemException {
514         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
515 
516         return dlFolderLocalService.updateFolder(folderId, parentFolderId,
517             name, description);
518     }
519 }