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 updateDLFolder(
107         com.liferay.portlet.documentlibrary.model.DLFolder dlFolder,
108         boolean merge) throws com.liferay.portal.SystemException {
109         return getService().updateDLFolder(dlFolder, merge);
110     }
111 
112     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
113         long userId, long groupId, long parentFolderId, java.lang.String name,
114         java.lang.String description,
115         com.liferay.portal.service.ServiceContext serviceContext)
116         throws com.liferay.portal.PortalException,
117             com.liferay.portal.SystemException {
118         return getService()
119                    .addFolder(userId, groupId, parentFolderId, name,
120             description, serviceContext);
121     }
122 
123     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
124         java.lang.String uuid, long userId, long groupId, long parentFolderId,
125         java.lang.String name, java.lang.String description,
126         com.liferay.portal.service.ServiceContext serviceContext)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException {
129         return getService()
130                    .addFolder(uuid, userId, groupId, parentFolderId, name,
131             description, serviceContext);
132     }
133 
134     public static void addFolderResources(long folderId,
135         boolean addCommunityPermissions, boolean addGuestPermissions)
136         throws com.liferay.portal.PortalException,
137             com.liferay.portal.SystemException {
138         getService()
139             .addFolderResources(folderId, addCommunityPermissions,
140             addGuestPermissions);
141     }
142 
143     public static void addFolderResources(
144         com.liferay.portlet.documentlibrary.model.DLFolder folder,
145         boolean addCommunityPermissions, boolean addGuestPermissions)
146         throws com.liferay.portal.PortalException,
147             com.liferay.portal.SystemException {
148         getService()
149             .addFolderResources(folder, addCommunityPermissions,
150             addGuestPermissions);
151     }
152 
153     public static void addFolderResources(long folderId,
154         java.lang.String[] communityPermissions,
155         java.lang.String[] guestPermissions)
156         throws com.liferay.portal.PortalException,
157             com.liferay.portal.SystemException {
158         getService()
159             .addFolderResources(folderId, communityPermissions, guestPermissions);
160     }
161 
162     public static void addFolderResources(
163         com.liferay.portlet.documentlibrary.model.DLFolder folder,
164         java.lang.String[] communityPermissions,
165         java.lang.String[] guestPermissions)
166         throws com.liferay.portal.PortalException,
167             com.liferay.portal.SystemException {
168         getService()
169             .addFolderResources(folder, communityPermissions, guestPermissions);
170     }
171 
172     public static void deleteFolder(long folderId)
173         throws com.liferay.portal.PortalException,
174             com.liferay.portal.SystemException {
175         getService().deleteFolder(folderId);
176     }
177 
178     public static void deleteFolder(
179         com.liferay.portlet.documentlibrary.model.DLFolder folder)
180         throws com.liferay.portal.PortalException,
181             com.liferay.portal.SystemException {
182         getService().deleteFolder(folder);
183     }
184 
185     public static void deleteFolders(long groupId)
186         throws com.liferay.portal.PortalException,
187             com.liferay.portal.SystemException {
188         getService().deleteFolders(groupId);
189     }
190 
191     public static java.util.List<Object> getFileEntriesAndFileShortcuts(
192         long folderId, int start, int end)
193         throws com.liferay.portal.SystemException {
194         return getService().getFileEntriesAndFileShortcuts(folderId, start, end);
195     }
196 
197     public static java.util.List<Object> getFileEntriesAndFileShortcuts(
198         java.util.List<Long> folderIds, int start, int end)
199         throws com.liferay.portal.SystemException {
200         return getService().getFileEntriesAndFileShortcuts(folderIds, start, end);
201     }
202 
203     public static int getFileEntriesAndFileShortcutsCount(long folderId)
204         throws com.liferay.portal.SystemException {
205         return getService().getFileEntriesAndFileShortcutsCount(folderId);
206     }
207 
208     public static int getFileEntriesAndFileShortcutsCount(
209         java.util.List<Long> folderIds)
210         throws com.liferay.portal.SystemException {
211         return getService().getFileEntriesAndFileShortcutsCount(folderIds);
212     }
213 
214     public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
215         long folderId)
216         throws com.liferay.portal.PortalException,
217             com.liferay.portal.SystemException {
218         return getService().getFolder(folderId);
219     }
220 
221     public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
222         long groupId, long parentFolderId, java.lang.String name)
223         throws com.liferay.portal.PortalException,
224             com.liferay.portal.SystemException {
225         return getService().getFolder(groupId, parentFolderId, name);
226     }
227 
228     public static java.util.List<Object> getFoldersAndFileEntriesAndFileShortcuts(
229         long folderId, int start, int end)
230         throws com.liferay.portal.SystemException {
231         return getService()
232                    .getFoldersAndFileEntriesAndFileShortcuts(folderId, start,
233             end);
234     }
235 
236     public static java.util.List<Object> getFoldersAndFileEntriesAndFileShortcuts(
237         java.util.List<Long> folderIds, int start, int end)
238         throws com.liferay.portal.SystemException {
239         return getService()
240                    .getFoldersAndFileEntriesAndFileShortcuts(folderIds, start,
241             end);
242     }
243 
244     public static int getFoldersAndFileEntriesAndFileShortcutsCount(
245         long folderId) throws com.liferay.portal.SystemException {
246         return getService()
247                    .getFoldersAndFileEntriesAndFileShortcutsCount(folderId);
248     }
249 
250     public static int getFoldersAndFileEntriesAndFileShortcutsCount(
251         java.util.List<Long> folderIds)
252         throws com.liferay.portal.SystemException {
253         return getService()
254                    .getFoldersAndFileEntriesAndFileShortcutsCount(folderIds);
255     }
256 
257     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
258         long companyId) throws com.liferay.portal.SystemException {
259         return getService().getFolders(companyId);
260     }
261 
262     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
263         long groupId, long parentFolderId)
264         throws com.liferay.portal.SystemException {
265         return getService().getFolders(groupId, parentFolderId);
266     }
267 
268     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
269         long groupId, long parentFolderId, int start, int end)
270         throws com.liferay.portal.SystemException {
271         return getService().getFolders(groupId, parentFolderId, start, end);
272     }
273 
274     public static int getFoldersCount(long groupId, long parentFolderId)
275         throws com.liferay.portal.SystemException {
276         return getService().getFoldersCount(groupId, parentFolderId);
277     }
278 
279     public static void getSubfolderIds(java.util.List<Long> folderIds,
280         long groupId, long folderId) throws com.liferay.portal.SystemException {
281         getService().getSubfolderIds(folderIds, groupId, folderId);
282     }
283 
284     public static void reIndex(java.lang.String[] ids)
285         throws com.liferay.portal.SystemException {
286         getService().reIndex(ids);
287     }
288 
289     public static com.liferay.portal.kernel.search.Hits search(long companyId,
290         long groupId, long userId, long[] folderIds, java.lang.String keywords,
291         int start, int end) throws com.liferay.portal.SystemException {
292         return getService()
293                    .search(companyId, groupId, userId, folderIds, keywords,
294             start, end);
295     }
296 
297     public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
298         long folderId, long parentFolderId, java.lang.String name,
299         java.lang.String description,
300         com.liferay.portal.service.ServiceContext serviceContext)
301         throws com.liferay.portal.PortalException,
302             com.liferay.portal.SystemException {
303         return getService()
304                    .updateFolder(folderId, parentFolderId, name, description,
305             serviceContext);
306     }
307 
308     public static DLFolderLocalService getService() {
309         if (_service == null) {
310             throw new RuntimeException("DLFolderLocalService is not set");
311         }
312 
313         return _service;
314     }
315 
316     public void setService(DLFolderLocalService service) {
317         _service = service;
318     }
319 
320     private static DLFolderLocalService _service;
321 }