1   /**
2    * Copyright (c) 2000-2007 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   * <a href="DLFolderLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
27   *
28   * <p>
29   * ServiceBuilder generated this class. Modifications in this class will be overwritten
30   * the next time is generated.
31   * </p>
32   *
33   * <p>
34   * This class provides static methods for the <code>com.liferay.portlet.documentlibrary.service.DLFolderLocalService</code>
35   * bean. The static methods of this class calls the same methods of the bean instance.
36   * It's convenient to be able to just write one line to call a method on a bean
37   * instead of writing a lookup call and a method call.
38   * </p>
39   *
40   * <p>
41   * <code>com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceFactory</code>
42   * is responsible for the lookup of the bean.
43   * </p>
44   *
45   * @author Brian Wing Shun Chan
46   *
47   * @see com.liferay.portlet.documentlibrary.service.DLFolderLocalService
48   * @see com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceFactory
49   *
50   */
51  public class DLFolderLocalServiceUtil {
52      public static com.liferay.portlet.documentlibrary.model.DLFolder addDLFolder(
53          com.liferay.portlet.documentlibrary.model.DLFolder model)
54          throws com.liferay.portal.SystemException {
55          DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
56  
57          return dlFolderLocalService.addDLFolder(model);
58      }
59  
60      public static java.util.List dynamicQuery(
61          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
62          throws com.liferay.portal.SystemException {
63          DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
64  
65          return dlFolderLocalService.dynamicQuery(queryInitializer);
66      }
67  
68      public static java.util.List dynamicQuery(
69          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
70          int begin, int end) throws com.liferay.portal.SystemException {
71          DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
72  
73          return dlFolderLocalService.dynamicQuery(queryInitializer, begin, end);
74      }
75  
76      public static com.liferay.portlet.documentlibrary.model.DLFolder updateDLFolder(
77          com.liferay.portlet.documentlibrary.model.DLFolder model)
78          throws com.liferay.portal.SystemException {
79          DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
80  
81          return dlFolderLocalService.updateDLFolder(model);
82      }
83  
84      public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
85          long userId, long plid, long parentFolderId, java.lang.String name,
86          java.lang.String description, boolean addCommunityPermissions,
87          boolean addGuestPermissions)
88          throws com.liferay.portal.PortalException, 
89              com.liferay.portal.SystemException {
90          DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
91  
92          return dlFolderLocalService.addFolder(userId, plid, parentFolderId,
93              name, description, addCommunityPermissions, addGuestPermissions);
94      }
95  
96      public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
97          long userId, long plid, long parentFolderId, java.lang.String name,
98          java.lang.String description, java.lang.String[] communityPermissions,
99          java.lang.String[] guestPermissions)
100         throws com.liferay.portal.PortalException, 
101             com.liferay.portal.SystemException {
102         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
103 
104         return dlFolderLocalService.addFolder(userId, plid, parentFolderId,
105             name, description, communityPermissions, guestPermissions);
106     }
107 
108     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
109         long userId, long plid, long parentFolderId, java.lang.String name,
110         java.lang.String description,
111         java.lang.Boolean addCommunityPermissions,
112         java.lang.Boolean addGuestPermissions,
113         java.lang.String[] communityPermissions,
114         java.lang.String[] guestPermissions)
115         throws com.liferay.portal.PortalException, 
116             com.liferay.portal.SystemException {
117         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
118 
119         return dlFolderLocalService.addFolder(userId, plid, parentFolderId,
120             name, description, addCommunityPermissions, addGuestPermissions,
121             communityPermissions, guestPermissions);
122     }
123 
124     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolderToGroup(
125         long userId, long groupId, long parentFolderId, java.lang.String name,
126         java.lang.String description,
127         java.lang.Boolean addCommunityPermissions,
128         java.lang.Boolean addGuestPermissions,
129         java.lang.String[] communityPermissions,
130         java.lang.String[] guestPermissions)
131         throws com.liferay.portal.PortalException, 
132             com.liferay.portal.SystemException {
133         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
134 
135         return dlFolderLocalService.addFolderToGroup(userId, groupId,
136             parentFolderId, name, description, addCommunityPermissions,
137             addGuestPermissions, communityPermissions, guestPermissions);
138     }
139 
140     public static void addFolderResources(long folderId,
141         boolean addCommunityPermissions, boolean addGuestPermissions)
142         throws com.liferay.portal.PortalException, 
143             com.liferay.portal.SystemException {
144         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
145         dlFolderLocalService.addFolderResources(folderId,
146             addCommunityPermissions, addGuestPermissions);
147     }
148 
149     public static void addFolderResources(
150         com.liferay.portlet.documentlibrary.model.DLFolder folder,
151         boolean addCommunityPermissions, boolean addGuestPermissions)
152         throws com.liferay.portal.PortalException, 
153             com.liferay.portal.SystemException {
154         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
155         dlFolderLocalService.addFolderResources(folder,
156             addCommunityPermissions, addGuestPermissions);
157     }
158 
159     public static void addFolderResources(long folderId,
160         java.lang.String[] communityPermissions,
161         java.lang.String[] guestPermissions)
162         throws com.liferay.portal.PortalException, 
163             com.liferay.portal.SystemException {
164         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
165         dlFolderLocalService.addFolderResources(folderId, communityPermissions,
166             guestPermissions);
167     }
168 
169     public static void addFolderResources(
170         com.liferay.portlet.documentlibrary.model.DLFolder folder,
171         java.lang.String[] communityPermissions,
172         java.lang.String[] guestPermissions)
173         throws com.liferay.portal.PortalException, 
174             com.liferay.portal.SystemException {
175         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
176         dlFolderLocalService.addFolderResources(folder, communityPermissions,
177             guestPermissions);
178     }
179 
180     public static void deleteFolder(long folderId)
181         throws com.liferay.portal.PortalException, 
182             com.liferay.portal.SystemException {
183         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
184         dlFolderLocalService.deleteFolder(folderId);
185     }
186 
187     public static void deleteFolder(
188         com.liferay.portlet.documentlibrary.model.DLFolder folder)
189         throws com.liferay.portal.PortalException, 
190             com.liferay.portal.SystemException {
191         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
192         dlFolderLocalService.deleteFolder(folder);
193     }
194 
195     public static void deleteFolders(long groupId)
196         throws com.liferay.portal.PortalException, 
197             com.liferay.portal.SystemException {
198         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
199         dlFolderLocalService.deleteFolders(groupId);
200     }
201 
202     public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
203         long folderId)
204         throws com.liferay.portal.PortalException, 
205             com.liferay.portal.SystemException {
206         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
207 
208         return dlFolderLocalService.getFolder(folderId);
209     }
210 
211     public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
212         long parentFolderId, java.lang.String name)
213         throws com.liferay.portal.PortalException, 
214             com.liferay.portal.SystemException {
215         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
216 
217         return dlFolderLocalService.getFolder(parentFolderId, name);
218     }
219 
220     public static java.util.List getFolders(long companyId)
221         throws com.liferay.portal.SystemException {
222         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
223 
224         return dlFolderLocalService.getFolders(companyId);
225     }
226 
227     public static java.util.List getFolders(long groupId, long parentFolderId)
228         throws com.liferay.portal.SystemException {
229         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
230 
231         return dlFolderLocalService.getFolders(groupId, parentFolderId);
232     }
233 
234     public static java.util.List getFolders(long groupId, long parentFolderId,
235         int begin, int end) throws com.liferay.portal.SystemException {
236         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
237 
238         return dlFolderLocalService.getFolders(groupId, parentFolderId, begin,
239             end);
240     }
241 
242     public static int getFoldersCount(long groupId, long parentFolderId)
243         throws com.liferay.portal.SystemException {
244         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
245 
246         return dlFolderLocalService.getFoldersCount(groupId, parentFolderId);
247     }
248 
249     public static void getSubfolderIds(java.util.List folderIds, long groupId,
250         long folderId) throws com.liferay.portal.SystemException {
251         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
252         dlFolderLocalService.getSubfolderIds(folderIds, groupId, folderId);
253     }
254 
255     public static void reIndex(java.lang.String[] ids)
256         throws com.liferay.portal.SystemException {
257         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
258         dlFolderLocalService.reIndex(ids);
259     }
260 
261     public static com.liferay.portal.kernel.search.Hits search(long companyId,
262         long groupId, long[] folderIds, java.lang.String keywords)
263         throws com.liferay.portal.PortalException, 
264             com.liferay.portal.SystemException {
265         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
266 
267         return dlFolderLocalService.search(companyId, groupId, folderIds,
268             keywords);
269     }
270 
271     public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
272         long folderId, long parentFolderId, java.lang.String name,
273         java.lang.String description)
274         throws com.liferay.portal.PortalException, 
275             com.liferay.portal.SystemException {
276         DLFolderLocalService dlFolderLocalService = DLFolderLocalServiceFactory.getService();
277 
278         return dlFolderLocalService.updateFolder(folderId, parentFolderId,
279             name, description);
280     }
281 }