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.PortalException,
73              com.liferay.portal.SystemException {
74          IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
75  
76          igFolderLocalService.deleteIGFolder(igFolder);
77      }
78  
79      public static java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> dynamicQuery(
80          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
81          throws com.liferay.portal.SystemException {
82          IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
83  
84          return igFolderLocalService.dynamicQuery(queryInitializer);
85      }
86  
87      public static java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> dynamicQuery(
88          com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
89          int begin, int end) throws com.liferay.portal.SystemException {
90          IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
91  
92          return igFolderLocalService.dynamicQuery(queryInitializer, begin, end);
93      }
94  
95      public static com.liferay.portlet.imagegallery.model.IGFolder updateIGFolder(
96          com.liferay.portlet.imagegallery.model.IGFolder igFolder)
97          throws com.liferay.portal.SystemException {
98          IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
99  
100         return igFolderLocalService.updateIGFolder(igFolder);
101     }
102 
103     public static com.liferay.portlet.imagegallery.model.IGFolder 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         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
110 
111         return igFolderLocalService.addFolder(userId, plid, parentFolderId,
112             name, description, addCommunityPermissions, addGuestPermissions);
113     }
114 
115     public static com.liferay.portlet.imagegallery.model.IGFolder addFolder(
116         java.lang.String uuid, long userId, long plid, long parentFolderId,
117         java.lang.String name, java.lang.String description,
118         boolean addCommunityPermissions, boolean addGuestPermissions)
119         throws com.liferay.portal.PortalException,
120             com.liferay.portal.SystemException {
121         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
122 
123         return igFolderLocalService.addFolder(uuid, userId, plid,
124             parentFolderId, name, description, addCommunityPermissions,
125             addGuestPermissions);
126     }
127 
128     public static com.liferay.portlet.imagegallery.model.IGFolder addFolder(
129         long userId, long plid, long parentFolderId, java.lang.String name,
130         java.lang.String description, java.lang.String[] communityPermissions,
131         java.lang.String[] guestPermissions)
132         throws com.liferay.portal.PortalException,
133             com.liferay.portal.SystemException {
134         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
135 
136         return igFolderLocalService.addFolder(userId, plid, parentFolderId,
137             name, description, communityPermissions, guestPermissions);
138     }
139 
140     public static com.liferay.portlet.imagegallery.model.IGFolder addFolder(
141         java.lang.String uuid, long userId, long plid, long parentFolderId,
142         java.lang.String name, java.lang.String description,
143         java.lang.Boolean addCommunityPermissions,
144         java.lang.Boolean addGuestPermissions,
145         java.lang.String[] communityPermissions,
146         java.lang.String[] guestPermissions)
147         throws com.liferay.portal.PortalException,
148             com.liferay.portal.SystemException {
149         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
150 
151         return igFolderLocalService.addFolder(uuid, userId, plid,
152             parentFolderId, name, description, addCommunityPermissions,
153             addGuestPermissions, communityPermissions, guestPermissions);
154     }
155 
156     public static com.liferay.portlet.imagegallery.model.IGFolder addFolderToGroup(
157         java.lang.String uuid, long userId, long groupId, long parentFolderId,
158         java.lang.String name, java.lang.String description,
159         java.lang.Boolean addCommunityPermissions,
160         java.lang.Boolean addGuestPermissions,
161         java.lang.String[] communityPermissions,
162         java.lang.String[] guestPermissions)
163         throws com.liferay.portal.PortalException,
164             com.liferay.portal.SystemException {
165         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
166 
167         return igFolderLocalService.addFolderToGroup(uuid, userId, groupId,
168             parentFolderId, name, description, addCommunityPermissions,
169             addGuestPermissions, 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         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
177 
178         igFolderLocalService.addFolderResources(folderId,
179             addCommunityPermissions, addGuestPermissions);
180     }
181 
182     public static void addFolderResources(
183         com.liferay.portlet.imagegallery.model.IGFolder folder,
184         boolean addCommunityPermissions, boolean addGuestPermissions)
185         throws com.liferay.portal.PortalException,
186             com.liferay.portal.SystemException {
187         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
188 
189         igFolderLocalService.addFolderResources(folder,
190             addCommunityPermissions, addGuestPermissions);
191     }
192 
193     public static void addFolderResources(long folderId,
194         java.lang.String[] communityPermissions,
195         java.lang.String[] guestPermissions)
196         throws com.liferay.portal.PortalException,
197             com.liferay.portal.SystemException {
198         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
199 
200         igFolderLocalService.addFolderResources(folderId, communityPermissions,
201             guestPermissions);
202     }
203 
204     public static void addFolderResources(
205         com.liferay.portlet.imagegallery.model.IGFolder folder,
206         java.lang.String[] communityPermissions,
207         java.lang.String[] guestPermissions)
208         throws com.liferay.portal.PortalException,
209             com.liferay.portal.SystemException {
210         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
211 
212         igFolderLocalService.addFolderResources(folder, communityPermissions,
213             guestPermissions);
214     }
215 
216     public static void deleteFolder(long folderId)
217         throws com.liferay.portal.PortalException,
218             com.liferay.portal.SystemException {
219         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
220 
221         igFolderLocalService.deleteFolder(folderId);
222     }
223 
224     public static void deleteFolder(
225         com.liferay.portlet.imagegallery.model.IGFolder folder)
226         throws com.liferay.portal.PortalException,
227             com.liferay.portal.SystemException {
228         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
229 
230         igFolderLocalService.deleteFolder(folder);
231     }
232 
233     public static void deleteFolders(long groupId)
234         throws com.liferay.portal.PortalException,
235             com.liferay.portal.SystemException {
236         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
237 
238         igFolderLocalService.deleteFolders(groupId);
239     }
240 
241     public static com.liferay.portlet.imagegallery.model.IGFolder getFolder(
242         long folderId)
243         throws com.liferay.portal.PortalException,
244             com.liferay.portal.SystemException {
245         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
246 
247         return igFolderLocalService.getFolder(folderId);
248     }
249 
250     public static com.liferay.portlet.imagegallery.model.IGFolder getFolder(
251         long groupId, long parentFolderId, java.lang.String name)
252         throws com.liferay.portal.PortalException,
253             com.liferay.portal.SystemException {
254         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
255 
256         return igFolderLocalService.getFolder(groupId, parentFolderId, name);
257     }
258 
259     public static java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> getFolders(
260         long groupId) throws com.liferay.portal.SystemException {
261         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
262 
263         return igFolderLocalService.getFolders(groupId);
264     }
265 
266     public static java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> getFolders(
267         long groupId, long parentFolderId)
268         throws com.liferay.portal.SystemException {
269         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
270 
271         return igFolderLocalService.getFolders(groupId, parentFolderId);
272     }
273 
274     public static java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> getFolders(
275         long groupId, long parentFolderId, int begin, int end)
276         throws com.liferay.portal.SystemException {
277         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
278 
279         return igFolderLocalService.getFolders(groupId, parentFolderId, begin,
280             end);
281     }
282 
283     public static int getFoldersCount(long groupId, long parentFolderId)
284         throws com.liferay.portal.SystemException {
285         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
286 
287         return igFolderLocalService.getFoldersCount(groupId, parentFolderId);
288     }
289 
290     public static void getSubfolderIds(java.util.List<Long> folderIds,
291         long groupId, long folderId) throws com.liferay.portal.SystemException {
292         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
293 
294         igFolderLocalService.getSubfolderIds(folderIds, groupId, folderId);
295     }
296 
297     public static void reIndex(java.lang.String[] ids)
298         throws com.liferay.portal.SystemException {
299         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
300 
301         igFolderLocalService.reIndex(ids);
302     }
303 
304     public static com.liferay.portal.kernel.search.Hits search(long companyId,
305         long groupId, long[] folderIds, java.lang.String keywords)
306         throws com.liferay.portal.SystemException {
307         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
308 
309         return igFolderLocalService.search(companyId, groupId, folderIds,
310             keywords);
311     }
312 
313     public static com.liferay.portlet.imagegallery.model.IGFolder updateFolder(
314         long folderId, long parentFolderId, java.lang.String name,
315         java.lang.String description, boolean mergeWithParentFolder)
316         throws com.liferay.portal.PortalException,
317             com.liferay.portal.SystemException {
318         IGFolderLocalService igFolderLocalService = IGFolderLocalServiceFactory.getService();
319 
320         return igFolderLocalService.updateFolder(folderId, parentFolderId,
321             name, description, mergeWithParentFolder);
322     }
323 }