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