1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.documentlibrary.service;
21  
22  
23  /**
24   * <a href="DLFolderLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class provides static methods for the
33   * <code>com.liferay.portlet.documentlibrary.service.DLFolderLocalService</code>
34   * bean. The static methods of this class calls the same methods of the bean
35   * instance. It's convenient to be able to just write one line to call a method
36   * on a bean instead of writing a lookup call and a method call.
37   * </p>
38   *
39   * @author Brian Wing Shun Chan
40   *
41   * @see com.liferay.portlet.documentlibrary.service.DLFolderLocalService
42   *
43   */
44  public class DLFolderLocalServiceUtil {
45      public static com.liferay.portlet.documentlibrary.model.DLFolder addDLFolder(
46          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
47          throws com.liferay.portal.SystemException {
48          return getService().addDLFolder(dlFolder);
49      }
50  
51      public static com.liferay.portlet.documentlibrary.model.DLFolder createDLFolder(
52          long folderId) {
53          return getService().createDLFolder(folderId);
54      }
55  
56      public static void deleteDLFolder(long folderId)
57          throws com.liferay.portal.PortalException,
58              com.liferay.portal.SystemException {
59          getService().deleteDLFolder(folderId);
60      }
61  
62      public static void deleteDLFolder(
63          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
64          throws com.liferay.portal.SystemException {
65          getService().deleteDLFolder(dlFolder);
66      }
67  
68      public static java.util.List<Object> dynamicQuery(
69          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
70          throws com.liferay.portal.SystemException {
71          return getService().dynamicQuery(dynamicQuery);
72      }
73  
74      public static java.util.List<Object> dynamicQuery(
75          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
76          int end) throws com.liferay.portal.SystemException {
77          return getService().dynamicQuery(dynamicQuery, start, end);
78      }
79  
80      public static com.liferay.portlet.documentlibrary.model.DLFolder getDLFolder(
81          long folderId)
82          throws com.liferay.portal.PortalException,
83              com.liferay.portal.SystemException {
84          return getService().getDLFolder(folderId);
85      }
86  
87      public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getDLFolders(
88          int start, int end) throws com.liferay.portal.SystemException {
89          return getService().getDLFolders(start, end);
90      }
91  
92      public static int getDLFoldersCount()
93          throws com.liferay.portal.SystemException {
94          return getService().getDLFoldersCount();
95      }
96  
97      public static com.liferay.portlet.documentlibrary.model.DLFolder updateDLFolder(
98          com.liferay.portlet.documentlibrary.model.DLFolder dlFolder)
99          throws com.liferay.portal.SystemException {
100         return getService().updateDLFolder(dlFolder);
101     }
102 
103     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
104         long userId, long plid, long parentFolderId, java.lang.String name,
105         java.lang.String description, boolean addCommunityPermissions,
106         boolean addGuestPermissions)
107         throws com.liferay.portal.PortalException,
108             com.liferay.portal.SystemException {
109         return getService()
110                    .addFolder(userId, plid, parentFolderId, name, description,
111             addCommunityPermissions, addGuestPermissions);
112     }
113 
114     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
115         java.lang.String uuid, long userId, long plid, long parentFolderId,
116         java.lang.String name, java.lang.String description,
117         boolean addCommunityPermissions, boolean addGuestPermissions)
118         throws com.liferay.portal.PortalException,
119             com.liferay.portal.SystemException {
120         return getService()
121                    .addFolder(uuid, userId, plid, parentFolderId, name,
122             description, addCommunityPermissions, addGuestPermissions);
123     }
124 
125     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
126         long userId, long plid, long parentFolderId, java.lang.String name,
127         java.lang.String description, java.lang.String[] communityPermissions,
128         java.lang.String[] guestPermissions)
129         throws com.liferay.portal.PortalException,
130             com.liferay.portal.SystemException {
131         return getService()
132                    .addFolder(userId, plid, parentFolderId, name, description,
133             communityPermissions, guestPermissions);
134     }
135 
136     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
137         java.lang.String uuid, long userId, long plid, long parentFolderId,
138         java.lang.String name, java.lang.String description,
139         java.lang.Boolean addCommunityPermissions,
140         java.lang.Boolean addGuestPermissions,
141         java.lang.String[] communityPermissions,
142         java.lang.String[] guestPermissions)
143         throws com.liferay.portal.PortalException,
144             com.liferay.portal.SystemException {
145         return getService()
146                    .addFolder(uuid, userId, plid, parentFolderId, name,
147             description, addCommunityPermissions, addGuestPermissions,
148             communityPermissions, guestPermissions);
149     }
150 
151     public static com.liferay.portlet.documentlibrary.model.DLFolder addFolderToGroup(
152         java.lang.String uuid, long userId, long groupId, long parentFolderId,
153         java.lang.String name, java.lang.String description,
154         java.lang.Boolean addCommunityPermissions,
155         java.lang.Boolean addGuestPermissions,
156         java.lang.String[] communityPermissions,
157         java.lang.String[] guestPermissions)
158         throws com.liferay.portal.PortalException,
159             com.liferay.portal.SystemException {
160         return getService()
161                    .addFolderToGroup(uuid, userId, groupId, parentFolderId,
162             name, description, addCommunityPermissions, addGuestPermissions,
163             communityPermissions, guestPermissions);
164     }
165 
166     public static void addFolderResources(long folderId,
167         boolean addCommunityPermissions, boolean addGuestPermissions)
168         throws com.liferay.portal.PortalException,
169             com.liferay.portal.SystemException {
170         getService()
171             .addFolderResources(folderId, addCommunityPermissions,
172             addGuestPermissions);
173     }
174 
175     public static void addFolderResources(
176         com.liferay.portlet.documentlibrary.model.DLFolder folder,
177         boolean addCommunityPermissions, boolean addGuestPermissions)
178         throws com.liferay.portal.PortalException,
179             com.liferay.portal.SystemException {
180         getService()
181             .addFolderResources(folder, addCommunityPermissions,
182             addGuestPermissions);
183     }
184 
185     public static void addFolderResources(long folderId,
186         java.lang.String[] communityPermissions,
187         java.lang.String[] guestPermissions)
188         throws com.liferay.portal.PortalException,
189             com.liferay.portal.SystemException {
190         getService()
191             .addFolderResources(folderId, communityPermissions, guestPermissions);
192     }
193 
194     public static void addFolderResources(
195         com.liferay.portlet.documentlibrary.model.DLFolder folder,
196         java.lang.String[] communityPermissions,
197         java.lang.String[] guestPermissions)
198         throws com.liferay.portal.PortalException,
199             com.liferay.portal.SystemException {
200         getService()
201             .addFolderResources(folder, communityPermissions, guestPermissions);
202     }
203 
204     public static void deleteFolder(long folderId)
205         throws com.liferay.portal.PortalException,
206             com.liferay.portal.SystemException {
207         getService().deleteFolder(folderId);
208     }
209 
210     public static void deleteFolder(
211         com.liferay.portlet.documentlibrary.model.DLFolder folder)
212         throws com.liferay.portal.PortalException,
213             com.liferay.portal.SystemException {
214         getService().deleteFolder(folder);
215     }
216 
217     public static void deleteFolders(long groupId)
218         throws com.liferay.portal.PortalException,
219             com.liferay.portal.SystemException {
220         getService().deleteFolders(groupId);
221     }
222 
223     public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
224         long folderId)
225         throws com.liferay.portal.PortalException,
226             com.liferay.portal.SystemException {
227         return getService().getFolder(folderId);
228     }
229 
230     public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
231         long groupId, long parentFolderId, java.lang.String name)
232         throws com.liferay.portal.PortalException,
233             com.liferay.portal.SystemException {
234         return getService().getFolder(groupId, parentFolderId, name);
235     }
236 
237     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
238         long companyId) throws com.liferay.portal.SystemException {
239         return getService().getFolders(companyId);
240     }
241 
242     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
243         long groupId, long parentFolderId)
244         throws com.liferay.portal.SystemException {
245         return getService().getFolders(groupId, parentFolderId);
246     }
247 
248     public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
249         long groupId, long parentFolderId, int start, int end)
250         throws com.liferay.portal.SystemException {
251         return getService().getFolders(groupId, parentFolderId, start, end);
252     }
253 
254     public static int getFoldersCount(long groupId, long parentFolderId)
255         throws com.liferay.portal.SystemException {
256         return getService().getFoldersCount(groupId, parentFolderId);
257     }
258 
259     public static void getSubfolderIds(java.util.List<Long> folderIds,
260         long groupId, long folderId) throws com.liferay.portal.SystemException {
261         getService().getSubfolderIds(folderIds, groupId, folderId);
262     }
263 
264     public static void reIndex(java.lang.String[] ids)
265         throws com.liferay.portal.SystemException {
266         getService().reIndex(ids);
267     }
268 
269     public static com.liferay.portal.kernel.search.Hits search(long companyId,
270         long groupId, long[] folderIds, java.lang.String keywords, int start,
271         int end) throws com.liferay.portal.SystemException {
272         return getService()
273                    .search(companyId, groupId, folderIds, keywords, start, end);
274     }
275 
276     public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
277         long folderId, long parentFolderId, java.lang.String name,
278         java.lang.String description)
279         throws com.liferay.portal.PortalException,
280             com.liferay.portal.SystemException {
281         return getService()
282                    .updateFolder(folderId, parentFolderId, name, description);
283     }
284 
285     public static DLFolderLocalService getService() {
286         if (_service == null) {
287             throw new RuntimeException("DLFolderLocalService is not set");
288         }
289 
290         return _service;
291     }
292 
293     public void setService(DLFolderLocalService service) {
294         _service = service;
295     }
296 
297     private static DLFolderLocalService _service;
298 }