1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portlet.documentlibrary.service;
16  
17  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18  import com.liferay.portal.kernel.util.MethodCache;
19  import com.liferay.portal.kernel.util.ReferenceRegistry;
20  
21  /**
22   * <a href="DLFolderLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
23   *
24   * <p>
25   * ServiceBuilder generated this class. Modifications in this class will be
26   * overwritten the next time is generated.
27   * </p>
28   *
29   * <p>
30   * This class provides static methods for the
31   * {@link DLFolderLocalService} bean. The static methods of
32   * this class calls the same methods of the bean instance. It's convenient to be
33   * able to just write one line to call a method on a bean instead of writing a
34   * lookup call and a method call.
35   * </p>
36   *
37   * @author    Brian Wing Shun Chan
38   * @see       DLFolderLocalService
39   * @generated
40   */
41  public class DLFolderLocalServiceUtil {
42      public static com.liferay.portlet.documentlibrary.model.DLFolder addDLFolder(
43          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
44          throws com.liferay.portal.SystemException {
45          return getService().addDLFolder(dlFolder);
46      }
47  
48      public static com.liferay.portlet.documentlibrary.model.DLFolder createDLFolder(
49          long folderId) {
50          return getService().createDLFolder(folderId);
51      }
52  
53      public static void deleteDLFolder(long folderId)
54          throws com.liferay.portal.PortalException,
55              com.liferay.portal.SystemException {
56          getService().deleteDLFolder(folderId);
57      }
58  
59      public static void deleteDLFolder(
60          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
61          throws com.liferay.portal.SystemException {
62          getService().deleteDLFolder(dlFolder);
63      }
64  
65      @SuppressWarnings("rawtypes")
66      public static java.util.List dynamicQuery(
67          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
68          throws com.liferay.portal.SystemException {
69          return getService().dynamicQuery(dynamicQuery);
70      }
71  
72      @SuppressWarnings("rawtypes")
73      public static java.util.List dynamicQuery(
74          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
75          int end) throws com.liferay.portal.SystemException {
76          return getService().dynamicQuery(dynamicQuery, start, end);
77      }
78  
79      @SuppressWarnings("rawtypes")
80      public static java.util.List dynamicQuery(
81          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
82          int end,
83          com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
84          throws com.liferay.portal.SystemException {
85          return getService()
86                     .dynamicQuery(dynamicQuery, start, end, orderByComparator);
87      }
88  
89      public static int dynamicQueryCount(
90          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
91          throws com.liferay.portal.SystemException {
92          return getService().dynamicQueryCount(dynamicQuery);
93      }
94  
95      public static com.liferay.portlet.documentlibrary.model.DLFolder getDLFolder(
96          long folderId)
97          throws com.liferay.portal.PortalException,
98              com.liferay.portal.SystemException {
99          return getService().getDLFolder(folderId);
100     }
101 
102     public static com.liferay.portlet.documentlibrary.model.DLFolder getDLFolderByUuidAndGroupId(
103         java.lang.String uuid, long groupId)
104         throws com.liferay.portal.PortalException,
105             com.liferay.portal.SystemException {
106         return getService().getDLFolderByUuidAndGroupId(uuid, groupId);
107     }
108 
109     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getDLFolders(
110         int start, int end) throws com.liferay.portal.SystemException {
111         return getService().getDLFolders(start, end);
112     }
113 
114     public static int getDLFoldersCount()
115         throws com.liferay.portal.SystemException {
116         return getService().getDLFoldersCount();
117     }
118 
119     public static com.liferay.portlet.documentlibrary.model.DLFolder updateDLFolder(
120         com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
121         throws com.liferay.portal.SystemException {
122         return getService().updateDLFolder(dlFolder);
123     }
124 
125     public static com.liferay.portlet.documentlibrary.model.DLFolder updateDLFolder(
126         com.liferay.portlet.documentlibrary.model.DLFolder dlFolder,
127         boolean merge) throws com.liferay.portal.SystemException {
128         return getService().updateDLFolder(dlFolder, merge);
129     }
130 
131     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
132         long userId, long groupId, long parentFolderId, java.lang.String name,
133         java.lang.String description,
134         com.liferay.portal.service.ServiceContext serviceContext)
135         throws com.liferay.portal.PortalException,
136             com.liferay.portal.SystemException {
137         return getService()
138                    .addFolder(userId, groupId, parentFolderId, name,
139             description, serviceContext);
140     }
141 
142     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
143         java.lang.String uuid, long userId, long groupId, long parentFolderId,
144         java.lang.String name, java.lang.String description,
145         com.liferay.portal.service.ServiceContext serviceContext)
146         throws com.liferay.portal.PortalException,
147             com.liferay.portal.SystemException {
148         return getService()
149                    .addFolder(uuid, userId, groupId, parentFolderId, name,
150             description, serviceContext);
151     }
152 
153     public static void addFolderResources(long folderId,
154         boolean addCommunityPermissions, boolean addGuestPermissions)
155         throws com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException {
157         getService()
158             .addFolderResources(folderId, addCommunityPermissions,
159             addGuestPermissions);
160     }
161 
162     public static void addFolderResources(
163         com.liferay.portlet.documentlibrary.model.DLFolder folder,
164         boolean addCommunityPermissions, boolean addGuestPermissions)
165         throws com.liferay.portal.PortalException,
166             com.liferay.portal.SystemException {
167         getService()
168             .addFolderResources(folder, addCommunityPermissions,
169             addGuestPermissions);
170     }
171 
172     public static void addFolderResources(long folderId,
173         java.lang.String[] communityPermissions,
174         java.lang.String[] guestPermissions)
175         throws com.liferay.portal.PortalException,
176             com.liferay.portal.SystemException {
177         getService()
178             .addFolderResources(folderId, communityPermissions, guestPermissions);
179     }
180 
181     public static void addFolderResources(
182         com.liferay.portlet.documentlibrary.model.DLFolder folder,
183         java.lang.String[] communityPermissions,
184         java.lang.String[] guestPermissions)
185         throws com.liferay.portal.PortalException,
186             com.liferay.portal.SystemException {
187         getService()
188             .addFolderResources(folder, communityPermissions, guestPermissions);
189     }
190 
191     public static void deleteFolder(long folderId)
192         throws com.liferay.portal.PortalException,
193             com.liferay.portal.SystemException {
194         getService().deleteFolder(folderId);
195     }
196 
197     public static void deleteFolder(
198         com.liferay.portlet.documentlibrary.model.DLFolder folder)
199         throws com.liferay.portal.PortalException,
200             com.liferay.portal.SystemException {
201         getService().deleteFolder(folder);
202     }
203 
204     public static void deleteFolders(long groupId)
205         throws com.liferay.portal.PortalException,
206             com.liferay.portal.SystemException {
207         getService().deleteFolders(groupId);
208     }
209 
210     public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
211         long folderId, int start, int end)
212         throws com.liferay.portal.SystemException {
213         return getService().getFileEntriesAndFileShortcuts(folderId, start, end);
214     }
215 
216     public static java.util.List<java.lang.Object> getFileEntriesAndFileShortcuts(
217         java.util.List<java.lang.Long> folderIds, int start, int end)
218         throws com.liferay.portal.SystemException {
219         return getService().getFileEntriesAndFileShortcuts(folderIds, start, end);
220     }
221 
222     public static int getFileEntriesAndFileShortcutsCount(long folderId)
223         throws com.liferay.portal.SystemException {
224         return getService().getFileEntriesAndFileShortcutsCount(folderId);
225     }
226 
227     public static int getFileEntriesAndFileShortcutsCount(
228         java.util.List<java.lang.Long> folderIds)
229         throws com.liferay.portal.SystemException {
230         return getService().getFileEntriesAndFileShortcutsCount(folderIds);
231     }
232 
233     public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
234         long folderId)
235         throws com.liferay.portal.PortalException,
236             com.liferay.portal.SystemException {
237         return getService().getFolder(folderId);
238     }
239 
240     public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
241         long groupId, long parentFolderId, java.lang.String name)
242         throws com.liferay.portal.PortalException,
243             com.liferay.portal.SystemException {
244         return getService().getFolder(groupId, parentFolderId, name);
245     }
246 
247     public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
248         long folderId, int start, int end)
249         throws com.liferay.portal.SystemException {
250         return getService()
251                    .getFoldersAndFileEntriesAndFileShortcuts(folderId, start,
252             end);
253     }
254 
255     public static java.util.List<java.lang.Object> getFoldersAndFileEntriesAndFileShortcuts(
256         java.util.List<java.lang.Long> folderIds, int start, int end)
257         throws com.liferay.portal.SystemException {
258         return getService()
259                    .getFoldersAndFileEntriesAndFileShortcuts(folderIds, start,
260             end);
261     }
262 
263     public static int getFoldersAndFileEntriesAndFileShortcutsCount(
264         long folderId) throws com.liferay.portal.SystemException {
265         return getService()
266                    .getFoldersAndFileEntriesAndFileShortcutsCount(folderId);
267     }
268 
269     public static int getFoldersAndFileEntriesAndFileShortcutsCount(
270         java.util.List<java.lang.Long> folderIds)
271         throws com.liferay.portal.SystemException {
272         return getService()
273                    .getFoldersAndFileEntriesAndFileShortcutsCount(folderIds);
274     }
275 
276     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
277         long companyId) throws com.liferay.portal.SystemException {
278         return getService().getFolders(companyId);
279     }
280 
281     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
282         long groupId, long parentFolderId)
283         throws com.liferay.portal.SystemException {
284         return getService().getFolders(groupId, parentFolderId);
285     }
286 
287     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
288         long groupId, long parentFolderId, int start, int end)
289         throws com.liferay.portal.SystemException {
290         return getService().getFolders(groupId, parentFolderId, start, end);
291     }
292 
293     public static int getFoldersCount(long groupId, long parentFolderId)
294         throws com.liferay.portal.SystemException {
295         return getService().getFoldersCount(groupId, parentFolderId);
296     }
297 
298     public static void getSubfolderIds(
299         java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
300         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         com.liferay.portal.service.ServiceContext serviceContext)
321         throws com.liferay.portal.PortalException,
322             com.liferay.portal.SystemException {
323         return getService()
324                    .updateFolder(folderId, parentFolderId, name, description,
325             serviceContext);
326     }
327 
328     public static DLFolderLocalService getService() {
329         if (_service == null) {
330             _service = (DLFolderLocalService)PortalBeanLocatorUtil.locate(DLFolderLocalService.class.getName());
331 
332             ReferenceRegistry.registerReference(DLFolderLocalServiceUtil.class,
333                 "_service");
334             MethodCache.remove(DLFolderLocalService.class);
335         }
336 
337         return _service;
338     }
339 
340     public void setService(DLFolderLocalService service) {
341         MethodCache.remove(DLFolderLocalService.class);
342 
343         _service = service;
344 
345         ReferenceRegistry.registerReference(DLFolderLocalServiceUtil.class,
346             "_service");
347         MethodCache.remove(DLFolderLocalService.class);
348     }
349 
350     private static DLFolderLocalService _service;
351 }