1   /**
2    * Copyright (c) 2000-2008 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.imagegallery.service;
24  
25  
26  /**
27   * <a href="IGFolderLocalServiceUtil.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.imagegallery.service.IGFolderLocalService</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   * <p>
43   * <code>com.liferay.portlet.imagegallery.service.IGFolderLocalServiceFactory</code>
44   * is responsible for the lookup of the bean.
45   * </p>
46   *
47   * @author Brian Wing Shun Chan
48   *
49   * @see com.liferay.portlet.imagegallery.service.IGFolderLocalService
50   * @see com.liferay.portlet.imagegallery.service.IGFolderLocalServiceFactory
51   *
52   */
53  public class IGFolderLocalServiceUtil {
54      public static com.liferay.portlet.imagegallery.model.IGFolder addIGFolder(
55          com.liferay.portlet.imagegallery.model.IGFolder igFolder)
56          throws com.liferay.portal.SystemException {
57          IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
58  
59          return igFolderLocalService.addIGFolder(igFolder);
60      }
61  
62      public static void deleteIGFolder(long folderId)
63          throws com.liferay.portal.PortalException,
64              com.liferay.portal.SystemException {
65          IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
66  
67          igFolderLocalService.deleteIGFolder(folderId);
68      }
69  
70      public static void deleteIGFolder(
71          com.liferay.portlet.imagegallery.model.IGFolder igFolder)
72          throws com.liferay.portal.SystemException {
73          IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
74  
75          igFolderLocalService.deleteIGFolder(igFolder);
76      }
77  
78      public static java.util.List<Object> dynamicQuery(
79          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
80          throws com.liferay.portal.SystemException {
81          IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
82  
83          return igFolderLocalService.dynamicQuery(dynamicQuery);
84      }
85  
86      public static java.util.List<Object> dynamicQuery(
87          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
88          int end) throws com.liferay.portal.SystemException {
89          IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
90  
91          return igFolderLocalService.dynamicQuery(dynamicQuery, start, end);
92      }
93  
94      public static com.liferay.portlet.imagegallery.model.IGFolder getIGFolder(
95          long folderId)
96          throws com.liferay.portal.PortalException,
97              com.liferay.portal.SystemException {
98          IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
99  
100         return igFolderLocalService.getIGFolder(folderId);
101     }
102 
103     public static com.liferay.portlet.imagegallery.model.IGFolder updateIGFolder(
104         com.liferay.portlet.imagegallery.model.IGFolder igFolder)
105         throws com.liferay.portal.SystemException {
106         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
107 
108         return igFolderLocalService.updateIGFolder(igFolder);
109     }
110 
111     public static com.liferay.portlet.imagegallery.model.IGFolder addFolder(
112         long userId, long plid, long parentFolderId, java.lang.String name,
113         java.lang.String description, boolean addCommunityPermissions,
114         boolean addGuestPermissions)
115         throws com.liferay.portal.PortalException,
116             com.liferay.portal.SystemException {
117         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
118 
119         return igFolderLocalService.addFolder(userId, plid, parentFolderId,
120             name, description, addCommunityPermissions, addGuestPermissions);
121     }
122 
123     public static com.liferay.portlet.imagegallery.model.IGFolder addFolder(
124         java.lang.String uuid, long userId, long plid, long parentFolderId,
125         java.lang.String name, java.lang.String description,
126         boolean addCommunityPermissions, boolean addGuestPermissions)
127         throws com.liferay.portal.PortalException,
128             com.liferay.portal.SystemException {
129         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
130 
131         return igFolderLocalService.addFolder(uuid, userId, plid,
132             parentFolderId, name, description, addCommunityPermissions,
133             addGuestPermissions);
134     }
135 
136     public static com.liferay.portlet.imagegallery.model.IGFolder addFolder(
137         long userId, long plid, long parentFolderId, java.lang.String name,
138         java.lang.String description, java.lang.String[] communityPermissions,
139         java.lang.String[] guestPermissions)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException {
142         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
143 
144         return igFolderLocalService.addFolder(userId, plid, parentFolderId,
145             name, description, communityPermissions, guestPermissions);
146     }
147 
148     public static com.liferay.portlet.imagegallery.model.IGFolder addFolder(
149         java.lang.String uuid, long userId, long plid, long parentFolderId,
150         java.lang.String name, java.lang.String description,
151         java.lang.Boolean addCommunityPermissions,
152         java.lang.Boolean addGuestPermissions,
153         java.lang.String[] communityPermissions,
154         java.lang.String[] guestPermissions)
155         throws com.liferay.portal.PortalException,
156             com.liferay.portal.SystemException {
157         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
158 
159         return igFolderLocalService.addFolder(uuid, userId, plid,
160             parentFolderId, name, description, addCommunityPermissions,
161             addGuestPermissions, communityPermissions, guestPermissions);
162     }
163 
164     public static com.liferay.portlet.imagegallery.model.IGFolder addFolderToGroup(
165         java.lang.String uuid, long userId, long groupId, long parentFolderId,
166         java.lang.String name, java.lang.String description,
167         java.lang.Boolean addCommunityPermissions,
168         java.lang.Boolean addGuestPermissions,
169         java.lang.String[] communityPermissions,
170         java.lang.String[] guestPermissions)
171         throws com.liferay.portal.PortalException,
172             com.liferay.portal.SystemException {
173         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
174 
175         return igFolderLocalService.addFolderToGroup(uuid, userId, groupId,
176             parentFolderId, name, description, addCommunityPermissions,
177             addGuestPermissions, communityPermissions, guestPermissions);
178     }
179 
180     public static void addFolderResources(long folderId,
181         boolean addCommunityPermissions, boolean addGuestPermissions)
182         throws com.liferay.portal.PortalException,
183             com.liferay.portal.SystemException {
184         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
185 
186         igFolderLocalService.addFolderResources(folderId,
187             addCommunityPermissions, addGuestPermissions);
188     }
189 
190     public static void addFolderResources(
191         com.liferay.portlet.imagegallery.model.IGFolder folder,
192         boolean addCommunityPermissions, boolean addGuestPermissions)
193         throws com.liferay.portal.PortalException,
194             com.liferay.portal.SystemException {
195         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
196 
197         igFolderLocalService.addFolderResources(folder,
198             addCommunityPermissions, addGuestPermissions);
199     }
200 
201     public static void addFolderResources(long folderId,
202         java.lang.String[] communityPermissions,
203         java.lang.String[] guestPermissions)
204         throws com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException {
206         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
207 
208         igFolderLocalService.addFolderResources(folderId, communityPermissions,
209             guestPermissions);
210     }
211 
212     public static void addFolderResources(
213         com.liferay.portlet.imagegallery.model.IGFolder folder,
214         java.lang.String[] communityPermissions,
215         java.lang.String[] guestPermissions)
216         throws com.liferay.portal.PortalException,
217             com.liferay.portal.SystemException {
218         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
219 
220         igFolderLocalService.addFolderResources(folder, communityPermissions,
221             guestPermissions);
222     }
223 
224     public static void deleteFolder(long folderId)
225         throws com.liferay.portal.PortalException,
226             com.liferay.portal.SystemException {
227         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
228 
229         igFolderLocalService.deleteFolder(folderId);
230     }
231 
232     public static void deleteFolder(
233         com.liferay.portlet.imagegallery.model.IGFolder folder)
234         throws com.liferay.portal.PortalException,
235             com.liferay.portal.SystemException {
236         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
237 
238         igFolderLocalService.deleteFolder(folder);
239     }
240 
241     public static void deleteFolders(long groupId)
242         throws com.liferay.portal.PortalException,
243             com.liferay.portal.SystemException {
244         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
245 
246         igFolderLocalService.deleteFolders(groupId);
247     }
248 
249     public static com.liferay.portlet.imagegallery.model.IGFolder getFolder(
250         long folderId)
251         throws com.liferay.portal.PortalException,
252             com.liferay.portal.SystemException {
253         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
254 
255         return igFolderLocalService.getFolder(folderId);
256     }
257 
258     public static com.liferay.portlet.imagegallery.model.IGFolder getFolder(
259         long groupId, long parentFolderId, java.lang.String name)
260         throws com.liferay.portal.PortalException,
261             com.liferay.portal.SystemException {
262         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
263 
264         return igFolderLocalService.getFolder(groupId, parentFolderId, name);
265     }
266 
267     public static java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> getFolders(
268         long groupId) throws com.liferay.portal.SystemException {
269         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
270 
271         return igFolderLocalService.getFolders(groupId);
272     }
273 
274     public static java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> getFolders(
275         long groupId, long parentFolderId)
276         throws com.liferay.portal.SystemException {
277         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
278 
279         return igFolderLocalService.getFolders(groupId, parentFolderId);
280     }
281 
282     public static java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> getFolders(
283         long groupId, long parentFolderId, int start, int end)
284         throws com.liferay.portal.SystemException {
285         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
286 
287         return igFolderLocalService.getFolders(groupId, parentFolderId, start,
288             end);
289     }
290 
291     public static int getFoldersCount(long groupId, long parentFolderId)
292         throws com.liferay.portal.SystemException {
293         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
294 
295         return igFolderLocalService.getFoldersCount(groupId, parentFolderId);
296     }
297 
298     public static void getSubfolderIds(java.util.List<Long> folderIds,
299         long groupId, long folderId) throws com.liferay.portal.SystemException {
300         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
301 
302         igFolderLocalService.getSubfolderIds(folderIds, groupId, folderId);
303     }
304 
305     public static void reIndex(java.lang.String[] ids)
306         throws com.liferay.portal.SystemException {
307         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
308 
309         igFolderLocalService.reIndex(ids);
310     }
311 
312     public static com.liferay.portal.kernel.search.Hits search(long companyId,
313         long groupId, long[] folderIds, java.lang.String keywords, int start,
314         int end) throws com.liferay.portal.SystemException {
315         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
316 
317         return igFolderLocalService.search(companyId, groupId, folderIds,
318             keywords, start, end);
319     }
320 
321     public static com.liferay.portlet.imagegallery.model.IGFolder updateFolder(
322         long folderId, long parentFolderId, java.lang.String name,
323         java.lang.String description, boolean mergeWithParentFolder)
324         throws com.liferay.portal.PortalException,
325             com.liferay.portal.SystemException {
326         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
327 
328         return igFolderLocalService.updateFolder(folderId, parentFolderId,
329             name, description, mergeWithParentFolder);
330     }
331 }